-
Notifications
You must be signed in to change notification settings - Fork 724
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Verilator doesn't stdout Hello CVA6! #748
Comments
Same error there. |
Strange that the |
Temporary solution:
./work-ver/Variane_testharness /opt/riscv/riscv64-unknown-elf/bin/pk hello.elf
This emulator compiled with JTAG Remote Bitbang client. To enable, use +jtag_rbb_enable=1.
Listening on port 37879
bbl loader
Hello CVA6!
/opt/riscv/riscv64-unknown-elf/bin/pk completed after 1529936 cycles
CPU time used: 196366.65 ms
Wall clock time passed: 98656.32 ms |
I confirm that commenting lines 54-57 and line 61 of
|
The steps to reproduce this issue in a fresh Ubuntu 20.04 installation:
|
Hello David, thank for reporting the point. When simulation finishes on ecall, also if the cpu has finished to execute the program, the com interface has not finished to transmit the string "Hello CVA6!" to the port. That's why the string is not written out. ecall was inserted to finish the simulation on other testbench than testharness, testbenches supported in core-v-verif projects (core only and uvm) for instance. This solution has also been implemented in riscv-compliance and riscv-tests regression suites. To write out the string, an timing loop can be inserted before progam end. Keep us in touch, |
So from what I understand this is the intended behaviour, as it was not ment to run user applications but to execute the verification tests. For now the solution proposed by Pascal is enough in my case but I'll take this into account if I need it in the future. Thanks for your time and your insight! |
how would the file look once you have the comments, because it gives me syntax errors |
@FranDuqueAyachi just comment these lines: cva6/corev_apu/tb/rvfi_tracer.sv Lines 59 to 62 in 5c5c704
And this line: cva6/corev_apu/tb/rvfi_tracer.sv Line 66 in 5c5c704
|
OKey, I commented these lines, but when I execute make verilate: |
@FranDuqueAyachi Also comment line 62, I have updated my previous reply. |
Didnt see it, thank you! |
Seeing the same issue with current CVA6 setup. |
As told previously, the simulation stops before printing out. Today the simulation do not stop anymore on ecall instruction execution but on a write to a special address (TOHOST_ADDR). I reopened this github issue, just to know if a delay could be added to wait for printf completion. |
Any news on this? |
@JeanRochCoulon I tried running the simulation for ~5mins but did not get any output. |
@valentinThomazic yes, the Proxy Kernel (pk) is the layer in charge of generic host I/O. If I remember correctly, it uses the HTIF protocol (https://chipyard.readthedocs.io/en/stable/Advanced-Concepts/Chip-Communication.html) to communicate with the host via commands written to variable |
Okay, that is what I thought ! I had some doubts there was some way to get an output even without the pk since thet test has been kept and getting an output is what you would expect from an hello world. |
So how would one go about running a simulation with an stdout output with the current setup? |
Today there is no way to printout. CVA6 is an open source development. If you would like to contribute, we can support the effort. |
Hi, If there is no way to print out, how can I check simulation of hello.c is successful? |
Today the printout is not supported by CVA6 project. The use of pk-kernel could be a solution to support it. |
I've been trying to set up the verilator workflow with the comments from the recent pull request #740 in a blank VM with Ubuntu 20.04 (until now I was using QuestaSim and the Genesys II). When executing
work-ver/Variane_testharness $RISCV/riscv64-unknown-elf/bin/pk hello.elf
after compiling withriscv64-unknown-elf-gcc hello.c -o hello.elf
, it seems to run normally but in the end there is no "Hello CVA6!" output to stdout. I have tested the generated .elf on the Genesys II from my previous working flow and it seems to work fine. Any suggestions on what I could be missing? Thanks!P.S: I've tried with Verilator 4.100, 4.014 and 4.002 with the same result.
The text was updated successfully, but these errors were encountered: