Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/Xilinx/systemctlm-cosim-demo
QEMU libsystemctlm-soc co-simulation demos.
https://github.com/Xilinx/systemctlm-cosim-demo
co-simulation qemu systemc tlm2
Last synced: about 2 months ago
JSON representation
QEMU libsystemctlm-soc co-simulation demos.
- Host: GitHub
- URL: https://github.com/Xilinx/systemctlm-cosim-demo
- Owner: Xilinx
- License: other
- Created: 2016-10-27T22:55:06.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2024-05-30T13:07:00.000Z (7 months ago)
- Last Synced: 2024-09-02T04:59:57.449Z (4 months ago)
- Topics: co-simulation, qemu, systemc, tlm2
- Language: C++
- Homepage: https://xilinx-wiki.atlassian.net/wiki/spaces/A/pages/862421112/Co-simulation
- Size: 129 KB
- Stars: 115
- Watchers: 19
- Forks: 46
- Open Issues: 22
-
Metadata Files:
- Readme: README
- License: LICENSE
Awesome Lists containing this project
- awesome-opensource-hardware - systemctlm-cosim-demo
README
TLM-COSIM-DEMO
---------------------------------------
This contains a small SystemC/TLM-2.0 based subsystem for demo purposes.
It has an interconnect connecting a remote-port attached QEMU
instance, a demo/debug-device, a small DMA and if verilator is available
a timer. Note that the remote-port instance connecting to QEMU
can serve multiple QEMU instances. In fact, this demo can run
connected to the ZynqMP platform with 2 external QEMU instances
(APU/RPU and PMU). All of these instances can access the
TLM world.The demo/debug-device is used to read out System-C time, output
debug trace/events and to end the simulation.The DMA is used to demonstrate the bus mastering capabilities of the
TLM world back into QEMU via remote-port.The timer is a minimalistic APB connected timer written in
verilog. If verilator is available, this timer can be hooked
into the simulation.
For TLM to be able to talk to the APB timer, a TLM-2-APB bridge
was written in System-C.BUILD
---------------------------------------
Before building you will need to ensure that you have SystemC and SCML
available.The demo was prepared assuming the following versions:
SystemC: 2.3.2The Makefile assumes that both are installed in the directories below:
SystemC: /usr/local/systemc-2.3.2/If you have them installed in different directories point the Makefile to the
correct directory by setting the variables SYSTEMC.You will also need to clone the libremote-port submodule, by running:
$ git submodule update --init libsystemctlm-socAlso make sure to have the header in the default search
directory list for your version of CPP (the header is required by the
pcie-model submodule). On a Ubuntu LTS system the header can be installed
through the `linux-libc-dev` packages.
$ sudo apt-get install linux-libc-devOnce everything is installed you can just run make. If SystemC is in
a different directory then mentioned about you will need to specify the
directory by setting the variables mentioned above.You can also configure the build by creating a .config.mk file.
There are other options that can be set, e.g:
HAVE_VERILOG=n
HAVE_VERILOG_VERILATOR=n
HAVE_VERILOG_VCS=nRUN
---------------------------------------
When running you will need to make sure the program can link to your
SystemC/TLM libraries. You will also need to give arguments to the application.
The first argument points to the QEMU machine-path to use. The second argument
is the icount value to use. The arguments should line up with the QEMU command
line arguments.A Versal example:
In one terminal, in the demo directory
LD_LIBRARY_PATH=/usr/local/systemc-2.3.2/lib-linux64/ ./versal_demo \
unix:/tmp/qemu/qemu-rport-_amba@0_cosim@0 10000A ZynqMP example:
In one terminal, in the demo directory
LD_LIBRARY_PATH=/usr/local/systemc-2.3.2/lib-linux64/ ./zynqmp_demo \
unix:./qemu-tmp/qemu-rport-_amba@0_cosim@0 10000A Zynq-7000 example:
LD_LIBRARY_PATH=/usr/local/systemc-2.3.2/lib-linux64/ ./zynq_demo \
unix:./qemu-tmp/qemu-rport-_cosim@0 1000000In another terminal you will need to start up the PS. In this case we are going
to start up a PetaLinux QEMU session and use the Linux kernel to probe the
SystemC side. You could also start up your own kernel with the required drivers
or a baremetal application.See here for instructions on how to start the PetaLinux QEMU session:
http://www.wiki.xilinx.com/Co-simulationIP-XACT DEMO
---------------------------------------
This repository also contains a demo where a QEMU / SystemC co-simulation
is automatically generated from an IP-XACT description. More information
about this demo and instructions for how to launch it manually can be
found inside the 'zynqmp_lmac2_ipxact_demo.txt' file.