Skip to content
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

[BUG] Spike tandem simulation not working as expected with the Verilator #2526

Open
1 task done
jason23g opened this issue Oct 4, 2024 · 5 comments
Open
1 task done
Labels
Type:Bug For bugs in the RTL, Documentation, Verification environment or Tool and Build system

Comments

@jason23g
Copy link

jason23g commented Oct 4, 2024

Is there an existing CVA6 bug for this?

  • I have searched the existing bug issues

Bug Description

Hello guys,

I am trying to simulate cva6 with spike tandem, however i observe an unexpected behavior when i use spike tandem with the veri-testharness option. More specifically, i have tried to simulate a very simple execution of an assembly file. During the spike tandem simulation i observe that even if the files .log (Verilator Simulation) and tandem.log (spike simulation) work as expected, initially the message info says that the TANDEM YAML report is incomplete meaning that it doesn't print all the necessary information required. Furthermore when i change UVM_VERBOSITY variable to UVM_FULL value (i tried all other options too) or i manually tried to print information about what the core has executed and what the reference model has executed instruction by instruction, the only thing that i get is the c.unimp instruction and all the values of the instruction equal to 0. So my question is even if the problem lies down to the support of UVM in Verilator and so on this is the expected behavior or i am missing something else.

Thanks in advance for your time.

Note :

  1. The configuration of cva6 is for CV32A65X
  2. I have attached all the files that i use to test it as well as the log files.
    files.zip
@jason23g jason23g added the Type:Bug For bugs in the RTL, Documentation, Verification environment or Tool and Build system label Oct 4, 2024
@JeanRochCoulon
Copy link
Contributor

Naive question: are you in simulation timeout ? This can lead to this kind of output message.

@jason23g
Copy link
Author

jason23g commented Oct 9, 2024

No i am not in simulation timeout, i have not changed any of the other parameters except the environmental variables needed for the spike tandem simulation and the elf program that i use it is really small around 10 assembly instructions.

@hhhsiang
Copy link

hi @jason23g ,sorry to bother you. Does "spike tandem" means that we use spike as iss to compare the simulation with verilator?

@jason23g
Copy link
Author

Hello @hhhsiang,

Spike tandem means that the co-simulation between Spike ( An Instruction Set Simulator ) and Verilator (An RTL Simulator) is lockstep, it checks the result between Spike and Verilator instruction by instruction. Whereas in the normal co-simulation it is just checking the traces of the 2 simulations at the end of them.

@valentinThomazic
Copy link
Contributor

Hi @jason23g !
Unfortunately, this a known issue. However there is a fix : change verilator version to a more recent version like ``5.024. You can change the version in the install script in verif/regress/install-verilator.sh`.
You should know that this does not work on all OS which is why it is not merged. Hope it helps !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type:Bug For bugs in the RTL, Documentation, Verification environment or Tool and Build system
Projects
None yet
Development

No branches or pull requests

4 participants