Closed AltiumHanChou closed 3 years ago
Hi, thanks for reporting this.
Just to make sure, could you run the same simulation but by selecting the SystemVerilog implementation of the caches in the GUI? Does that work?
There have been a few fixes/changes in the SystemVerilog caches recently that may not have been mirrored in the SystemC caches.
Thanks!
Hi @davide-giri ~
It seems got same error which like above. Log file : trace_hart_0.log
BTW, you mention SystemVerilog caches recently has fixes/changes. Did it has already in the latest release (2021.1.0)? The version I use now is 2021.1.0 .
Ok, so you have the issue regardless of the cache implementation choice. We are going to look into this and let you know soon.
I just meant to say that the SystemVerilog implementation has diverged slightly from the SystemC one, but both should work fine.
Hi @AltiumHanChou
I am not able to reproduce the illegal instruction
error you report when selecting the SystemVerilog implementation of the caches. Could you please share with us the full simulation log, including the printouts that occur while the design is loaded by Modelsim?
With respect to the HLS-based implementation of the caches, I am regenerating the RTL and will update you shortly. I noticed, however, that you are using Stratus 19.2. Our SystemC for the caches has been tested with Stratus 18.5 and we have noticed that the tool version does matter, most likely because of bugs fixes and the introduction of new features in Stratus HLS.
One quick thought: did the toolchain compilation work correctly for both rv32imc (ibex) and rv64imad (ariane) versions of the RISC-V compiler?
ESP provides both scripts to generate the toolchains, which are based on the official RISC-V toolchain repository. These scripts should be run on different clean shell environments and I would also target two different installation folders. Particularly, both scripts must define the RISCV
variable as export RISCV=${TARGET_DIR}
and that's why I would recommend running them in separate environments using different TARGET_DIR
. The scripts will ask you to indicate a default when you run them:
esp/utils/toolchain/build_riscv32imc_toolchain.sh
for Ibex
esp/utils/toolchain/build_riscv_toolchain.sh
for Ariane
Hi @paulmnt ~
Log file : modelsim_Ariane.log
Thank you. Seems like the design has been loaded correctly, including SystemVerilog caches. Also, the boot loader is executing correctly, but that runs in non cacheable address space, using the bootrom.
Could you please try checking that the program has been compiled and dumped to text file correctly?
Using the hello world systest.c
on master, you should obtain the text file
esp/socs/xilinx-vcu118-xcvu9p/modelsim/ram.srec
and its content should match this txt: ram.txt
HLS is still generating resources: will update you soon on SystemC version.
One quick thought: did the toolchain compilation work correctly for both rv32imc (ibex) and rv64imad (ariane) versions of the RISC-V compiler?
ESP provides both scripts to generate the toolchains, which are based on the official RISC-V toolchain repository. These scripts should be run on different clean shell environments and I would also target two different installation folders. Particularly, both scripts must define the
RISCV
variable asexport RISCV=${TARGET_DIR}
and that's why I would recommend running them in separate environments using differentTARGET_DIR
. The scripts will ask you to indicate a default when you run them:
esp/utils/toolchain/build_riscv32imc_toolchain.sh
for Ibexesp/utils/toolchain/build_riscv_toolchain.sh
for Ariane
According the tutorial, I set both in scripts like this :
set ESP_ROOT_PATH="~/ESP_Platform"
# risc-v toolchain environment
setenv RISCV ${ESP_ROOT_PATH}"/riscv"
setenv RISCV32IMC ${ESP_ROOT_PATH}"/riscv32imc"
setenv PATH ${PATH}:${ESP_ROOT_PATH}"/riscv/bin":${ESP_ROOT_PATH}"/riscv32imc/bin"
Is this correct ?
yes: this looks correct. I just sent the object dump just as a sanity check, but at this point I expect you will see no diff.
If the program is also compiled correctly, the only other difference I see with respect to the recommended setup is Modelsim's version. Xilinx recommends Modelsim 2019.2 for Vivado 2019.2, but I believe newer versions should work as well.
Thank you. Seems like the design has been loaded correctly, including SystemVerilog caches. Also, the boot loader is executing correctly, but that runs in non cacheable address space, using the bootrom.
Could you please try checking that the program has been compiled and dumped to text file correctly? Using the hello world
systest.c
on master, you should obtain the text fileesp/socs/xilinx-vcu118-xcvu9p/modelsim/ram.srec
and its content should match this txt: ram.txt
HLS is still generating resources: will update you soon on SystemC version.
Yes. It looks same like the file you gave me above.
yes: this looks correct. I just sent the object dump just as a sanity check, but at this point I expect you will see no diff.
If the program is also compiled correctly, the only other difference I see with respect to the recommended setup is Modelsim's version. Xilinx recommends Modelsim 2019.2 for Vivado 2019.2, but I believe newer versions should work as well.
OK ~ I will ask workstation to downgrade the modelsim version to 2019.2, and try again. Thanks~
Hi @AltiumHanChou ,
this one was a silly Makefile issue: when switching processor core from the GUI without cleaning the simulation folder (e.g. with make sim-distcleam
), the links to the program executable were not updated. This has been fixed on commit b143261
This issue should be fixed on the ESP devel branch
Describe the bug
To Reproduce
Expected behavior
Screenshots
Desktop (please complete the following information):
Additional context