Memory-Mapped Devices as Objects - Dan Saks - CppCon 2020
https://cppcon.org/
https://github.com/CppCon/CppCon2020
---
Most, if not all, modern CPUs communicate with external devices via memory-mapped device registers. A memory-mapped register is circuitry that connects to a CPU’s bus structure and responds to bus signals almost as if it were ordinary memory. Almost, but not quite.
C++ programs can use C features such as pointers and casts to access memory-mapped registers. This is still widespread practice. However, traditional C techniques tend to treat memory-mapped registers more as raw storage than as objects with constrained behaviors. C idioms for accessing memory-mapped devices leave too many opportunities for programming errors and late nights with a debugger.
This session explains various C++ techniques for placing objects into memory-mapped locations and for guaranteeing proper initialization and destruction. It shows how you can use base classes and templates to capture commonalities among different devices that use similar register layouts. By applying these techniques, you’ll be able to package memory-mapped devices as lightweight class objects that are easy to use correctly and hard to use incorrectly.
---
Dan Saks is the president of Saks & Associates, which offers training and consulting in C and C++ and their use in developing embedded systems. Dan used to write the “Programming Pointers” column for embedded.com online. He has also written columns for numerous print publications including The C/C++ Users Journal, The C++ Report, Software Development, and Embedded Systems Design. With Thomas Plum, he wrote C++ Programming Guidelines, which won a 1992 Computer Language Magazine Productivity Award. Dan has taught C and C++ to thousands of programmers around the world. He has presented at conferences such as Software Development, Embedded Systems, and C++ World. He has served on the advisory boards of the Embedded Systems and Software Development conferences. Dan served as secretary of the ANSI and ISO C++ Standards committees and as a member of the ANSI C Standards committee. More recently, he contributed to the CERT Secure C Coding Standard and the CERT Secure C++ Coding Standard.
---
Streamed & Edited by Digital Medium Ltd - events.digital-medium.co.uk
events@digital-medium.co.uk
Видео Memory-Mapped Devices as Objects - Dan Saks - CppCon 2020 канала CppCon
https://github.com/CppCon/CppCon2020
---
Most, if not all, modern CPUs communicate with external devices via memory-mapped device registers. A memory-mapped register is circuitry that connects to a CPU’s bus structure and responds to bus signals almost as if it were ordinary memory. Almost, but not quite.
C++ programs can use C features such as pointers and casts to access memory-mapped registers. This is still widespread practice. However, traditional C techniques tend to treat memory-mapped registers more as raw storage than as objects with constrained behaviors. C idioms for accessing memory-mapped devices leave too many opportunities for programming errors and late nights with a debugger.
This session explains various C++ techniques for placing objects into memory-mapped locations and for guaranteeing proper initialization and destruction. It shows how you can use base classes and templates to capture commonalities among different devices that use similar register layouts. By applying these techniques, you’ll be able to package memory-mapped devices as lightweight class objects that are easy to use correctly and hard to use incorrectly.
---
Dan Saks is the president of Saks & Associates, which offers training and consulting in C and C++ and their use in developing embedded systems. Dan used to write the “Programming Pointers” column for embedded.com online. He has also written columns for numerous print publications including The C/C++ Users Journal, The C++ Report, Software Development, and Embedded Systems Design. With Thomas Plum, he wrote C++ Programming Guidelines, which won a 1992 Computer Language Magazine Productivity Award. Dan has taught C and C++ to thousands of programmers around the world. He has presented at conferences such as Software Development, Embedded Systems, and C++ World. He has served on the advisory boards of the Embedded Systems and Software Development conferences. Dan served as secretary of the ANSI and ISO C++ Standards committees and as a member of the ANSI C Standards committee. More recently, he contributed to the CERT Secure C Coding Standard and the CERT Secure C++ Coding Standard.
---
Streamed & Edited by Digital Medium Ltd - events.digital-medium.co.uk
events@digital-medium.co.uk
Видео Memory-Mapped Devices as Objects - Dan Saks - CppCon 2020 канала CppCon
Показать
Комментарии отсутствуют
Информация о видео
Другие видео канала
![Back to Basics: Concurrency - Arthur O'Dwyer - CppCon 2020](https://i.ytimg.com/vi/F6Ipn7gCOsY/default.jpg)
![Empirically Measuring, & Reducing, C++’s Accidental Complexity - Herb Sutter - CppCon 2020](https://i.ytimg.com/vi/6lurOCdaj0Y/default.jpg)
![A Multi-threaded, Transaction-Based Locking Strategy for Containers - Bob Steagall - CppCon 2020](https://i.ytimg.com/vi/Pi243hGxDyA/default.jpg)
![Dynamic Polymorphism with Metaclasses and Code Injection - Sy Brand - CppCon 2020](https://i.ytimg.com/vi/8c6BAQcYF_E/default.jpg)
![CppCon 2019: Alisdair Meredith, Pablo Halpern “Getting Allocators out of Our Way”](https://i.ytimg.com/vi/RLezJuqNcEQ/default.jpg)
![Embedded: Customizing Dynamic Memory Management in C++ - Ben Saks - CppCon 2020](https://i.ytimg.com/vi/gzqLScDUlDI/default.jpg)
![CppCon 2014: Walter E. Brown "Modern Template Metaprogramming: A Compendium, Part I"](https://i.ytimg.com/vi/Am2is2QCvxY/default.jpg)
![CppCon 2015: T. Winters & H. Wright “All Your Tests are Terrible..."](https://i.ytimg.com/vi/u5senBJUkPc/default.jpg)
![Monoids, Monads, and Applicative Functors: Repeated Software Patterns - David Sankel - CppCon 2020](https://i.ytimg.com/vi/giWCdQ7fnQU/default.jpg)
![C++20: An (Almost) Complete Overview - Marc Gregoire - CppCon 2020](https://i.ytimg.com/vi/FRkJCvHWdwQ/default.jpg)
![Back to Basics: Function and Class Templates - Dan Saks - CppCon 2019](https://i.ytimg.com/vi/LMP_sxOaz6g/default.jpg)
![Retiring the Singleton Pattern: Concrete Suggestions for What to use Instead - Peter Muldoon](https://i.ytimg.com/vi/K5c7uvWe_hw/default.jpg)
![Dealing with Embedded Limitations - Panel Discussion hosted by Ben Saks - CppCon 2020](https://i.ytimg.com/vi/v_4D43nASt4/default.jpg)
![CppCon 2019: Arthur O'Dwyer “Back to Basics: Smart Pointers”](https://i.ytimg.com/vi/xGDLkt-jBJ4/default.jpg)
![How C++20 Changes the Way We Write Code - Timur Doumler - CppCon 2020](https://i.ytimg.com/vi/ImLFlLjSveM/default.jpg)
![CppCon 2018: Simon Brand “How C++ Debuggers Work”](https://i.ytimg.com/vi/0DDrseUomfU/default.jpg)
![](https://i.ytimg.com/vi/KeTEM1PZbRs/default.jpg)
![The Hidden Secrets of Move Semantics - Nicolai Josuttis - CppCon 2020](https://i.ytimg.com/vi/TFMKjL38xAI/default.jpg)
![Plenary: Performance Matters - Emery Berger - CppCon 2020](https://i.ytimg.com/vi/koTf7u0v41o/default.jpg)
![C++ Weekly - Ep 235 - PMR: Amazing, Fast, But, Not Quite Magic](https://i.ytimg.com/vi/vXJ1dwJ9QkI/default.jpg)