~/talk

Simulating Low-Level Hardware Devices in Cpp

Talkat CppCon 2022 · 2022-09-11..09-16· [testing]
name:Ben Saks
links:none on file
slides:none on file

Claims that C++ can simulate memory-mapped device registers so the same register-level code runs on desktop and target hardware. Uses operator overloading, user-defined conversion operators, class-specific operator new/delete, volatile uint32_t, std::map and std::thread to attach per-address read/write handlers. Implements a UART plus seven‑segment display (UART has six device registers) where reads clear RDR and a background thread injects an 'a' every second. The simulator reproduces the hardware side‑effects and the example runs as described.

AI-written summary · about

  1. 0:00Simulating hardware in C++
  2. 1:03Why simulate hardware devices
  3. 5:37Memory-mapped hardware registers
  4. 8:28Constructing UART objects
  5. 11:44Positioning UART objects
  6. 17:04Running on target hardware
  7. 18:35Benefits of simulated environments
  8. 22:09Side effects of register access
  9. 29:00Device register classes
  10. 34:40Simulating UART with operators
  11. 40:09Side effect handlers
  12. 46:15Finalizing UART implementation
  13. 48:03Q&A
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.