Renodepedia - From Zephyr’s structured data to traceable and testable open hardware with Renode

Published:

Topics: Open ISA, Open OS, Open hardware, Open simulation

The abundance and diversity of hardware platforms brought about by the growth of ARM, RISC-V and the open software ecosystem presents unprecedented opportunities to product makers and developers. With a variety of I/O interfaces, processing capabilities, power characteristics and more, hardware can be ideally matched with its target use case.

To help you find a way around this planescape, Antmicro created a reference called Renodepedia, which uses Renode, the open source modular hardware simulator, and structured hardware description data to automatically generate a database of contemporary hardware that you can also experience immediately in simulation.

Renodepedia - Cataloging all of world’s hardware with software

The motivation behind Renodepedia is simple - hardware is modular in nature, reusing the same cores, I/O blocks and other peripherals in many variants. Renodepedia aims to gather all the information in one place, in the form of a visual, easily navigable database. With this vast catalog of hardware it’s possible to explore connections between components and see commonalities and software porting options - and use Renode to prove it actually works.

Covering hundreds of boards, SoCs and dozens of vendors, and exposing data such as memory maps, execution traces and metrics as well as UART output from real runs, Renodepedia is a step forward in making the hardware ecosystem more transparent and explainable, complementing Antmicro’s activity in CHIPS Alliance and RISC-V to make hardware more open and collaborative.

Screenshot of the main page

Determining which hardware platform to use for your new industrial or consumer device is not always easy. The documentation and software support offered by different vendors will typically differ in the level of detail and completeness and not be easily comparable, and sourcing each and every potential platform to test it in practice is simply not realistic. This data fragmentation can be a real obstacle especially when - like Antmicro’s customers - you work with complex heterogeneous systems against challenging timelines, in distributed collaborative teams.

Much of the information and the tools required to solve this problem are already there, however to date there has been no convenient, unified and clear way to access them. That brings us to the question - where to look for reliable, structured data about the various platforms, their capabilities and limitations so that we can build a useful resource?

Enter Zephyr

The Zephyr Project is a dynamically growing open source RTOS, supporting multiple hardware architectures and platforms stretching from small MCUs to complex application processors. Antmicro is a Platinum Member of the project alongside Google, Meta, Intel, NXP, Nordic and others, and maintains the RISC-V architecture, working at the intersection of open software and hardware.

Illustration depicting many SoCs

One of the great things about Zephyr is how well the project’s codebase is organized - with over 400 supported platforms there is simply no other way to keep the project maintainable. Zephyr provides some key data used in Renodepedia in a structured way:

  • YAML files containing metadata about the supported targets,
  • device trees providing a unified description of the hardware,
  • repository organization that is easy to navigate.

221 boards running in Renode, and counting

This type of a unified and systemized approach is a perfect match for Renode which combined with the data from Zephyr enabled Antmicro to create the Renode Zephyr dashboard, a massive CI system that allows for unified testing of over 200 Zephyr targets in simulation.

How was this possible? Mainly due to Renode’s vast library of ready-to-use peripheral models and the building block nature of the tool - each hardware block comprising an SoC is modeled separately, and putting them together into a virtual SoC is done via straightforward text files. Using the information from the Zephyr device trees and the dts2repl tool Antmicro developed alongside the dashboard, device tree sources can be converted into Renode platform description “.repl” files. With all these elements in place, building a massive CI-based dashboard of ~400 boards, 221 of which are currently passing tests in Renode, was a natural consequence. And this was just the beginning of the work towards a comprehensive hardware database.

Screenshot of the boards list

Exploring the System-on-Chip landscape

One of the core parts of Renodepedia is the SoCs section, which lets you explore similarities between different chips to make informed decisions about your hardware and software choices. If you take a closer look, Renodepedia also includes automatically generated, consistent SoC images using KiCad and Blender, making it possible to compare different parts - also visually.

There are currently 255 SoC options to choose from, each containing information about the vendor and peripheral details such as address spaces and references to Zephyr drivers as well as a list of boards that contain a given SoC.

For example, if you choose stm32f407zgt6 from the SoC section you will see a list of peripherals with additional details, as shown in the screenshot below. By clicking a separate Boards tab you will find information about the board the stm32f407zgt6 SoC is a part of, including whether it’s currently supported in Renode.

Screenshot of a single SoC

See real UART output from almost a thousands demos

Real development boards and demos are another key aspect of Renodepedia. The complete list of available boards offers an option to quickly filter those that are supported in Renode. After choosing a specific board, such as SiFive HiFive1 Rev B, you’ll see an overview of all the information related to this board. First you’ll notice the SoC and vendor details, allowing you to easily find related products. Below, there are three tabs:

  • software containing information about the demos available for this board and artifacts from running them in Renode, if available,
  • hardware providing information about components, device trees and some specification details, as well as related boards,
  • peripherals listing peripheral details just like in the SoC pages

Screenshot of a single board

The available demos - which include:

are listed on the left of the software tab, allowing you to easily switch between them. For each demo there’s dynamic UART output recorded with asciinema, showing the real result of the selected demo, as generated by our CI:

Experience a live Renodepedia demo at embedded world 2023. Join Antmicro in a dedicated shared kiosk with the ZephyrProject in Hall 4-170 and discover over 200+ boards currently supported in Zephyr.

Traces, SBOM, Robot tests and other build artifacts

The Renodepedia CI system executes thousands of jobs, generating a massive amount of artifacts and data across a range of hardware and demos.

As exemplified by the SiFive HiFive1 board, an interactive flamegraph of the execution trace is displayed directly below the UART output, allowing you to track the execution of the software in time. You can export the trace as a json file for further use.

Renode can also collect execution metrics data and memory/flash usage for specific samples, which are planned to be added later.

Screenshot of the trace section

As announced earlier this year, the Zephyr Dashboard includes the Software Bill of Materials (or SBOM) in standard builds. This SBOM data for each demo is available for download directly on the Renodepedia page, along with other build artifacts, and you can easily view and download those that are interesting to you.

You can find a list of files for download at the bottom of the board’s page: build artifacts including Renode scripts, SBOM data and a nicely styled Robot Test Suite Log showing the detailed, step-by-step rundowns of the tests that were run.

This abundance of data can be easily envisioned to be generated for the needs of your own products in various configurations and across product families, throughout the entire development lifecycle.

Run the demos locally

When browsing Renodepedia you are looking at pre-generated results. You can however also run the software locally on a Linux machine, using the renode-run utility. If you just want to run one of the demos and see for yourself, you can use the demo command, which makes the tool grab and unpack artifacts from the online deployment of the Zephyr dashboard. After choosing the board you want to try, for example QuickLogic’s QuickFeather, you’ll be presented with the commands which you can use to run the demo locally, (including downloading the Renode portable package if it’s not already installed):

pip3 install --user --upgrade git+https://github.com/antmicro/renode-run.git
renode-run demo -b quick_feather hello_world

You can also run your own binary with renode-run - see the tool’s help message for details.

Execute the software in the cloud

Alternatively, you can take advantage of the Google Colab service, which offers free cloud machines to run arbitrary scripts (in the form of familiar, Python-powered Jupyter Notebooks) and share the results online. For each dashboard sample there is a pre-made Colab notebook to run the demo instantly on a cloud server, without any installation, making it an excellent tool for interactive collaboration, presentation and educational purposes.

As an example let’s take a look at the Hexiwear board. After clicking the Colab button a new tab with a Colab notebook will open, displaying each step of, in this case, the Hello World demo and giving you the option to try it out for yourself. If you require it, you can also view the ipynb or the Python source by simply clicking the appropriate button at the top of the notebook.

Screenshot of the Colab notebook

This note, of course, doesn’t cover the entirety of Renodepedia’s capabilities - this vast database offers potential that is best experienced first-hand, so visit the website and try for yourself.

Driving open hardware with software

The future of Renodepedia is very exciting - several developments are already in the works to add more useful data, features and an even better user experience. On the hardware side, Antmicro is building up an open PCB component database and an automatic rendering flow which will allow generating photorealistic images straight from KiCad which ultimately could be used to create interactive and animated board models. Antmicro’s work within RISC-V and CHIPS Alliance is the driving force behind the efforts to make the vision of open source SoCs composed of open source blocks a reality - and with its open and interconnected nature, Renodepedia lays the foundation for this future. If you’re interested in using Renode in your project or would like to have your platform supported in our simulation framework and included in Renodepedia, reach out to us at support@renode.io.

See Also: