The Embedded Frontier

#024 - Simulating Embedded Systems

In this episode, Jacob explores simulation for embedded systems as the seventh step in modernizing embedded development. He discusses functional simulation, on-chip simulation, and software architecture simulation, demonstrating how proper abstraction enables developers to validate code before hardware is available. Jacob provides a practical demonstration of simulating a push button module with debouncing algorithms, showing how modern software architecture can dramatically improve embedded system development workflows.

Key Takeaways:

• Functional simulation allows embedded developers to validate code without physical hardware by abstracting low-level hardware dependencies
• Modern embedded architecture should decouple application code from hardware using zero-cost or low-cost abstractions
• Push button debouncing serves as an excellent example for learning simulation techniques that every embedded engineer can relate to
• On-chip simulation tools like QEMU and Renode can simulate processor-level instructions but may be incomplete for microcontroller peripherals
• State machine simulation enables visual validation of system behavior before code deployment
• AI tools can now rapidly generate simulation code, making functional simulation more accessible than ever
• Socket communication provides deterministic and fast data exchange for functional simulation environments
• Start simple with side projects like weather stations or button modules to learn simulation techniques
• Legacy systems can be gradually refactored to support simulation by decoupling high-risk areas from hardware dependencies
• Simulation enables faster development cycles and reduces dependency on hardware availability during early development phases