Closed rick-heig closed 4 years ago
Hi Rick,
Could you please try adding a clock to zynq_demo.cc? Something like the following:
diff --git a/zynq_demo.cc b/zynq_demo.cc index cb5ae69..7845555 100644 --- a/zynq_demo.cc +++ b/zynq_demo.cc @@ -49,6 +49,7 @@ using namespace std;
SC_MODULE(Top) {
sc_clock clk; iconnect<NR_MASTERS, NR_DEVICES> bus; xilinx_zynq zynq; debugdev debug; @@ -56,6 +57,7 @@ SC_MODULE(Top)
Top(sc_module_name name, const char *sk_descr, sc_time quantum) :
Hi, I've pushed a fix for this now. Let me know if it works for you!
Cheers, Edgar
Hello.
Thank you for your solution, that was it, once the clock was added the co-simulation did run.
I was able to boot my Linux kernel and also was able to query the "debugdev" from Linux (through devmem).
Thank you for your time ! Best regards. Rick
Great, thanks for letting me know!
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.
Then I launch the zynq_demo :
It connects and runs
From here QEMU output two extra lines :
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
which was was called and the simulation is actually waiting on
Then nothings happens until I quit the zynq_demo with Ctrl-C at which point QEMU outputs a final line :
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.