-
Notifications
You must be signed in to change notification settings - Fork 705
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
How to bring printf support in simulation environment ? #2426
Comments
Indeed this feature is highly requested. But as you know it is not supported. The solution would be to support pk which provides the print feature. If someone is ready to work on it, we can provide recommendations. |
Yes, please share a plan (or an outline) for the required functionality. That would be helpful in assessing whether someone (e.g. myself) can take up the task. |
@valentinThomazic the floor is yours to explain how to proceed ;-) |
Hey sorry for the delay, the riscv proxy kernel used to be supported in this repo (I can give some directions if needed). |
Hello @valentinThomazic, @JeanRochCoulon , Could you please give some directions to be able to support riscv proxy kernel in the current environment of cva6. I tried to install riscv pk from the corresponding repository of riscv but when i run the executable of Variane_testharness along with the proxy kernel and the desirable executable ( in my case an elf file of hello world in order to see the print happening in my terminal) all i get is an Assertion Failed "ariane_testharness.sv:671: Assertion failed in TOP.ariane_testharness.p_assert: B Response Errored". In addition i would like to ask if the riscv proxy kernel after it had been built will it support to run in spike tandem mode ? Thanks in advance for your time |
Hi @JeanRochCoulon @valentinThomazic . Apologies for the delayed response.
The answer to the above questions will help in planning out the work, and possibly lead to a clean pull request, with minimal rework required. Please respond. I am available to discuss in further detail. Thanks in advance Thanks |
Hey @jason23g, You may have a compilation options issue. For instance if you are trying to run the pk on one of the 32 bits configuration of the CVA6, were the pk and the hello_world compiled for 32 bits ? This may help you : #1358 (comment) as it will work on the Makefile default's configuration. Please note that we will not provide support for using |
Hello @valentinThomazic , The pk and the hello world were compiled for 64 bits with the flow of the comment you gave in #1358 and it worked . Could you please give some directions to be able to support riscv proxy kernel in the current environment of cva6 and can be run in spike tandem mode. Thanks in advance for your time |
Hey @isaar-ahmad and @jason23g 1&4 => If you take a look at I am not asking you to clear and refactor 2 => You will probably need to change 3 => This is how it would have been done previously : #1358 (comment), pk was dropped with : #1663 but the instructions were already broken so you should take a look at the issue comment instead. Basically the compilation and the pk and the program were done manually, it would need to be automated:
This should work for all configurations and simulators combination and if possible with Spike Tandem. Hope this helps. |
Is there an existing CVA6 bug for this?
Bug Description
Hi,
I found that there has been recent discussion (May 2024 - July 2024) regarding printf statement support in CVA6 simulations (see #2103 #2184 #2220 ). It seems that CVA6 simulation environment, in its current form (e.g. with Verilator), doesn't support this.
For example, Dhrystone C files [1] have debug_print statements in them. To a newcomer, this would give an initial impression that these prints should be visible somewhere in the logfiles or console output. However, a closer inspection reveals that the implementation of debug_print() function is empty. In development stage, it is common in bare-metal environments to disable print statements, so that other parts of the test can pass through.
That being said, printf statements are useful in debugging, especially when the target under debug is a CPU itself. (I only speak for myself, based on my experience with RTL verification of ARM CPUs, and some RISC-V CPUs as well).
Please advise on this :
Thanks,
Isaar
Code reference :
[1] Dhrystone source files (dhrystone_main.c and dhrystone.c) : Fetched by install-riscv-tests.sh
The text was updated successfully, but these errors were encountered: