Virtualization, a powerful technology concept commonly associated with high-end applications in servers, is coming to the microcontrollers featuring multiple execution domains via multiple CPUs with a lock-step mechanism. The microcontrollers that incorporate hardware-based virtualization-assisted functions mark a new integration milestone in the embedded design world.
Moreover, by running multiple software components on a single MCU without interfering with each other, hardware virtualization brings a new level of flexibility and reliability in safety-critical embedded environments. Automotive MCUs running multiple safety integrity levels are a case in point.
Additionally, software systems with different security levels can be executed alongside non-critical software on the same hardware. For instance, a cockpit controller can run an instrument cluster and an in-vehicle infotainment system on a single piece of hardware.
How MCU virtualization works
So, what’s driving the virtualization-ready CPUs on low-cost microcontrollers. The simple answer is that the hardware-based virtualization functions dramatically reduce the processing overhead.
The software-based virtualization, commonly known as a hypervisor, consumes more processing time due to the need to emulate hardware virtually. It must change the CPU states and deliver interrupts. That, in turn, poses problems for automotive MCUs in terms of ensuring the real-time responsiveness for safety-critical applications.
The MCU virtualization also works on the basic hypervisor principles. The hypervisor creates independent virtual machines (VMs), and each VM is isolated from the others. VM isolation allows design engineers to modify or update the systems independently. For that, however, an MCU inevitably requires a large flash memory capacity.
In hardware virtualization, hypervisors can specifically be deployed for multiple RTOSes like AUTOSAR by utilizing MCU features like memory protection. Furthermore, several hypervisors can run on a CPU core.
MCU virtualization venues
The hardware virtualization on MCU platforms is still in its early stages. Some chipmakers are unveiling test chips that can serve as a stepping stone toward MCU virtualization. These chips allow automotive designers to develop software and test patterns ahead of actual samples and move designs from physical to virtual systems (Figure 1).
Then there are EDA houses collaborating with MCU suppliers; the virtualization development kits provided by EDA firms help create virtual prototypes as embedded targets that can be deployed by software teams of MCU suppliers. It also enables electronic control unit (ECU) developers at car OEMs, and Tier-1’s to create a virtual hardware environment for systems integration, fault and coverage testing, and regression testing.
Finally, there are software houses that provide software hypervisors for CPU cores like ARM Cortex-R52 (Figure 2). That allows MCU suppliers to run multiple, unmodified operating systems and applications on top of a single microcontroller. It also demonstrates how hardware virtualization is going to be a critical building block in consolidating multiple applications on a microcontroller.