xilinx / systemctlm-cosim-demo Goto Github PK
View Code? Open in Web Editor NEWQEMU libsystemctlm-soc co-simulation demos.
Home Page: https://xilinx-wiki.atlassian.net/wiki/spaces/A/pages/862421112/Co-simulation
License: Other
QEMU libsystemctlm-soc co-simulation demos.
Home Page: https://xilinx-wiki.atlassian.net/wiki/spaces/A/pages/862421112/Co-simulation
License: Other
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.2 The 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-soc Also make sure to have the <linux/pci_regs.h> 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-dev Once 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=n RUN --------------------------------------- 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 10000 A 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 10000 A Zynq-7000 example: LD_LIBRARY_PATH=/usr/local/systemc-2.3.2/lib-linux64/ ./zynq_demo \ unix:./qemu-tmp/qemu-rport-_cosim@0 1000000 In 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-simulation IP-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.
Hi,
I wondered if you can share your development platform. I use Ubuntu 18.04.6 VirtualBox VM but what do you using? I have some troubles and probably they are mainly because of the system itself.
Thanks.
Hi,
I am unable to compile this LMAC DEMO, can you help me here..what i am doing wrong.
First I compiled the demo with SystemC 2.3.1 it given errors, then i moved the SystemC library to 2.3.2 then build went ahead but it is throwing build errors.
g++ -Wall -O2 -g -MMD -I /usr/local/systemc-2.3.2//include/ -I . -I libsystemctlm-soc -I libsystemctlm-soc/zynq -I libsystemctlm-soc/zynqmp -I libsystemctlm-soc/libremote-port -DHAVE_VERILOG -DHAVE_VERILOG_VERILATOR -I obj_dir -I. -MMD -I/usr/share/verilator/include -I/usr/share/verilator/include/vltstd -DVL_PRINTF=printf -DVM_TRACE=0 -DVM_COVERAGE=0 -Wno-char-subscripts -Wno-parentheses-equality -Wno-sign-compare -Wno-uninitialized -Wno-unused-but-set-variable -Wno-unused-parameter -Wno-unused-variable -c -o zynqmp_lmac2_demo.o zynqmp_lmac2_demo.cc In file included from zynqmp_lmac2_demo.cc:46:0: libsystemctlm-soc/zynqmp/xilinx-zynqmp.h:23:2: warning: #warning "Deprecated file, please include soc/xilinx/zynqmp/xilinx-zynqmp.h" [-Wcpp] #warning "Deprecated file, please include soc/xilinx/zynqmp/xilinx-zynqmp.h" ^ In file included from zynqmp_lmac2_demo.cc:50:0: libsystemctlm-soc/tlm-bridges/axis2tlm-bridge.h: In instantiation of ‘void axis2tlm_bridge<DATA_WIDTH, USER_WIDTH>::axis_thread() [with int DATA_WIDTH = 64; int USER_WIDTH = 1]’: libsystemctlm-soc/tlm-bridges/axis2tlm-bridge.h:72:3: required from ‘axis2tlm_bridge<DATA_WIDTH, USER_WIDTH>::axis2tlm_bridge(sc_core::sc_module_name, bool) [with int DATA_WIDTH = 64; int USER_WIDTH = 1]’ zynqmp_lmac2_demo.cc:170:40: required from here libsystemctlm-soc/tlm-bridges/axis2tlm-bridge.h:142:6: error: could not convert ‘sc_dt::sc_proxy<X>::bit(int) const [with X = sc_dt::sc_bv_base](((int)i))’ from ‘sc_dt::sc_bitref_r<sc_dt::sc_bv_base>’ to ‘bool’ if (tstrb.read().bit(i)) { ^ libsystemctlm-soc/tlm-bridges/axis2tlm-bridge.h: In instantiation of ‘unsigned int axis2tlm_bridge<DATA_WIDTH, USER_WIDTH>::get_last_byte() [with int DATA_WIDTH = 64; int USER_WIDTH = 1]’: libsystemctlm-soc/tlm-bridges/axis2tlm-bridge.h:138:43: required from ‘void axis2tlm_bridge<DATA_WIDTH, USER_WIDTH>::axis_thread() [with int DATA_WIDTH = 64; int USER_WIDTH = 1]’ libsystemctlm-soc/tlm-bridges/axis2tlm-bridge.h:72:3: required from ‘axis2tlm_bridge<DATA_WIDTH, USER_WIDTH>::axis2tlm_bridge(sc_core::sc_module_name, bool) [with int DATA_WIDTH = 64; int USER_WIDTH = 1]’ zynqmp_lmac2_demo.cc:170:40: required from here libsystemctlm-soc/tlm-bridges/axis2tlm-bridge.h:85:4: error: could not convert ‘sc_dt::sc_proxy<X>::bit(int) const [with X = sc_dt::sc_bv_base](((int)i))’ from ‘sc_dt::sc_bitref_r<sc_dt::sc_bv_base>’ to ‘bool’ if (tstrb.read().bit(i)) { ^ cc1plus: warning: unrecognized command line option ‘-Wno-parentheses-equality’ <builtin>: recipe for target 'zynqmp_lmac2_demo.o' failed make: *** [zynqmp_lmac2_demo.o] Error 1
Hi,
I was following the Zynq 7000 demo and got this error. How should I solve this problem? My system is Ubuntu 18.04. Also I have tried almost all of the replies in other issues.
I followed:
Demo Setup
dad@u18:~/cosim/systemctlm-cosim-demo$ make zynq_demo
g++ -std=c++11 -Wall -O2 -g -MMD -I /home/dad/cosim//include/ -I . -I libsystemctlm-soc -I libsystemctlm-soc/soc/xilinx/zynq -I libsystemctlm-soc/soc/xilinx/zynqmp -I libsystemctlm-soc/soc/xilinx/versal/ -I libsystemctlm-soc/soc/xilinx/versal-net/ -I libsystemctlm-soc/tests/test-modules/ -I libsystemctlm-soc/libremote-port -DHAVE_VERILOG -DHAVE_VERILOG_VERILATOR -I obj_dir -DVM_TRACE=1 -I. -MMD -I/usr/share/verilator/include -I/usr/share/verilator/include/vltstd -DVL_PRINTF=printf -DVM_COVERAGE=0 -DVM_SC=1 -DVM_TRACE=1 -faligned-new -Wno-sign-compare -Wno-uninitialized -Wno-unused-but-set-variable -Wno-unused-parameter -Wno-unused-variable -Wno-shadow -I/home/dad/cosim//include/ -c -o libsystemctlm-soc/soc/dma/xilinx/mcdma/mcdma.o libsystemctlm-soc/soc/dma/xilinx/mcdma/mcdma.cc
In file included from libsystemctlm-soc/soc/dma/xilinx/mcdma/mcdma.h:26:0,
from libsystemctlm-soc/soc/dma/xilinx/mcdma/mcdma.cc:46:
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
};
^
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:604:1: sorry, unimplemented: non-trivial designated initializers not supported
libsystemctlm-soc/soc/dma/xilinx/mcdma/regs-mcdma.h:6
I have compiled the Linux kernel with the lmac2 Lewiz driver but it fails to boot. Kernel gets stuck at:
ledtrig-cpu: registered to indicate activity on CPUs
I have used the Rev1.0 DTB inside the /boot/dts/xilinx folder. Please let me know. Following is the command i have used for initializing QEMU: -
/home/users/ssalman/QEMU/2/qemu/build/aarch64-softmmu/qemu-system-aarch64 -M arm-generic-fdt -hw-dtb /home/users/ssalman/QEMU/2/qemu/build/qemu-devicetrees/LATEST/SINGLE_ARCH/zcu102-arm.cosim.dtb -machine-path /home/users/ssalman/Regressions/Reg1/ZYNQ_MP/machine-zynqmp -serial mon:stdio -display none -netdev user,id=net0 -netdev user,id=net1 -netdev user,id=net2 -netdev user,id=net3 -netdev user,id=net4 -net nic,model=cadence_gem,netdev=net0 -net nic,model=cadence_gem,netdev=net1 -net nic,model=cadence_gem,netdev=net2 -net nic,model=cadence_gem,netdev=net3 -device remote-port-net,rp-adaptor0=/amba@0/cosim@0,rp-chan0=256,rp-chan1=266,netdev=net4 -m 2G -machine linux=yes -kernel /home/users/ssalman/QEMU/Linux_LMAC2/linux_for_aarch64/arch/arm64/boot/Image -dtb /home/users/ssalman/QEMU/Linux_LMAC2/linux_for_aarch64/arch/arm64/boot/dts/xilinx/zynqmp-zcu102-rev1.0.dtb -append "rdinit=/sbin/init console=ttyPS0 earlycon=cdns,mmio,0xFF000000,115200n8 nr_cpus=1 cma=256MiB"
SystemC command is like this: -
SystemC/systemctlm-cosim-demo/zynqmp_lmac2_demo unix:/home/users/ssalman/Regressions/Reg1/ZYNQ_MP/machine-zynqmp/qemu-rport-_amba@0_cosim@0 1000000
And following is the boot sequence of the Linux kernel: -
[ 0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd034]
[ 0.000000] Linux version 5.8.0-123824-g8a88c94293e9 ([email protected]) (aarch64-none-linux-gnu-gcc (GNU Toolchain for the A-profile Architecture 10.3-2021.07 (arm-10.29)) 10.3.1 20210621, GNU ld (GNU Toolchain for the A-profile Architecture 10.3-2021.07 (arm-10.29)) 2.36.1.20210621) #23 SMP PREEMPT Fri Aug 5 14:39:59 PKT 2022
[ 0.000000] Machine model: ZynqMP ZCU102 Rev1.0
[ 0.000000] earlycon: cdns0 at MMIO 0x00000000ff000000 (options '115200n8')
[ 0.000000] printk: bootconsole [cdns0] enabled
[ 0.000000] efi: UEFI not found.
[ 0.000000] cma: Reserved 256 MiB at 0x0000000070000000
[ 0.000000] NUMA: No NUMA configuration found
[ 0.000000] NUMA: Faking a node at [mem 0x0000000000000000-0x000000007fffffff]
[ 0.000000] NUMA: NODE_DATA [mem 0x6fbde100-0x6fbdffff]
[ 0.000000] Zone ranges:
[ 0.000000] DMA [mem 0x0000000000000000-0x000000003fffffff]
[ 0.000000] DMA32 [mem 0x0000000040000000-0x000000007fffffff]
[ 0.000000] Normal empty
[ 0.000000] Movable zone start for each node
[ 0.000000] Early memory node ranges
[ 0.000000] node 0: [mem 0x0000000000000000-0x000000007fffffff]
[ 0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x000000007fffffff]
[ 0.000000] psci: probing for conduit method from DT.
[ 0.000000] psci: PSCIv0.2 detected in firmware.
[ 0.000000] psci: Using standard PSCI v0.2 function IDs
[ 0.000000] psci: Trusted OS migration not required
[ 0.000000] Number of cores (4) exceeds configured maximum of 1 - clipping
[ 0.000000] percpu: Embedded 23 pages/cpu s53912 r8192 d32104 u94208
[ 0.000000] Detected VIPT I-cache on CPU0
[ 0.000000] CPU features: detected: ARM erratum 845719
[ 0.000000] CPU features: detected: ARM erratum 843419
[ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 516096
[ 0.000000] Policy zone: DMA32
[ 0.000000] Kernel command line: rdinit=/sbin/init console=ttyPS0 earlycon=cdns,mmio,0xFF000000,115200n8 nr_cpus=1 cma=256MiB
[ 0.000000] Dentry cache hash table entries: 262144 (order: 9, 2097152 bytes, linear)
[ 0.000000] Inode-cache hash table entries: 131072 (order: 8, 1048576 bytes, linear)
[ 0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[ 0.000000] software IO TLB: mapped [mem 0x3bfff000-0x3ffff000] (64MB)
[ 0.000000] Memory: 1699220K/2097152K available (13884K kernel code, 2170K rwdata, 7436K rodata, 5568K init, 481K bss, 135788K reserved, 262144K cma-reserved)
[ 0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[ 0.000000] rcu: Preemptible hierarchical RCU implementation.
[ 0.000000] rcu: RCU event tracing is enabled.
[ 0.000000] rcu: RCU restricting CPUs from NR_CPUS=256 to nr_cpu_ids=1.
[ 0.000000] Trampoline variant of Tasks RCU enabled.
[ 0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 25 jiffies.
[ 0.000000] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=1
[ 0.000000] NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0
[ 0.000000] GIC: Adjusting CPU interface base to 0x00000000f902f000
[ 0.000000] GIC: Using split EOI/Deactivate mode
[ 0.000000] random: get_random_bytes called from start_kernel+0x310/0x4e4 with crng_init=0
[ 0.000000] arch_timer: cp15 timer(s) running at 62.50MHz (phys).
[ 0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x1cd42e208c, max_idle_ns: 881590405314 ns
[ 0.000264] sched_clock: 56 bits at 62MHz, resolution 16ns, wraps every 4398046511096ns
[ 0.026526] Console: colour dummy device 80x25
[ 0.034123] Calibrating delay loop (skipped), value calculated using timer frequency.. 125.00 BogoMIPS (lpj=250000)
[ 0.035022] pid_max: default: 32768 minimum: 301
[ 0.042204] LSM: Security Framework initializing
[ 0.044999] Mount-cache hash table entries: 4096 (order: 3, 32768 bytes, linear)
[ 0.045776] Mountpoint-cache hash table entries: 4096 (order: 3, 32768 bytes, linear)
[ 0.152632] rcu: Hierarchical SRCU implementation.
[ 0.171723] EFI services will not be available.
[ 0.176382] smp: Bringing up secondary CPUs ...
[ 0.176883] smp: Brought up 1 node, 1 CPU
[ 0.177064] SMP: Total of 1 processors activated.
[ 0.179523] CPU features: detected: 32-bit EL0 Support
[ 0.180030] CPU features: detected: CRC32 instructions
[ 0.180234] CPU features: detected: 32-bit EL1 Support
[ 0.778065] CPU: All CPU(s) started at EL2
[ 0.780014] alternatives: patching kernel code
[ 0.809877] devtmpfs: initialized
[ 0.856287] KASLR disabled due to lack of seed
[ 0.864759] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
[ 0.867176] futex hash table entries: 256 (order: 2, 16384 bytes, linear)
[ 0.889140] pinctrl core: initialized pinctrl subsystem
[ 0.914698] thermal_sys: Registered thermal governor 'step_wise'
[ 0.914830] thermal_sys: Registered thermal governor 'power_allocator'
[ 0.922356] DMI not present or invalid.
[ 0.948970] NET: Registered protocol family 16
[ 0.956737] DMA: preallocated 256 KiB GFP_KERNEL pool for atomic allocations
[ 0.957691] DMA: preallocated 256 KiB GFP_KERNEL|GFP_DMA pool for atomic allocations
[ 0.960030] DMA: preallocated 256 KiB GFP_KERNEL|GFP_DMA32 pool for atomic allocations
[ 0.962222] audit: initializing netlink subsys (disabled)
[ 0.975475] audit: type=2000 audit(0.744:1): state=initialized audit_enabled=0 res=1
[ 0.999351] cpuidle: using governor menu
[ 1.004445] hw-breakpoint: found 6 breakpoint and 4 watchpoint registers.
[ 1.008128] ASID allocator initialised with 65536 entries
[ 1.024896] Serial: AMBA PL011 UART driver
[ 1.191374] HugeTLB registered 1.00 GiB page size, pre-allocated 0 pages
[ 1.192158] HugeTLB registered 32.0 MiB page size, pre-allocated 0 pages
[ 1.193999] HugeTLB registered 2.00 MiB page size, pre-allocated 0 pages
[ 1.194188] HugeTLB registered 64.0 KiB page size, pre-allocated 0 pages
[ 1.241046] cryptd: max_cpu_qlen set to 1000
[ 1.289787] ACPI: Interpreter disabled.
[ 1.304856] iommu: Default domain type: Translated
[ 1.318352] vgaarb: loaded
[ 1.324251] SCSI subsystem initialized
[ 1.334738] usbcore: registered new interface driver usbfs
[ 1.335472] usbcore: registered new interface driver hub
[ 1.337876] usbcore: registered new device driver usb
[ 1.341082] pps_core: LinuxPPS API ver. 1 registered
[ 1.343301] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti [email protected]
[ 1.343835] PTP clock support registered
[ 1.348419] EDAC MC: Ver: 3.0.0
[ 1.365509] FPGA manager framework
[ 1.370287] Advanced Linux Sound Architecture Driver Initialized.
[ 1.406684] clocksource: Switched to clocksource arch_sys_counter
[ 1.419985] VFS: Disk quotas dquot_6.6.0
[ 1.420440] VFS: Dquot-cache hash table entries: 512 (order 0, 4096 bytes)
[ 1.428065] pnp: PnP ACPI: disabled
[ 1.506100] NET: Registered protocol family 2
[ 1.530699] tcp_listen_portaddr_hash hash table entries: 1024 (order: 2, 16384 bytes, linear)
[ 1.533674] TCP established hash table entries: 16384 (order: 5, 131072 bytes, linear)
[ 1.537238] TCP bind hash table entries: 16384 (order: 6, 262144 bytes, linear)
[ 1.540250] TCP: Hash tables configured (established 16384 bind 16384)
[ 1.549182] UDP hash table entries: 1024 (order: 3, 32768 bytes, linear)
[ 1.551347] UDP-Lite hash table entries: 1024 (order: 3, 32768 bytes, linear)
[ 1.559583] NET: Registered protocol family 1
[ 1.583086] RPC: Registered named UNIX socket transport module.
[ 1.583613] RPC: Registered udp transport module.
[ 1.583776] RPC: Registered tcp transport module.
[ 1.583930] RPC: Registered tcp NFSv4.1 backchannel transport module.
[ 1.586545] PCI: CLS 0 bytes, default 64
[ 1.609053] hw perfevents: enabled with armv8_pmuv3 PMU driver, 5 counters available
[ 1.611851] kvm [1]: IPA Size Limit: 40bits
[ 1.625497] kvm [1]: vgic interrupt IRQ1
[ 1.631432] kvm [1]: Hyp mode initialized successfully
[ 1.709029] Initialise system trusted keyrings
[ 1.716318] workingset: timestamp_bits=44 max_order=19 bucket_order=0
[ 1.768685] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[ 1.777966] NFS: Registering the id_resolver key type
[ 1.778811] Key type id_resolver registered
[ 1.778964] Key type id_legacy registered
[ 1.781048] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[ 1.783701] 9p: Installing v9fs 9p2000 file system support
[ 1.872033] Key type asymmetric registered
[ 1.872423] Asymmetric key parser 'x509' registered
[ 1.872874] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 245)
[ 1.874939] io scheduler mq-deadline registered
[ 1.875178] io scheduler kyber registered
[ 1.926023] EINJ: ACPI disabled.
[ 1.994970] Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled
[ 2.016789] SuperH (H)SCI(F) driver initialized
[ 2.020319] msm_serial: driver initialized
[ 2.110013] loop: module loaded
[ 2.115837] megasas: 07.714.04.00-rc1
[ 2.150579] libphy: Fixed MDIO Bus: probed
[ 2.156434] tun: Universal TUN/TAP device driver, 1.6
[ 2.167361] thunder_xcv, ver 1.0
[ 2.168187] thunder_bgx, ver 1.0
[ 2.170024] nicpf, ver 1.0
[ 2.178273] hclge is initializing
[ 2.179022] hns3: Hisilicon Ethernet Network Driver for Hip08 Family - version
[ 2.181474] hns3: Copyright (c) 2017 Huawei Corporation.
[ 2.184533] e1000: Intel(R) PRO/1000 Network Driver - version 7.3.21-k8-NAPI
[ 2.184790] e1000: Copyright (c) 1999-2006 Intel Corporation.
[ 2.185223] e1000e: Intel(R) PRO/1000 Network Driver - 3.2.6-k
[ 2.187327] e1000e: Copyright(c) 1999 - 2015 Intel Corporation.
[ 2.187916] igb: Intel(R) Gigabit Ethernet Network Driver - version 5.6.0-k
[ 2.190044] igb: Copyright (c) 2007-2014 Intel Corporation.
[ 2.190713] igbvf: Intel(R) Gigabit Virtual Function Network Driver - version 2.4.0-k
[ 2.193209] igbvf: Copyright (c) 2009 - 2012 Intel Corporation.
[ 2.196298] sky2: driver version 1.30
[ 2.200299] VFIO - User Level meta-driver version: 0.3
[ 2.212846] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[ 2.213197] ehci-pci: EHCI PCI platform driver
[ 2.213843] ehci-platform: EHCI generic platform driver
[ 2.216481] ehci-orion: EHCI orion driver
[ 2.218952] ehci-exynos: EHCI Exynos driver
[ 2.221024] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[ 2.221638] ohci-pci: OHCI PCI platform driver
[ 2.224131] ohci-platform: OHCI generic platform driver
[ 2.226625] ohci-exynos: OHCI Exynos driver
[ 2.233132] usbcore: registered new interface driver usb-storage
[ 2.250906] i2c /dev entries driver
[ 2.276048] CPUidle PSCI: Invalid PSCI power state 0x40000000
[ 2.278040] CPUidle PSCI: CPU 0 failed to PSCI idle
[ 2.281162] sdhci: Secure Digital Host Controller Interface driver
[ 2.282998] sdhci: Copyright(c) Pierre Ossman
[ 2.286139] Synopsys Designware Multimedia Card Interface Driver
[ 2.293937] sdhci-pltfm: SDHCI platform and OF driver helper
[ 2.308074] ledtrig-cpu: registered to indicate activity on CPUs
buildroot compile failed with (./utils/brmake):
2022-01-16T10:33:02 /usr/bin/make all-am
2022-01-16T10:33:02 CC gl_avltree_oset.o
2022-01-16T10:33:02 CC binary-io.o
2022-01-16T10:33:02 CC c-ctype.o
2022-01-16T10:33:02 CC c-stack.o
2022-01-16T10:33:02 CC c-strcasecmp.o
2022-01-16T10:33:02 CC clean-temp.o
2022-01-16T10:33:02 CC cloexec.o
2022-01-16T10:33:02 CC c-strncasecmp.o
2022-01-16T10:33:02 CC close-stream.o
2022-01-16T10:33:02 In file included from /usr/include/signal.h:328,
2022-01-16T10:33:02 from ./signal.h:52,
2022-01-16T10:33:02 from c-stack.c:49:
2022-01-16T10:33:02 c-stack.c:55:26: error: missing binary operator before token "("
2022-01-16T10:33:02 #elif HAVE_LIBSIGSEGV && SIGSTKSZ < 16384
2022-01-16T10:33:02 ^~~~~~~~
2022-01-16T10:33:02 CC closein.o
2022-01-16T10:33:02 CC closeout.o
2022-01-16T10:33:02 make[5]: *** [Makefile:1915: c-stack.o] Error 1
2022-01-16T10:33:02 make[5]: *** Waiting for unfinished jobs....
2022-01-16T10:33:02 make[4]: *** [Makefile:1674: all] Error 2
2022-01-16T10:33:02 make[3]: *** [Makefile:1572: all-recursive] Error 1
2022-01-16T10:33:02 make[2]: *** [Makefile:1528: all] Error 2
2022-01-16T10:33:02 make[1]: *** [package/pkg-generic.mk:250: /home/limingz/cosim/buildroot/output/build/host-m4-1.4.18/.stamp_built] Error 2
2022-01-16T10:33:02 make: *** [Makefile:84: _all] Error 2
Done in 53s (error code: 2)
The confluence page linked in the README regarding this Co-Simulation repo is no longer reachable as it is not behind an internal sign. I am not sure if this was intentional, but if so, it might be best to remove the link.
The repo hints at support for RISC-V in the file riscv_virt_lmac2_demo.cc, but there is no obvious way to reproduce the demo. What software stack, qemu repo, and qemu command line needs to be used to run the lmac demo with risc-v? The link referenced in the README requires prebuilt binaries, which is a concern and doesn't seem to line up? http://www.wiki.xilinx.com/QEMU+SystemC+and+TLM+CoSimulation
Would it be possible to document the side by side command by command terminal boot of the qemu/risc-v with the lmac cosim demo, as shown in the live demo within the README?
Hi,
I have a verilog module that have an AXI4 Lite slave interface and interrupt output. I will implement a kernel module for it to handle module's interrupts and reading its registers.
For the AXI part the demo may be helpful, but I could not find an example with interrupt.
Can you prepare a demo project that handles my case?
Thanks.
Hello Xilinx,
Now I use the Xilinx's QEMU platform (xilinx-v2016.3 tag) instead of PetaLinux. When I start this project on machine arm-generic-fdt-plnx everything is working properly. While I changes to the machine xilinx-zynq-a9, platform qemu does not stop and does not display the message:
QEMU waiting for connection on: Disconnected: unix: ./ qemu-tmp / qemu-rport-_cosim @ 0 server
Linux kernel is loaded instead of this:
Uncompressing Linux ... done, booting the kernel.
Any ideas why this happens?
Thanks,
Radek
Hi! It is a great demo and help me a lot, but I got some trouble .I am using ubuntu 20.4 to compile the demo, my gcc version is g++ (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0,I compile the demo just as the REAMDME .but when I compile the demo , it outputs:
g++ -L /home/stephenpd/Systemctlm-cosim-demo//cosim//lib-linux64 -L/home/stephenpd/Systemctlm-cosim-demo//cosim//lib-linux64 -o zynq_demo zynq_demo.o libsystemctlm-soc/libremote-port/safeio.o libsystemctlm-soc/libremote-port/remote-port-proto.o libsystemctlm-soc/libremote-port/remote-port-sk.o trace.o debugdev.o demo-dma.o xilinx-axidma.o libsystemctlm-soc/soc/xilinx/zynq/xilinx-zynq.o libsystemctlm-soc/soc/xilinx/zynqmp/xilinx-zynqmp.o libsystemctlm-soc/soc/xilinx/versal/xilinx-versal.o libsystemctlm-soc/soc/xilinx/versal-net/xilinx-versal-net.o libsystemctlm-soc/tests/test-modules/memory.o libsystemctlm-soc/libremote-port/remote-port-tlm.o libsystemctlm-soc/libremote-port/remote-port-tlm-memory-master.o libsystemctlm-soc/libremote-port/remote-port-tlm-memory-slave.o libsystemctlm-soc/libremote-port/remote-port-tlm-wires.o libsystemctlm-soc/libremote-port/remote-port-tlm-ats.o libsystemctlm-soc/libremote-port/remote-port-tlm-pci-ep.o libsystemctlm-soc/soc/pci/core/pci-device-base.o libsystemctlm-soc/soc/dma/xilinx/mcdma/mcdma.o libsystemctlm-soc/soc/net/ethernet/xilinx/mrmac/mrmac.o verilated_vcd_c.o verilated_vcd_sc.o obj_dir/verilated.o -pthread -lsystemc obj_dir/Vapb_timer__ALL.a obj_dir/Vaxilite_dev__ALL.a obj_dir/Vaxifull_dev__ALL.a
/usr/bin/ld: zynq_demo.o: in function _GLOBAL__sub_I__Z5usagev': /home/stephenpd/cosim//include/sysc/kernel/sc_ver.h:182: undefined reference to
sc_core::sc_api_version_2_3_3_cxx201103L<&sc_core::SC_DISABLE_VIRTUAL_BIND_UNDEFINED_>::sc_api_version_2_3_3_cxx201103L(sc_core::sc_writer_policy)'
/usr/bin/ld: trace.o: in function _GLOBAL__sub_I__Z5tracePN7sc_core13sc_trace_fileERKNS_9sc_moduleEPKc': /home/stephenpd/cosim//include/sysc/kernel/sc_ver.h:182: undefined reference to
sc_core::sc_api_version_2_3_3_cxx201103L<&sc_core::SC_DISABLE_VIRTUAL_BIND_UNDEFINED_>::sc_api_version_2_3_3_cxx201103L(sc_core::sc_writer_policy)'
/usr/bin/ld: debugdev.o: in function _GLOBAL__sub_I__ZN8debugdevC2EN7sc_core14sc_module_nameE': /home/stephenpd/cosim//include/sysc/kernel/sc_ver.h:182: undefined reference to
sc_core::sc_api_version_2_3_3_cxx201103L<&sc_core::SC_DISABLE_VIRTUAL_BIND_UNDEFINED_>::sc_api_version_2_3_3_cxx201103L(sc_core::sc_writer_policy)'
/usr/bin/ld: demo-dma.o: in function _GLOBAL__sub_I__ZN7demodmaC2EN7sc_core14sc_module_nameE': /home/stephenpd/cosim//include/sysc/kernel/sc_ver.h:182: undefined reference to
sc_core::sc_api_version_2_3_3_cxx201103L<&sc_core::SC_DISABLE_VIRTUAL_BIND_UNDEFINED_>::sc_api_version_2_3_3_cxx201103L(sc_core::sc_writer_policy)'
/usr/bin/ld: xilinx-axidma.o: in function _GLOBAL__sub_I__ZN11axidma_mm2sC2EN7sc_core14sc_module_nameEb': /home/stephenpd/cosim//include/sysc/kernel/sc_ver.h:182: undefined reference to
sc_core::sc_api_version_2_3_3_cxx201103L<&sc_core::SC_DISABLE_VIRTUAL_BIND_UNDEFINED_>::sc_api_version_2_3_3_cxx201103L(sc_core::sc_writer_policy)'
/usr/bin/ld: libsystemctlm-soc/soc/xilinx/zynq/xilinx-zynq.o:/home/stephenpd/cosim//include/sysc/kernel/sc_ver.h:182: more undefined references to sc_core::sc_api_version_2_3_3_cxx201103L<&sc_core::SC_DISABLE_VIRTUAL_BIND_UNDEFINED_>::sc_api_version_2_3_3_cxx201103L(sc_core::sc_writer_policy)' follow /usr/bin/ld: verilated_vcd_c.o: in function
VerilatedVcd::open(char const*)':
/usr/share/verilator/include/verilated_vcd_c.cpp:164: undefined reference to Verilated::flushCb(void (*)())' /usr/bin/ld: verilated_vcd_sc.o: in function
GLOBAL__sub_I__ZN14VerilatedVcdSc13write_commentERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE':
/home/stephenpd/cosim//include/sysc/kernel/sc_ver.h:182: undefined reference to `sc_core::sc_api_version_2_3_3_cxx201103L<&sc_core::SC_DISABLE_VIRTUAL_BIND_UNDEFINED>::sc_api_version_2_3_3_cxx201103L(sc_core::sc_writer_policy)'
collect2: error: ld returned 1 exit status
make: *** [Makefile:388: zynq_demo] Error 1
Can you help me?
Hi
I am testing with zu102 bsp 2017.3 version for ZynqMP.
Could you summarize petalinux, qemu, and BSP versions you tested ?
Thanks,
Dear,
This is the error I am encountering while make process.
I checked everything and think all are fine. But could find out the exact reseason for this
make
g++ -Wall -O2 -g -MMD -I /usr/local/systemc-2.3.2/ /include/ -I . -I libsystemctlm-soc -I libsystemctlm-soc/soc/xilinx/zynq -I libsystemctlm-soc/soc/xilinx/zynqmp -I libsystemctlm-soc/soc/xilinx/versal/ -I libsystemctlm-soc/tests/test-modules/ -I libsystemctlm-soc/libremote-port -c -o zynq_demo.o zynq_demo.cc
g++: error: /include/: No such file or directory
: recipe for target 'zynq_demo.o' failed
make: *** [zynq_demo.o] Error 1
When running riscv_virt_lmac2_demo, I encounter messages related to riscv_virt_lmac2_demo.
Info: (I702) default timescale unit used for tracing: 1 ps (trace.vcd)
I have explicitly set VM_TRACE=0 in the config.mk during compilation, but the issue persists.
How can I disable the tracing signal feature? The reason for disabling it is that the startup time is significantly slow.
The make install gets stuck at "indexed_value_if_registry.cc:119:80: error: use of ‘auto’ in lambda parameter declaration only available with ‘-std=c++14’ or ‘-std=gnu++14’"
Please let me know if anyone has been able to fix this to be able to use this demo. I have tried it on SystemC 2.3.3 and SystemC 2.3.2.
Hello, I am a member of a small undergraduate team that is currently working on a project to extend the documentation and support for this project. Ultimately, we hope to emulate a simulation data interface that would allow a developer to interact with a SystemC model to perform end-to-end modeling. We hope to make meaningful contributions to this repository and similar projects over the coming year and wanted to reach out to gain feedback on our proposed additions and identify areas that would be good additions/areas of improvement. Listed are a few initial ideas as we continue to learn the tools (we are all new to QEMU, SystemC TLM). Please feel free to leave any feedback, as we would like to build a strong foundation for our work on this project and our future contributions. Also, please let us know if there is another preferred method of collaboration (forum posts, maining list, support tickets, etc.).
Hello,
I have a problem running the ./zynqmp_demo.
My setup:
Ubuntu 20.04
systemc-2.3.3
petalinux 2021.2
xilinx-zcu102-v2021.2-final.bsp
qemu-devicetrees/LATEST/MULTI_ARCH/zcu102-arm.cosim.dtb
All works well apart from when the QEMU session it disconnects at the following;
Starting kernel ...
[ 0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd034]
[ 0.000000] Linux version 5.10.0-xilinx-v2021.2 (oe-user@oe-host) (aarch64-xilinx-linux-gcc (GCC) 10.2.0, GNU ld (GNU Binutils) 2.35.1) #1 SMP Tue Oct 12 09:30:57 UTC 2021
[ 0.000000] Machine model: ZynqMP ZCU102 Rev1.0
[ 0.000000] earlycon: cdns0 at MMIO 0x00000000ff000000 (options '115200n8')
[ 0.000000] printk: bootconsole [cdns0] enabled
[ 0.000000] efi: UEFI not found.
[ 0.000000] cma: Reserved 256 MiB at 0x000000006d800000
[ 0.000000] Zone ranges:
[ 0.000000] DMA32 [mem 0x0000000000000000-0x00000000ffffffff]
[ 0.000000] Normal [mem 0x0000000100000000-0x000000087fffffff]
[ 0.000000] Movable zone start for each node
[ 0.000000] Early memory node ranges
[ 0.000000] node 0: [mem 0x0000000000000000-0x000000007fefffff]
[ 0.000000] node 0: [mem 0x0000000800000000-0x000000087fffffff]
[ 0.000000] Zeroed struct page in unavailable ranges: 256 pages
[ 0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x000000087fffffff]
[ 0.000000] psci: probing for conduit method from DT.
[ 0.000000] psci: PSCIv1.1 detected in firmware.
[ 0.000000] psci: Using standard PSCI v0.2 function IDs
[ 0.000000] psci: MIGRATE_INFO_TYPE not supported.
[ 0.000000] psci: SMC Calling Convention v1.2
[ 0.000000] percpu: Embedded 22 pages/cpu s50968 r8192 d30952 u90112
[ 0.000000] Detected VIPT I-cache on CPU0
[ 0.000000] CPU features: detected: ARM erratum 845719
[ 0.000000] CPU features: detected: ARM erratum 843419
[ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 1031940
[ 0.000000] Kernel command line: earlycon console=ttyPS0,115200 clk_ignore_unused init_fatal_sh=1
[ 0.000000] Dentry cache hash table entries: 524288 (order: 10, 4194304 bytes, linear)
[ 0.000000] Inode-cache hash table entries: 262144 (order: 9, 2097152 bytes, linear)
[ 0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[ 0.000000] software IO TLB: mapped [mem 0x0000000069800000-0x000000006d800000] (64MB)
[ 0.000000] Memory: 3757972K/4193280K available (13952K kernel code, 982K rwdata, 3928K rodata, 2112K init, 586K bss, 173164K reserved, 262144K cma-reserved)
[ 0.000000] rcu: Hierarchical RCU implementation.
[ 0.000000] rcu: RCU event tracing is enabled.
[ 0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 25 jiffies.
[ 0.000000] NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0
[ 0.000000] GIC: Adjusting CPU interface base to 0x00000000f902f000
[ 0.000000] GIC: Using split EOI/Deactivate mode
[ 0.000000] irq-xilinx: mismatch in kind-of-intr param
[ 0.000000] irq-xilinx: /amba_pl@0/interrupt-controller@80020000: num_irq=32, sw_irq=0, edge=0x1
qemu-system-aarch64: /amba@0/cosim@0: Disconnected clk=3420459705 ns
qemu-system-microblazeel: /pmu@0: Disconnected clk=3433227568 ns
and on the systemc side
SystemC 2.3.3-Accellera --- Jan 18 2022 22:46:04
Copyright (c) 1996-2018 by all Contributors,
ALL RIGHTS RESERVED
Info: (I702) default timescale unit used for tracing: 1 ps (trace.vcd)
open socket
connect to ../zcu102_linux/tmp/qemu-rport-_amba@0_cosim@0
Error: /OSCI_TLM-2/simple_socket: top.simple_target_socket_1: no blocking transport callback registered
In file: convenience_socket_bases.cpp:42
In process: top.zynq.process @ 3250001006 ns
Any ideas what might be causing this?
Thanks
Hi,
The demo is really useful. I am using your socket libraries to run with simulation using Questa MTI (latest version - 2023).
I noticed that when there is no traffic from the Host/QEMU to simulation, the simulator blocks (hangs) at socket functions such as read/write/select, and it can not advance to the next simulation time slot and it stucks forever.
I have tried blocking and non-blocking socket, but I got the same issue.
I don't see this issue happens in VCS simulator.
Has anyone seen the same issue for Questa sim?
when i run a demo in systemctlm-cosim-demo and qemu, the problem is raise:
SystemC 2.3.2-Accellera --- Aug 4 2021 09:24:49
Copyright (c) 1996-2017 by all Contributors,
ALL RIGHTS RESERVED
Info: (I702) default timescale unit used for tracing: 1 ps (trace.vcd)
open socket
connect to /tmp/cosim/qemu-rport-_amba@0_cosim@0
Failed to connect to /tmp/cosim/qemu-rport-_amba@0_cosim@0, attempt to list
and my run demo command is
./zynq_demo unix:/tmp/cosim/qemu-rport-_amba@0_cosim@0 1000000
and run qemu command is
qemu-system-aarch64
-m 2G -smp 4 -accel tcg,tb-size=1280,thread=multi -M virt -cpu max
-bios /usr/share/qemu-efi-aarch64/QEMU_EFI.fd
-drive if=none,file=debian-10-openstack-arm64.qcow2,id=hd0 -device virtio-blk-device,drive=hd0
-device e1000,netdev=net0 -netdev user,id=net0,hostfwd=tcp:127.0.0.1:5556-:22
-nographic
-dtb virt.dtb
-hw-dtb ./zcu102-arm.cosim.dtb
-device loader,addr=0xfd1a0104,data=0x8000000e,data-len=4
-machine-path /tmp/cosim
-sync-quantum 1000000
-netdev user,id=net4
-device ioh3420,id=rootport,slot=0
-serial mon:stdio
how to solve the problem? thx
Hello,
Recently I had the opportunity to work on Zynq-7000 chip to evaluate this design platform for future projects.
One of my interest was the co-simulation environment using QEMU and SystemC/TLM for design exploration and HW/FW partitioning. Based on the demo you provide on GitHub, I managed to run a simple application with QEMU accessing to some memory mapped virtual components on the TLM side.
Now, I was used in the past to use Questa simulator for SystemC instead of the OSCI provided one. I tried to compile the same demo using Questa with success, however at the end I realized that Questa runs as a “master” simulator, meaning that it has to control its own simulation time. Thus, once QEMU is launched and connected to the TLM side the simulation is suck.
Indeed in the base demo, the OSCI simulator is a “slave” for the QEMU “master” simulator which controls the time step. I’m therefore wondering if there is a way to use the libsystemctlm-soc library such a manner that the external SystemC/TLM simulator manage the CPU clock increment of QEMU ? Thus, the run command from Questa would control the firmware execution and not the other way.
Best regards,
Vincent Lenoir
I tried to implement the whole tutorial with following steps. So far I was been able to connect the petalinux qemu with system c socket and I can boot the os in linux.
But I couldnot read the values of the IPs that was included in the hardware design by calling devmem command.
Could you guide me on emulating PL side ?
This was my pl.dtsi contents of the petalinux project : This memory addresses is giving wrong values in emulation.
/*
/ {
amba_pl: amba_pl {
#address-cells = <1>;
#size-cells = <1>;
compatible = "simple-bus";
ranges ;
apb_wrapper_policy_s_0: apb_wrapper_policy_server@43c00000 {
compatible = "xlnx,apb-wrapper-policy-server-1.0";
reg = <0x43c00000 0x10000>;
};
apb_wrapper_puf_0: apb_wrapper_puf@43c10000 {
compatible = "xlnx,apb-wrapper-puf-1.0";
reg = <0x43c10000 0x10000>;
};
apb_wrapper_rsa_0: apb_wrapper_rsa@43c20000 {
compatible = "xlnx,apb-wrapper-rsa-1.0";
reg = <0x43c20000 0x10000>;
};
apb_wrapper_trng_0: apb_wrapper_trng@43c30000 {
compatible = "xlnx,apb-wrapper-trng-1.0";
reg = <0x43c30000 0x10000>;
};
};
};
My question is if export the a soc design with several IP block and create a custom petalinux project, can I read the values of this PL side ?
Because do_dma_copy()
relies on regs.length
to be 0 in order to properly wait for the ev_dma_copy
event, it can cause a DMA transaction to happen on simulation start using random values since regs
is not initialized on construction. Is this intended behavior? Seems like they should be set to the reset values in the constructor, or at least zeroed out; adding memset(regs.u32, 0, sizeof(regs.u32))
to the constructor stops this nondeterministic behavior.
Hello,
I am trying to go through the systemctlm-cosim-demo using the zynq platform.
I have gone through the following steps:
When I execute petalinux-boot --qemu --kernel --qemu-args "-hw-dtb ./qemu_cosim/qemu_hw_system.dtb -machine-path ./qemu_cosim -icount 1 -sync-quantum 10000"
qemu appears to be executed and I get the message qemu-system-aarch64: info: QEMU waiting for connection on: disconnected:unix:./qemu_cosim/qemu-rport-_cosim@0,server
I then start the systemc example with LD_LIBRARY_PATH=/home/tools/systemc/SystemC-2.3.3/lib-linux64 ./zynq_demo unix:/home/jon/work/xilinx/petalinux/test/qemu_cosim/qemu-rport-_cosim@0 10000
. I modified the systemc to print out a message each second of simulation time. Simulation time progresses on the systemc side. On the qemu side I get a message which is the first message I see when booting qemu without the remoteport.dtsi included. qemu-system-aarch64: warning: hub 0 is not connected to host network
. No messages from qemu after that.
When I kill the systemc simulation I get the following from qemu, qemu-system-aarch64: /cosim@0: Disconnected clk=74225145930 ns
. The time varies depending on how long I have let it run, but no other messages.
Any suggestions on what might be causing qemu to hang?
Thanks,
Jon
While trying to run Xilinx QDMA virtual prototype demo according to https://github.com/Xilinx/systemctlm-cosim-demo/blob/master/pcie/versal/cpm-qdma-demos.md the host kernel panics during data transfer.
Tried systemC 2.3.3 and 2.3.4, tried QDMA drivers 2022.1, 2022.2 and the actual master branch.
ubuntu@ubuntu:~/dma_ip_drivers/QDMA/linux-kernel$ sudo su
root@ubuntu:/home/ubuntu/dma_ip_drivers/QDMA/linux-kernel# insmod ./bin/qdma-pf.ko
root@ubuntu:/home/ubuntu/dma_ip_drivers/QDMA/linux-kernel# echo 1 > /sys/bus/pci/devices/0000:02:00.0/qdma/qmax
root@ubuntu:/home/ubuntu/dma_ip_drivers/QDMA/linux-kernel# ./bin/dma-ctl qdma02000 q add idx 0 mode mm dir h2c
qdma02000-MM-0 H2C added.
Added 1 Queues.
root@ubuntu:/home/ubuntu/dma_ip_drivers/QDMA/linux-kernel# ./bin/dma-ctl qdma02000 q start idx 0 dir h2c aperture
_sz 4096
dma-ctl: Info: Default ring size set to 2048
1 Queues started, idx 0 ~ 0.
root@ubuntu:/home/ubuntu/dma_ip_drivers/QDMA/linux-kernel# ./bin/dma-to-device -d /dev/qdma02000-MM-0 -f /home/ub
untu/test.pdi -s 1024 -a 0x102100000
[ 113.670121] qdma_cpm4_init_ctxt_memory: clearing the context for all qs
[ 134.043645] invalid opcode: 0000 [#1] SMP PTI
[ 134.046907] CPU: 0 PID: 0 Comm: swapper/0 Tainted: G OE 5.4.0-64-generic #72-Ubuntu
[ 134.049231] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.16.0-0-gd239552ce722-prebuilt.qemu.
org 04/01/2014
[ 134.052543] RIP: 0010:rdtsc_gettime+0x9/0x20 [qdma_pf]
[ 134.054086] Code: c0 48 c7 c6 38 b9 5f c0 41 54 48 c7 c7 d0 37 63 c0 6a 08 50 e8 38 81 fa f7 48 83 c4 28 eb b6
66 90 0f 1f 44 00 00 55 48 89 e5 <0f> 01 f9 48 c1 e2 20 89 c0 5d 48 09 d0 c3 66 0f 1f 84 00 00 00 00
[ 134.059523] RSP: 0018:ffffb59b00003e90 EFLAGS: 00010086
[ 134.061434] RAX: ffffffffc05a6670 RBX: ffff8a01b45f9580 RCX: 0000000000000007
[ 134.063749] RDX: ffff8a01b7b82800 RSI: 0000000000000022 RDI: 0000000000000002
[ 134.065899] RBP: ffffb59b00003e90 R08: 0000000000000022 R09: 0000000004315776
[ 134.068259] R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000022
[ 134.070587] R13: ffff8a01b7b82800 R14: 0000000000000002 R15: 0000000000000000
[ 134.073159] FS: 0000000000000000(0000) GS:ffff8a01bba00000(0000) knlGS:0000000000000000
[ 134.075709] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 134.077704] CR2: 00007ffd806d3000 CR3: 000000016431c000 CR4: 00000000000006f0
[ 134.081106] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[ 134.084290] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
[ 134.087165] Call Trace:
[ 134.088269]
[ 134.089260] data_intr_handler+0x29/0x4d0 [qdma_pf]
[ 134.091228] irq_bottom+0x54/0x70 [qdma_pf]
[ 134.093020] __handle_irq_event_percpu+0x42/0x180
[ 134.095068] handle_irq_event_percpu+0x33/0x80
[ 134.096873] handle_irq_event+0x3b/0x5a
[ 134.098605] handle_edge_irq+0x93/0x1c0
[ 134.100300] do_IRQ+0x55/0xf0
[ 134.101536] common_interrupt+0xf/0xf
[ 134.103076]
[ 134.104404] RIP: 0010:native_safe_halt+0xe/0x10
[ 134.106399] Code: 7b ff ff ff eb bd 90 90 90 90 90 90 e9 07 00 00 00 0f 00 2d b6 ff 52 00 f4 c3 66 90 e9 07 00
00 00 0f 00 2d a6 ff 52 00 fb f4 90 0f 1f 44 00 00 55 48 89 e5 41 55 41 54 53 e8 dd d1 64 ff 65
[ 134.114440] RSP: 0018:ffffffffb9603e18 EFLAGS: 00000246 ORIG_RAX: ffffffffffffffd8
[ 134.117780] RAX: ffffffffb8adb380 RBX: 0000000000000000 RCX: 0000000000000001
[ 134.120914] RDX: 000000000000a21e RSI: 0000000000000087 RDI: 0000000000000000
[ 134.124160] RBP: ffffffffb9603e38 R08: 0000001f468157b9 R09: 0000000000000200
[ 134.126435] R10: 0000000000000000 R11: 0000000000000001 R12: 0000000000000000
[ 134.128732] R13: ffffffffb9613780 R14: 0000000000000000 R15: 0000000000000000
[ 134.130879] ? _cpuidle_text_start+0x8/0x8
[ 134.132229] ? tick_nohz_idle_stop_tick+0x13c/0x290
[ 134.133982] ? default_idle+0x20/0x140
[ 134.135345] arch_cpu_idle+0x15/0x20
[ 134.136651] default_idle_call+0x23/0x30
[ 134.138105] do_idle+0x1fb/0x270
[ 134.139306] cpu_startup_entry+0x20/0x30
[ 134.140656] rest_init+0xae/0xb0
[ 134.141871] arch_call_rest_init+0xe/0x1b
[ 134.143298] start_kernel+0x549/0x56a
[ 134.144877] x86_64_start_reservations+0x24/0x26
[ 134.146594] x86_64_start_kernel+0x75/0x79
[ 134.148860] secondary_startup_64+0xa4/0xb0
[ 134.150388] Modules linked in: qdma_pf(OE) isofs nls_iso8859_1 dm_multipath scsi_dh_rdac scsi_dh_emc scsi_dh_a
lua binfmt_misc ppdev joydev input_leds serio_raw parport_pc parport sch_fq_codel msr efi_pstore drm ip_tables x
tables autofs4 btrfs zstd_compress raid10 raid456 async_raid6_recov async_memcpy async_pq async_xor async_tx xor
raid6_pq libcrc32c raid1 raid0 multipath linear virtio_net net_failover psmouse ahci libahci failover
[ 134.162276] ---[ end trace 06e1b0a595a9f195 ]---
[ 134.164163] RIP: 0010:rdtsc_gettime+0x9/0x20 [qdma_pf]
[ 134.166309] Code: c0 48 c7 c6 38 b9 5f c0 41 54 48 c7 c7 d0 37 63 c0 6a 08 50 e8 38 81 fa f7 48 83 c4 28 eb b6
66 90 0f 1f 44 00 00 55 48 89 e5 <0f> 01 f9 48 c1 e2 20 89 c0 5d 48 09 d0 c3 66 0f 1f 84 00 00 00 00
[ 134.174094] RSP: 0018:ffffb59b00003e90 EFLAGS: 00010086
[ 134.175627] RAX: ffffffffc05a6670 RBX: ffff8a01b45f9580 RCX: 0000000000000007
[ 134.177708] RDX: ffff8a01b7b82800 RSI: 0000000000000022 RDI: 0000000000000002
[ 134.179721] RBP: ffffb59b00003e90 R08: 0000000000000022 R09: 0000000004315776
[ 134.181986] R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000022
[ 134.184719] R13: ffff8a01b7b82800 R14: 0000000000000002 R15: 0000000000000000
[ 134.187176] FS: 0000000000000000(0000) GS:ffff8a01bba00000(0000) knlGS:0000000000000000
[ 134.190059] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 134.192044] CR2: 00007ffd806d3000 CR3: 000000016431c000 CR4: 00000000000006f0
[ 134.194864] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[ 134.197044] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
[ 134.199043] Kernel panic - not syncing: Fatal exception in interrupt
[ 134.200997] Kernel Offset: 0x37000000 from 0xffffffff81000000 (relocation range: 0xffffffff80000000-0xffffffff
bfffffff)
[ 134.204291] ---[ end Kernel panic - not syncing: Fatal exception in interrupt ]---
KVM: injection failed, MSI lost (Operation not permitted)
KVM: injection failed, MSI lost (Operation not permitted)
While running dma-to-device with strace the same crash occurs right after write system call to driver
root@ubuntu:/home/ubuntu/dma_ip_drivers/QDMA/linux-kernel# strace ./bin/dma-to-device -d /dev/qdma02000-MM-0 -f /home/ubuntu/test.pdi -s 1024 -a 0x102100000
execve("./bin/dma-to-device", ["./bin/dma-to-device", "-d", "/dev/qdma02000-MM-0", "-f", "/home/ubuntu/test.pdi", "-s", "1024", "-a", "0x102100000"], 0x7ffe5a344860 /* 19 vars /) = 0
brk(NULL) = 0x5558ce021000
arch_prctl(0x3001 / ARCH_??? */, 0x7ffee71cbe80) = -1 EINVAL (Invalid argument)
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=28385, ...}) = 0
mmap(NULL, 28385, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f5ec24f1000
close(3) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\300A\2\0\0\0\0\0"..., 832) = 832
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
pread64(3, "\4\0\0\0\20\0\0\0\5\0\0\0GNU\0\2\0\0\300\4\0\0\0\3\0\0\0\0\0\0\0", 32, 848) = 32
pread64(3, "\4\0\0\0\24\0\0\0\3\0\0\0GNU\0\30x\346\264ur\f|Q\226\236i\253-'o"..., 68, 880) = 68
fstat(3, {st_mode=S_IFREG|0755, st_size=2029592, ...}) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f5ec24ef000
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
pread64(3, "\4\0\0\0\20\0\0\0\5\0\0\0GNU\0\2\0\0\300\4\0\0\0\3\0\0\0\0\0\0\0", 32, 848) = 32
pread64(3, "\4\0\0\0\24\0\0\0\3\0\0\0GNU\0\30x\346\264ur\f|Q\226\236i\253-'o"..., 68, 880) = 68
mmap(NULL, 2037344, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f5ec22fd000
mmap(0x7f5ec231f000, 1540096, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x22000) = 0x7f5ec231f000
mmap(0x7f5ec2497000, 319488, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x19a000) = 0x7f5ec2497000
mmap(0x7f5ec24e5000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1e7000) = 0x7f5ec24e5000
mmap(0x7f5ec24eb000, 13920, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f5ec24eb000
close(3) = 0
arch_prctl(ARCH_SET_FS, 0x7f5ec24f0580) = 0
mprotect(0x7f5ec24e5000, 16384, PROT_READ) = 0
mprotect(0x5558cc4cd000, 4096, PROT_READ) = 0
mprotect(0x7f5ec2525000, 4096, PROT_READ) = 0
munmap(0x7f5ec24f1000, 28385) = 0
brk(NULL) = 0x5558ce021000
brk(0x5558ce042000) = 0x5558ce042000
openat(AT_FDCWD, "/dev/qdma02000-MM-0", O_RDWR) = 3
openat(AT_FDCWD, "/home/ubuntu/test.pdi", O_RDONLY) = 4
read(4, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 1024) = 1024
lseek(3, 4329570304, SEEK_SET) = 4329570304
write(3, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 1024[ 313.919727] invalid opcode: 0000 [#1] SMP PTI
[ 313.921001] CPU: 0 PID: 0 Comm: swapper/0 Tainted: G OE 5.4.0-64-generic #72-Ubuntu
[ 313.923404] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.16.0-0-gd239552ce722-prebuilt.qemu.org 04/01/2014
[ 313.926590] RIP: 0010:rdtsc_gettime+0x9/0x20 [qdma_pf]
[ 313.928253] Code: c0 48 c7 c6 38 a9 77 c0 41 54 48 c7 c7 d0 27 7b c0 6a 08 50 e8 38 91 02 c9 48 83 c4 28 eb b6 66 90 0f 1f 44 00 00 55 48 89 e5 <0f> 01 f9 48 c1 e2 20 89 c0 5d 48 09 d0 c3 66 0f 1f 84 00 00 00 00
Hello all,
I'm trying to run a demo step by step based on https://github.com/Xilinx/systemctlm-cosim-demo/blob/master/docs/zynq-7000-getting-started-guide.md
The last step: Running the Demo
open first shells ( wsl : ubuntu 18.04 )
and run with command :
>> LD_LIBRARY_PATH=/mnt/d/0_Working/Projects/QEMU/cosim/systemc-2.3.2/lib-linux64/ /mnt/d/0_Working/Projects/QEMU/cosim/systemctlm-cosim-demo/zynq_demo unix:/mnt/d/0_Working/Projects/QEMU/cosim/buildroot/handles/qemu-rport-_cosim@0 1000000
SystemC 2.3.2-Accellera --- Dec 28 2021 08:38:45
Copyright (c) 1996-2017 by all Contributors,
ALL RIGHTS RESERVED
Info: (I702) default timescale unit used for tracing: 1 ps (trace.vcd)
open socket
connect to /mnt/d/0_Working/Projects/QEMU/cosim/buildroot/handles/qemu-rport-_cosim@0
Failed to connect to /mnt/d/0_Working/Projects/QEMU/cosim/buildroot/handles/qemu-rport-_cosim@0, attempt to listen
unix:/mnt/d/0_Working/Projects/QEMU/cosim/buildroot/handles/qemu-rport-_cosim@0: Operation not supported
Fatal: Remote-port: Failed to create remote-port socket connection!
In file: libsystemctlm-soc/libremote-port/remote-port-tlm.cc:267
In process: top.zynq.process @ 1 us
Info: (I99) simulation aborted
Aborted
In the folder : cosim/buildroot/handles . It empty.
How to fix the issue? Thank you
@Mluckydwyer I have run the demo on this https://github.com/Xilinx/systemctlm-cosim-demo/blob/master/docs/zynq-7000-getting-started-guide.md and was getting some value in shell using the devmem 0x40000000. I am not sure about the result but the hex value was increasing. Can you pls help me to replace with my custom soc ? I copied the image and necessary files in buildroot/output/images folder but my devmem of custom PL blocks was not working. Whenever I tried devmem it gives text "decode error !" in the other shell.
Dear all,
My aim is to write a Kernel Device Driver that allows to do operations when an IRQ is sent by the debug module.
In zynq_demo.cc the debug module's IRQ port is binded with the IRQ port of the zynq module : debug.irq(zynq.pl2ps_irq[0]);
. I found that the IRQ signals are set into rp_wires_in.wires_in
(rp_wires_in.wires_in[i]((pl2ps_irq[i])
) members of the xilinx_zynq
class.
After studying the Device Tree Source of remote ports of the zynq-7000 zynq-pl-remoteport.dtsi
I found that the rp_wires_in@0
node corresponds to the rp_wires_in.wires_in[i]
of the xilinw_zynq class
. In the rp_wires_in@0
node there are the following interrupts :
wires_in: rp_wires_in@0 {
compatible = "remote-port-gpio";
remote-ports = < &cosim_rp_0 9 >;
num-gpios = < 16 >;
/* QEMU has a bug in the interrupts-extended parsing,
* so we need to use interrupt-parent for the moment.
*/
interrupts = <
0x0 29 0x4
0x0 30 0x4
0x0 31 0x4
0x0 32 0x4
0x0 33 0x4
0x0 34 0x4
0x0 35 0x4
0x0 36 0x4
0x0 52 0x4
0x0 53 0x4
0x0 54 0x4
0x0 55 0x4
0x0 56 0x4
0x0 57 0x4
0x0 58 0x4
0x0 59 0x4
>;
I guess that the interruption 29 (0x0 29 0x4
) corresponds to the first IRQ of the zynq module debug.irq(zynq.pl2ps_irq[0])
.
In my Kernel Device Driver (test_irq) when I initialize the driver I use the request_irq function to subscribe to the IRQ 29 :
// Device Name
#define DEV_NAME "test_irq"
// Interrupt Request number
#define IRQ_NO 29
//Interrupt handler for IRQ 29.
static irqreturn_t irq_handler(int irq, void *dev_id)
{
printk(KERN_INFO "[test_irq] Shared IRQ: Interrupt Occurred");
return IRQ_HANDLED;
}
int init_module(void)
{
int result,
result = request_irq(IRQ_NO, irq_handler, IRQF_SHARED, DEV_NAME, (void *)(irq_handler));
if(result != 0){
printk(KERN_INFO "[test_irq] my_device: cannot register IRQ : %d", IRQ_NO);
free_irq(IRQ_NO,(void *)(irq_handler));
}
else
{
printk(KERN_INFO "[test_irq] Request for IRQ : %d is done", IRQ_NO);
}
....
}
After loading the module isnmod test_irq.ko
I have the follwong error :
[ 29.701116] [test_irq] Loading test_irq
[ 29.701227] [test_irq] Loaded test_irq 503
[ 29.701282] genirq: Flags mismatch irq 29. 00000084 (test_irq) vs. 00000004 (f8003000.dmac)
[ 29.701448] [test_irq] my_device: cannot register IRQ : 29
[ 29.701448] ------------[ cut here ]------------
[ 29.701614] WARNING: CPU: 1 PID: 376 at kernel/irq/manage.c:1707 __free_irq+0xbc/0x37c
[ 29.701725] Trying to free already-free IRQ 29
[ 29.701780] Modules linked in: test_irq(O+) dev_benchmark_ps(O) set_cpufreq(O) dev_sha_512_IP(O) dev_sha_256_IP(O) dev_debug_IP(O) dev_PM_v2(O) dev_OPP_Release(O) dev_OPP_Init(O)
[ 29.702057] CPU: 1 PID: 376 Comm: insmod Tainted: G O 5.5.0-rc5-76821-g52a3cadbb252 #5
[ 29.702222] Hardware name: Xilinx Zynq Platform
[ 29.702333] [<c03129c8>] (unwind_backtrace) from [<c030cb58>] (show_stack+0x10/0x14)
[ 29.702444] [<c030cb58>] (show_stack) from [<c0ed5e4c>] (dump_stack+0xc0/0xd4)
[ 29.702610] [<c0ed5e4c>] (dump_stack) from [<c0347c38>] (__warn+0xd0/0xf8)
[ 29.702720] [<c0347c38>] (__warn) from [<c0348018>] (warn_slowpath_fmt+0x98/0xbc)
[ 29.702886] [<c0348018>] (warn_slowpath_fmt) from [<c039f5c4>] (__free_irq+0xbc/0x37c)
[ 29.703052] [<c039f5c4>] (__free_irq) from [<c039f904>] (free_irq+0x38/0x9c)
[ 29.703218] [<c039f904>] (free_irq) from [<bf03624c>] (init_module+0xb4/0xd4 [test_irq])
[ 29.703384] [<bf03624c>] (init_module [test_irq]) from [<c0302e08>] (do_one_initcall+0x50/0x234)
[ 29.703550] [<c0302e08>] (do_one_initcall) from [<c03dbc18>] (do_init_module+0x60/0x234)
[ 29.703660] [<c03dbc18>] (do_init_module) from [<c03de048>] (load_module+0x21d4/0x24c8)
[ 29.703826] [<c03de048>] (load_module) from [<c03de4a0>] (sys_init_module+0x164/0x1a4)
[ 29.703992] [<c03de4a0>] (sys_init_module) from [<c0301000>] (ret_fast_syscall+0x0/0x54)
[ 29.704103] Exception stack(0xd78f9fa8 to 0xd78f9ff0)
[ 29.704213] 9fa0: 0000187c beaffefa 000bb058 0000187c 000bb008 000b8c7c
[ 29.704379] 9fc0: 0000187c beaffefa 000001b9 00000080 beaffefa 00000002 000b8cc8 00000000
[ 29.704490] 9fe0: beaffc28 beaffc18 00022554 b6dfc990
[ 29.704600] ---[ end trace 61d553a6b9deff67 ]---
[ 29.704766] do_init_module: 'test_irq'->init suspiciously returned 503, it should follow 0/-E convention
[ 29.704766] do_init_module: loading module anyway...
[ 29.704932] CPU: 1 PID: 376 Comm: insmod Tainted: G W O 5.5.0-rc5-76821-g52a3cadbb252 #5
[ 29.705098] Hardware name: Xilinx Zynq Platform
[ 29.705209] [<c03129c8>] (unwind_backtrace) from [<c030cb58>] (show_stack+0x10/0x14)
[ 29.705319] [<c030cb58>] (show_stack) from [<c0ed5e4c>] (dump_stack+0xc0/0xd4)
[ 29.705485] [<c0ed5e4c>] (dump_stack) from [<c03dbdd4>] (do_init_module+0x21c/0x234)
[ 29.705651] [<c03dbdd4>] (do_init_module) from [<c03de048>] (load_module+0x21d4/0x24c8)
[ 29.705761] [<c03de048>] (load_module) from [<c03de4a0>] (sys_init_module+0x164/0x1a4)
[ 29.705927] [<c03de4a0>] (sys_init_module) from [<c0301000>] (ret_fast_syscall+0x0/0x54)
[ 29.706038] Exception stack(0xd78f9fa8 to 0xd78f9ff0)
[ 29.706149] 9fa0: 0000187c beaffefa 000bb058 0000187c 000bb008 000b8c7c
[ 29.706314] 9fc0: 0000187c beaffefa 000001b9 00000080 beaffefa 00000002 000b8cc8 00000000
[ 29.706480] 9fe0: beaffc28 beaffc18 00022554 b6dfc990
The most surprising line of this error is:
[ 29.701282] genirq: Flags mismatch irq 29. 00000084 (test_irq) vs. 00000004 (f8003000.dmac)
that tells us that the f8003000.dmac requiers the IRQ (an the IRQ is not shared), that is quiet strange because in the Device Tree Source in the dmac node the IRQ 29 is not declared:
&dmac_s {
#interrupt-cells = <1>;
interrupt-map-mask = <0 0 0 0>;
interrupt-map = <0 0 0 &rp_cosim_intr_pstopl 0 28 4>, <0 0 0 &intc 0 13 4>,
<0 0 0 &rp_cosim_intr_pstopl 0 20 4>, <0 0 0 &intc 0 14 4>,
<0 0 0 &rp_cosim_intr_pstopl 0 21 4>, <0 0 0 &intc 0 15 4>,
<0 0 0 &rp_cosim_intr_pstopl 0 22 4>, <0 0 0 &intc 0 16 4>,
<0 0 0 &rp_cosim_intr_pstopl 0 23 4>, <0 0 0 &intc 0 17 4>,
<0 0 0 &rp_cosim_intr_pstopl 0 24 4>, <0 0 0 &intc 0 40 4>,
<0 0 0 &rp_cosim_intr_pstopl 0 25 4>, <0 0 0 &intc 0 41 4>,
<0 0 0 &rp_cosim_intr_pstopl 0 26 4>, <0 0 0 &intc 0 42 4>,
<0 0 0 &rp_cosim_intr_pstopl 0 27 4>, <0 0 0 &intc 0 43 4>;
};
After this error I declared a new IRQ (37) in the node rp_wires_in@0
so IRQ 37 corresponds to debug.irq(zynq.pl2ps_irq[8])
if I'm not wrong? After loading the module I have no error.
In the /proc/interrupts
I can see that my module test_irq
has been subscribed to the IRQ 37 as we can see the log of cat /proc/interrupts
:
CPU0 CPU1
16: 0 0 GIC-0 43 Level ttc_clockevent
17: 19706 20537 GIC-0 29 Edge twd
18: 0 0 GIC-0 37 Level arm-pmu
19: 0 0 GIC-0 38 Level arm-pmu
20: 43 0 GIC-0 39 Level f8007100.adc
24: 352 0 GIC-0 82 Level xuartps
26: 9 0 GIC-0 54 Level eth0
27: 0 0 GIC-0 56 Level mmc0
28: 0 0 GIC-0 45 Level f8003000.dmac
29: 0 0 GIC-0 46 Level f8003000.dmac
30: 0 0 GIC-0 47 Level f8003000.dmac
31: 0 0 GIC-0 48 Level f8003000.dmac
32: 0 0 GIC-0 49 Level f8003000.dmac
33: 0 0 GIC-0 72 Level f8003000.dmac
34: 0 0 GIC-0 73 Level f8003000.dmac
35: 0 0 GIC-0 74 Level f8003000.dmac
36: 0 0 GIC-0 75 Level f8003000.dmac
37: 0 0 GIC-0 40 Level test_irq
IPI0: 0 0 CPU wakeup interrupts
IPI1: 0 0 Timer broadcast interrupts
IPI2: 2362 3824 Rescheduling interrupts
IPI3: 57 49 Function call interrupts
IPI4: 0 0 CPU stop interrupts
IPI5: 2144 5829 IRQ work interrupts
IPI6: 0 0 completion interrupts
Err: 0
The device test_irq is subscribed to IRQ 37, when the debug module writes on its irq port (irq.write(1);
) the device irq_handler
function should be called to print the message: [test_irq] Shared IRQ: Interrupt Occurred, but the irq_handler
function is not called.
Do you have any idea, how to solve this problem ? Maybe I should use offsets between the IRQs of dmac_s
and rp_wires_in
? Or is it an issue of QEMU ?
Thank You,
Best Regards
Roland
Hi Folks,
I enabled VERILOG and VERILATOR option in Makefile, and the co-simulation looks fine.
I run a baremetal program which writes data to APB timer at RTL side. From the waveform of apb timer, I can see the expected actions.
However, I have enabled "--trace" during verilator compilation, but I don't know how to enable "--trace" during runtime, this will make waveform only contains info of I/O ports of each module, no internal signal.
This is the runtime command I'm using
./zynqmp_demo unix:/tmp/cosim/qemu-rport-_amba@0_cosim@0 1000000
And this doesn't work
./zynqmp_demo --trace unix:/tmp/cosim/qemu-rport-_amba@0_cosim@0 1000000
Hello.
I am trying to run the co-simulation demo but QEMU hangs after connection from the demo.
Running in QEMU before the device tree import works fine, with the new device tree QEMU does indeed wait for a connection from SystemC (through remote port) as expected.
petalinux-boot --qemu --kernel --dtb ./system.dtb --qemu-args "-machine-path ./qemu-tmp -icount 1 -sync-quantum 1000"
INFO: sourcing build tools
INFO: The image provided is a zImage
INFO: Set QEMU tftp to /opt/pkg/projects/zynq_project/images/linux
INFO: TCP PORT is free
INFO: Starting arm QEMU
INFO: qemu-system-aarch64 -M arm-generic-fdt-7series -machine linux=on -serial mon:stdio -serial /dev/null -display none -kernel /opt/pkg/projects/zynq_project/build/qemu_image.elf -gdb tcp::9000 -dtb ./system.dtb -net nic,netdev=eth0 -netdev user,id=eth0,tftp=/opt/pkg/projects/zynq_project/images/linux -net nic -device loader,addr=0xf8000008,data=0xDF0D,data-len=4 -device loader,addr=0xf8000140,data=0x00500801,data-len=4 -device loader,addr=0xf800012c,data=0x1ed044d,data-len=4 -device loader,addr=0xf8000108,data=0x0001e008,data-len=4 -device loader,addr=0xF8000910,data=0xF,data-len=0x4 -machine-path ./qemu-tmp -icount 1 -sync-quantum 10000
qemu-system-aarch64: Failed to connect socket ./qemu-tmp/qemu-rport-_cosim@0: Connection refused
qemu-system-aarch64: info: QEMU waiting for connection on: disconnected:unix:./qemu-tmp/qemu-rport-_cosim@0,server
Then I launch the zynq_demo :
LD_LIBRARY_PATH=/usr/local/systemc-2.3.2/lib-linux64/ ./zynq_demo unix:/opt/pkg/projects/zynq_project/qemu-tmp/qemu-rport-_cosim@0 10000
SystemC 2.3.2-Accellera --- Apr 7 2020 10:52:59
Copyright (c) 1996-2017 by all Contributors,
ALL RIGHTS RESERVED
open socket
connect to /opt/pkg/projects/zynq_project/qemu-tmp/qemu-rport-_cosim@0
It connects and runs
From here QEMU output two extra lines :
qemu-system-aarch64: warning: vlan 0 is not connected to host network
rom: requested regions overlap (rom bootloader. free=0x0000000000a76998, addr=0x0000000000000000)
Note : These lines are also output during normal execution (without co-sim and the modified device tree).
But then QEMU hangs and does not advance further...
I checked zynq_demo with GDB, the code executed up to sc_start(1, SC_US); between the reset toggles
/* Pull the reset signal. */
top->rst.write(true);
sc_start(1, SC_US); <------ Here
top->rst.write(false);
which was was called and the simulation is actually waiting on
...
#3 0x00007ffff7888ad1 in sc_core::sc_prim_channel_registry::async_suspend() ()
from /usr/local/systemc-2.3.2/lib-linux64/libsystemc-2.3.2.so
#4 0x00007ffff786f21c in sc_core::sc_simcontext::simulate(sc_core::sc_time const&) ()
from /usr/local/systemc-2.3.2/lib-linux64/libsystemc-2.3.2.so
#5 0x00007ffff786f695 in sc_core::sc_start(sc_core::sc_time const&, sc_core::sc_starvation_policy) ()
from /usr/local/systemc-2.3.2/lib-linux64/libsystemc-2.3.2.so
#6 0x000055555558271c in sc_core::sc_start (p=sc_core::SC_RUN_TO_TIME, unit=sc_core::SC_US, duration=1)
at /usr/local/systemc-2.3.2/include/sysc/kernel/sc_simcontext.h:105
#7 sc_main (argc=3, argv=<optimized out>) at zynq_demo.cc:118
Then nothings happens until I quit the zynq_demo with Ctrl-C at which point QEMU outputs a final line :
qemu-system-aarch64: /cosim@0: Disconnected clk=10000 ns
I could not go past this stage.
I went through all the documentation I could find, the README on this github, the doc on https://github.com/Xilinx/libsystemctlm-soc and
UG1169 https://www.xilinx.com/support/documentation/sw_manuals/xilinx2019_2/ug1169-xilinx-qemu.pdf
The wiki https://xilinx-wiki.atlassian.net/wiki/spaces/A/pages/18842109/QEMU+SystemC+and+TLM+CoSimulation
And even this external source http://users.ece.utexas.edu/~gerstl/ee382m_f18/labs/QEMU_SystemC_Tutorial.htm
It would be appreciated if anyone had insights in what is going wrong or how to debug this.
Thanks it is appreciated.
Hi Edgar,
I was wondering if Synopsys VCS works for this demo. I saw there were some supports in Makefile, but they don't quite work. It'd be great if you could give me some pointers for get it working under VCS. Currently after some modifications, it reported disconnected clk=0 ns
Thanks
Tianrui
dear @edgarigl
I tried to run your zynqmp_demo with this script
LD_LIBRARY_PATH=${HOME}/cosim/systemc-2.3.2/lib-linux64/ ~/cosim/systemctlm-cosim-demo/zynqmp_demo unix:${HOME}/Peta19/zynqmp/tmp/cosim/qemu-rport-_pmu@0 1000000
The reason I put the name qemu-rport-_pmu@0 here is that when petalinux qemu start the os it shows that qemu-rport-_pmu@0 is disconnected. So I thought it should be better to put this port name.
I also put the name qemu-rport-_amba@0_cosim@0 but it doesnot also works.
petalinux-boot --qemu --kernel --qemu-args "-machine-path /tmp/cosim -icount 1 -sync-quantum 1000000"
But the zynqmp demo couldnot connect the remote port.
Steps I followed :
Could you suggest pls anything ?
My systemc/tlm version is 2.3.3 and I am using Vivado 18.1.
Any helps would be appreciated.
Thanks.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.