openhwgroup / core-v-verif

Functional verification project for the CORE-V family of RISC-V cores.
https://docs.openhwgroup.org/projects/core-v-verif/en/latest/index.html
Other
444 stars 221 forks source link

CV32E40X simulation errors #1508

Open aledolme opened 1 year ago

aledolme commented 1 year ago

Hello!

I'm having some troubles in compiling CV32E40X uvm simulation (starting from /sim/uvmt folder) that I've not encountered with CV32E40P. In particular, using the same simulation enviroment and the same simulator, with CV32E40X I got this error, at Running vlog step:


And then the simulation stops because of some errors related to the simulator like:

However, the simulator is the same used for CV32E40P simulation, and there it works fine. Any ideas of which can be the problem? CFG_COMPILE_FLAGS is different (in vsim.mk), but I have not found where it is instantiated.

Thanks you!

MikeOpenHWGroup commented 1 year ago

Hi @aledolme, thanks for your issue. Up to last week I did not have access to Questa tools and AFAIK, none of the teams involved in the E40X are using Questa, so it is possible that the Makefiles for running the E40X on Questa have suffered bit-rot.

The good news is that I now have access to Questa and I will look into your issue as soon as possible (probably not today).

MikeOpenHWGroup commented 1 year ago

Pull-request #1511 should restore Questa for E40X.

aledolme commented 1 year ago

Thanks you! However, despite the changes in the vsim.mk, there are still some problems which I not encounter with CV32E40P version, in the compiling phase of BSP in Common.mk file.


This error does not occur with the other core. I have control all the file present in the /CV32E40X/BSP folder, yet I have not found where "nocona" or "haswell" are set, and still the simulation is not termined as it should. Have you have any idea about which bugs there can still be between cv32e40x and cv32e40p for Questasim simulation?

MikeOpenHWGroup commented 1 year ago

This is very odd indeed. It is not at all clear where is command-line is being issued:

$HOME/opt/riscv/bin/riscv32-unknown-elf-gcc -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem $HOME/miniconda3/include -c $HOME/core-v-verif/cv32e40x/bsp/crt0.S -o crt0.o

That is not a command that is issued by any of the CORE-V-VERIF Makefiles and/or scripts. It looks to me like $HOME/core-v-verif/cv32e40x/sim/uvmt/vsim_results/default/hello-world/0/test_program/bsp/Makefile was somehow corrupted.

Try make clean_all and try compiling/running again.

MikeOpenHWGroup commented 1 year ago

Hi @aledolme, where are we on this issue. Pull-request #1511 has been merged in, so the Makefile support for Questa should be in good shape. I am not sure I can help you with the -march=nocona issue.

LMK.