Developing and testing with Renode in heterogeneous, multi-node automotive use cases

Published:

Topics: Open source tools, Open hardware, Open security / safety

Automotive engineering in the past 30 years has been transformed by the growing capabilities of microprocessors, enabling their use in a wide range of the vehicle’s capabilities related to safety, convenience and efficiency. Modern vehicles can have hundreds of microcontrollers and application processors, managing anything from engine and transmission control systems, cruise control, brakes and other safety-critical systems, to infotainment, in cabin systems and more.

The rapid shift to electric vehicles (EVs) is also partially responsible for the inevitable process of turning cars into “smartphones on wheels”, digitizing further areas of the vehicle’s operation and introducing new subsystems such as electronic battery management. In parallel, autonomous driving and driver assist functions are both pushing the computational envelope of a car’s electronic systems and requiring the addition of new subsystems responsible for real-time video and other data ingestion and processing.

The large expansion in vehicle capabilities, supported by increasingly powerful MPUs and MCUs and linked through in-vehicle networking, directly translates into the demand for computer-based simulation in order to exercise and test the automotive system in its impressive complexity.

In this blog note, we discuss the ways Antmicro uses its open source Renode embedded system simulation framework to help our customers in the transition towards software-based testing, streamlining the development process for complex, multi-node applications in the automotive industry, as well as describe the implications of using deterministic simulation and Renode’s features and integrations for scalable testing of advanced heterogeneous multi-node systems.
Renode for automotive applications - illustration

Covering the automotive hardware landscape

The trends outlined above, necessitating a variety of platforms corresponding to the diversity of emerging applications, combined with the everlasting push for cost optimization have heavily influenced the automotive SoC landscape.

One of the major shifts in the last decade has been the widespread adoption of ARM SoCs. Like in other industry domains, the inexpensive and energy-efficient ARM Cortex-M platforms are taking over the general purpose functionalities, supplemented with the powerful Cortex-A CPUs where more advanced compute is needed and Cortex-R for controlling safety-critical automotive subsystems such as engine management, airbags and braking systems.

Renode’s support for ARM platforms has kept up with these changes, rapidly improving coverage for all three of the mentioned SoC families, including both adding more modern Cortex-M core variants such as Cortex-M85, 64-bit Cortex-A platforms such as Cortex-A78 as well as Cortex-R such as Cortex-R52 or R8. These developments are perhaps best visualized by the massive CI system of the Renode Zephyr Dashboard where we show Zephyr compiled for 328 (and counting) boards successfully running in Renode simulation, as well as the recently released Renode U-Boot Dashboard which tracks our support of higher-end platforms in the more Linux-centric part of the hardware ecosystem.

The open RISC-V ISA, driven by RISC-V International which Antmicro is a Founding member of, is also gaining ground in the automotive industry, including both grand announcements from major silicon vendors like Infineon, Qualcomm, NXP Semiconductors, Bosch, and Nordic Semiconductors which specifically highlight automotive as a focus area, and continued investments from other RISC-V pioneers which include our customers and partners like SiFive.

There is a also a slew of research projects which use RISC-V’s adaptability and low entry barrier to enable new applications in the automotive domain which Antmicro and its Renode framework prominently feature in, including TRISTAN, whose goal is creating tools and IP for RISC-V-based SoC designs that can be used within automotive environments, and VEDLIoT, which is looking at the possibilities for improving e.g. Pedestrian Automatic Emergency braking systems using machine learning.

The ongoing research and collaborations, combined with developments stemming from Antmicro’s projects with companies employing RISC-V in areas such as nuclear power, automotive or space, are further improving Renode’s great support for the RISC-V ISA - including e.g. support for the RISC-V Vector 1.0 spec - as well as the co-simulation and extensive tracing capabilities of the framework.

Thanks to its flexibility, Renode is also being used as a complete tool for end-to-end prototyping and architectural development of RISC-V SoCs such as in the case of the Google Research’s secure ML Open Se Cura reference chip - and for several semiconductor vendors like the RISC-V pioneer Microchip, it plays an important role for both pre- and post-silicon development.

The fact that Renode is architecture-agnostic and capable of supporting heterogeneous, multi-ISA, multi-core and multi-node systems helps support the freedom of picking whatever cores and peripheral IPs works best for a given scenario, and combining them both within a single SoC and between devices as needed, running suites of tests on unmodified production grade binaries and testing complete, complex boot flows and interactions.

Simulating entire systems

In modern cars, extensive amounts of data travel to and from numerous sensors, switches, actuators and compute units, and this complexity needs to be reflected in the development and testing procedures. Heterogeneous systems encompassing both application-grade OS like Linux and RTOS-class systems (or bare metal) have to be tested together, and transitions from the current industry standard CAN, to more powerful automotive Ethernet networks, as well as the rapidly developing wireless connectivity functionalities call for a tool that can handle the complexity.

Renode lets you create complete virtual scenarios involving many nodes, interconnected by wired or wireless protocols like the aforementioned Ethernet, CAN, SPI, I2C/I3C, and Thread, BLE, Zigbee or WiFi respectively.

What is also crucial for the reliability of your testing and prototyping in simulation and for how well your solutions will translate to real life scenarios, is the fact that in Renode you run the actual (and not idealized/generic) software as you run on physical hardware, without the need for converting to and from a simulation-specific version before you arrive at a final, deployable solution.

Advanced testing at scale

Since Renode is a testing-oriented framework, over the years we have developed several integrations with a range of open source testing tools and frameworks, such as Robot, Zephyr’s Twister and Unity. The ease of integration with testing frameworks allows Renode to be easily adapted to specific use cases in the automotive industry. Recently, Renode has also seen another groundbreaking improvement in the form of a Pythonic interface called pyrenode3 which allows for powerful integrations like end-to-end firmware generation and simulation through our Visual System Designer and opens the door to much more seamless integration with familiar tools like pytest or Jupyter Notebook.

Testing in Renode can be scaled easily according to specific test requirements - from straightforward single-node scenarios to extensive test suites spanning hundreds of targets and taking several hours, from the verification of the boot process to regression tests of complex communication-heavy, time-sensitive workloads. Renode provides a fully functional solution for infinitely scaling the development environment across teams and use cases, and into the cloud.
Renode for automotive applications - illustration 2

With such a scalable test system, developers receive quick feedback on their design prototypes, which is especially important for new, bespoke setups. With increasing amounts of complexity within automotive systems, the benefits of simulation are apparent, particularly when evaluating new hardware components for their suitability for inclusion in specific projects, especially in the face of supply chain uncertainties.

Renode also provides a unified methodology to build an end-to-end simulation of a system including its interactions with the environment, providing capabilities to model sensors such as thermometers, accelerometers, pressure, and even a tailor-made native sensor data format - RESD, which we developed and introduced over the course of many collaborations with our customers. RESD enables us to introduce both real data that has been prerecorded during tests in the physical world, as well as faux data in order to perform regressions for particular scenarios and edge cases, including communication errors or sensor data corruption. The RESD format enables developers to include multiple channels of various types of data for testing purposes in a strictly time-controlled manner, which bears much significance for real-time, safety-critical systems in a vehicle.

Simplifying technological transitions

The abovementioned transitions to new ISAs or communication protocols overlap with the mounting complexity of software systems present in modern day cars, generated by the additional functionalities many car-buyers have come to enjoy and expect. Adoption of open source operating systems like Android, Linux and Zephyr RTOS is also pushing new programming paradigms, tools and approaches, and Renode is helping in those technological transitions.

Renode, as a software-agnostic framework with ever-growing support for embedded platforms, is ideal for assisting with migration processes, particularly in safety-critical use cases. As migration paths are rarely straightforward, Renode can save considerable amounts of time as the same code can be executed in software simulation as on physical hardware. This time-saving approach is at the center of our work with clients, and we often assist in creating suites of integration tests to drive them through the migration process to new software architectures without compromising system stability or functionality.

Using reproducible and quickly adaptable Renode simulation scenarios, systems can be quickly redesigned to test different hardware combinations, while distributed teams can simultaneously work on different aspects of the migration process. Renode can therefore act as an agent of change, eliminating the barriers of embracing new and exciting developer-driven technologies like Zephyr that more conservative industries like automotive would normally spend years to adopt.

Improved reliability with determinism of execution

Reliability is also a major concern within the automotive industry, particularly as recalls are expensive and time consuming for both their customers and for their distribution network. As a way of addressing these concerns, Renode provides fully deterministic simulation of multi-core and multi-node systems, which is unobtainable in physical hardware as software simulation provides for the exact same conditions every time, whereas physical hardware testing is subject to a wide array of external influences that are outside the control of the tester. As a consequence of this, users are assured that the test results obtained from Renode are reliable and replicable.

Combined with advanced software execution tracing functionalities that enable straightforward interactive debugging with out-of-the-box execution metrics gathering, or capabilities like state-saving and loading, Renode provides for a consistent and whole-system simulation, providing engineers with powerful capabilities to make sure their quality of their software is always trending upwards.

Use Renode in automotive development processes

Renode’s determinism, software-agnosticism, testing integrations, and substantial, ever-expanding coverage of hardware render it a greatly capable framework for automotive development, no matter the scale and complexity. With stellar support for both ARM and RISC-V as well as heavy focus on extendability, Renode is ideal for transformative developments which focus on safety and security - key issues in automotive contexts.

To learn more about how using Renode can transform the process of software and hardware co-development for reliable, scalable, diversified embedded systems tailored to your specific automotive use cases, reach out to us at contact@antmicro.com - or just download Renode and start using it today!

See Also: