Senior Design Team sddec21-02 • Co-Simulation of an Avionics Interface Device

Our team is extending an existing co-simulation interface that utilizes Xilinx QEMU and SystemC+TLM simulation technologies.

We are also improving the documentation and demonstrations of these simulation technologies in order to increase usability and understanding of them.


What is Co-Simulation?

Co-simulation is the ability to run multiple simulated processes concurrently with one another. This can have different use cases, such as simulating the processer your code is running on, or simulating hardware interactions and mocking any calls that are made by it. This can allow a developer to run real code without a fully developed piece of hardware, or to test a hardware prototype without fully designed driver code.


Existing Design:

System Design

This design shows a Zynq-7000 processor being simulated within a Xilinx Quick Emulator (QEMU) instance with a Buildroot Kernel running on it. This processor is attached to a SystemC hardware model via a remote port protocol. The processer is able to interact with the SystemC model, and memory values can be sent to your host application via another remote port.


Problem:

The Co-Simulation (Co-sim) environment using QEMU in conjunction with Xilinx SystemC TLM libraries lacks good technical demonstrations and documentation.


Solution:

This project aims to create demos and simulations that can be documented and used as examples for future users of this software. Our team’s primary demo features an arbitrary Linux driver running in QEMU simulation, with a SystemC backend capable of communicating bidirectionally with the host PC. An application hosted on the host PC then interacts with the SystemC backend, driving the backing registers of the Linux device. We completed this demo with a comparison between the co-simulation environment and a traditional QEMU simulation, explaining where benefits can be seen with Co-sim instead of current simulation strategies.


Demos & Documents Created:

"Getting Started Guide" for Xilinx Demo:

One of the big goals of our project was to create better documentation so newer users would have a baseline to start working with Xilinx’s co-simulation. One way to do this was to create a starter's guide for a basic demo that Xilinx had already created. This allowed new users to have an easily buildable application to begin playing around with. Once users are comfortable with the demo, they can make changes to the demo and broaden their understanding further.


Remote Port Implementation/Demo + Documentation:

One demo we created utilized a remote port protocol as a way to connect the co-simulated environment to a host application. Using Xilinx's 'libremoteport' library, this demo allows users to read and write data to and from the SystemC model's memory via unix sockets.


Industrial I/O (IIO) Demo:

Our last demo showed an end-to-end demonstration of the co-simulation frameworks interacting with an out of the box Linux driver, then piping the data back to the host pc. A Buildroot kernel was configured to use IIO (Industrial I/O) which allowed memory to be read from in userspace from kernel space. The demonstration uses an oscilloscope to graphically show the data that is sent to the host application.


Important Documents and Links:

Final Report
Final Presentation Slides
Project Poster
Initial Design Document
Public Team Repository (Public Mirror of Main Team Repository)