See how to build a new device, add it to an existing target system, and experience the Simics modeling process from creation to completion of the device.
In the video, we show how this device is built using the Simics Eclipse GUI, via the stages laid out in the Simics modeling white paper:
We have an ARM-based QSP machine with two cores and a basic set of peripherals, and add a new device which is a controller for a simple user-facing panel. The panel itself has four colored LEDs that can be turned on and off from the device, and a button input that should cause the device to send an interrupt to the processors of the machine (via the interrupt controller). We also assume that there is a software stack in place that contains a driver for the device, and that the end goal is to make that software driver happy with our virtual platform. This situation is representative for much of real Simics usage and modeling.
- At the beginning, we have the QSP machine along with the user-facing panel.
- Set up a skeleton of the programming register map of the device (using DML)
- Add the device to the machine setup (system memory map)
- Test run with software (ending in a failure since there is no functionality)
- Set up unit tests to describe the functionality of the device (test-driven development, essentially)
- Fill in most of the functionality (we do a fast forward here, just like in a cooking show where you cut from putting a cake in the oven to it being done)
- Rerun unit tests and retest with software to show the device is still slightly incomplete
- Fill in the last piece of functionality
- Rerun unit tests and software test, showing that the device now works as it should