openhwgroup / cva6

The CORE-V CVA6 is an Application class 6-stage RISC-V CPU capable of booting Linux
https://docs.openhwgroup.org/projects/cva6-user-manual/
Other
2.28k stars 689 forks source link

Error while running a C program #2341

Closed Vinay0203 closed 4 months ago

Vinay0203 commented 4 months ago

Using the following commands we installed custom Spike and Verilator.: export DV_SIMULATORS=veri-testharness,spike bash verif/regress/smoke-tests.sh

Then I tried to run the hello world C program with the Verilator model using the given commands:

source verif/sim/setup-env.sh export DV_SIMULATORS=veri-testharness

cd ./verif/sim

python3 cva6.py --target cv32a60x --iss=$DV_SIMULATORS --iss_yaml=cva6.yaml \ --c_tests ../tests/custom/hello_world/hello_world.c \ --linker=../tests/custom/common/test.ld \ --gcc_opts="-static -mcmodel=medany -fvisibility=hidden -nostdlib \ -nostartfiles -g ../tests/custom/common/syscalls.c \ ../tests/custom/common/crt.S -lgcc \ -I../tests/custom/env -I../tests/custom/common"

The following error was encountered image

The log file hello_world.cv32a60x.log.iss : Makefile:14: must set CVA6_REPO_DIR to point at the root of CVA6 sources and CVA6_TB_DIR to point here -- doing it for you... make -C /home/pescampus/Desktop/CVA6/cva6/ verilate verilator="verilator --no-timing" target=cv32a60x defines= make[1]: Entering directory '/home/pescampus/Desktop/CVA6/cva6' Makefile:150: XCELIUM_HOME not set which is necessary for compiling DPIs when using XCELIUM [Verilator] Building Model verilator --no-timing --no-timing verilator_config.vlt -f core/Flist.cva6 core/cva6_rvfi.sv /home/pescampus/Desktop/CVA6/cva6/corev_apu/tb/ariane_axi_pkg.sv /home/pescampus/Desktop/CVA6/cva6/corev_apu/tb/axi_intf.sv /home/pescampus/Desktop/CVA6/cva6/corev_apu/register_interface/src/reg_intf.sv /home/pescampus/Desktop/CVA6/cva6/corev_apu/tb/ariane_soc_pkg.sv /home/pescampus/Desktop/CVA6/cva6/corev_apu/riscv-dbg/src/dm_pkg.sv /home/pescampus/Desktop/CVA6/cva6/corev_apu/tb/ariane_axi_soc_pkg.sv /home/pescampus/Desktop/CVA6/cva6/core/cva6_rvfi.sv /home/pescampus/Desktop/CVA6/cva6/corev_apu/src/ariane.sv /home/pescampus/Desktop/CVA6/cva6/corev_apu/bootrom/bootrom.sv /home/pescampus/Desktop/CVA6/cva6/corev_apu/clint/axi_lite_interface.sv /home/pescampus/Desktop/CVA6/cva6/corev_apu/clint/clint.sv /home/pescampus/Desktop/CVA6/cva6/corev_apu/fpga/src/axi2apb/src/axi2apb_64_32.sv /home/pescampus/Desktop/CVA6/cva6/corev_apu/fpga/src/axi2apb/src/axi2apb.sv /home/pescampus/Desktop/CVA6/cva6/corev_apu/fpga/src/axi2apb/src/axi2apb_wrap.sv /home/pescampus/Desktop/CVA6/cva6/corev_apu/fpga/src/apb_timer/apb_timer.sv /home/pescampus/Desktop/CVA6/cva6/corev_apu/fpga/src/apb_timer/timer.sv /home/pescampus/Desktop/CVA6/cva6/corev_apu/fpga/src/axi_slice/src/axi_ar_buffer.sv /home/pescampus/Desktop/CVA6/cva6/corev_apu/fpga/src/axi_slice/src/axi_aw_buffer.sv /home/pescampus/Desktop/CVA6/cva6/corev_apu/fpga/src/axi_slice/src/axi_b_buffer.sv /home/pescampus/Desktop/CVA6/cva6/corev_apu/fpga/src/axi_slice/src/axi_r_buffer.sv /home/pescampus/Desktop/CVA6/cva6/corev_apu/fpga/src/axi_slice/src/axi_single_slice.sv /home/pescampus/Desktop/CVA6/cva6/corev_apu/fpga/src/axi_slice/src/axi_slice.sv /home/pescampus/Desktop/CVA6/cva6/corev_apu/fpga/src/axi_slice/src/axi_slice_wrap.sv /home/pescampus/Desktop/CVA6/cva6/corev_apu/fpga/src/axi_slice/src/axi_w_buffer.sv /home/pescampus/Desktop/CVA6/cva6/corev_apu/src/axi_riscv_atomics/src/axi_res_tbl.sv /home/pescampus/Desktop/CVA6/cva6/corev_apu/src/axi_riscv_atomics/src/axi_riscv_amos_alu.sv /home/pescampus/Desktop/CVA6/cva6/corev_apu/src/axi_riscv_atomics/src/axi_riscv_amos.sv /home/pescampus/Desktop/CVA6/cva6/corev_apu/src/axi_riscv_atomics/src/axi_riscv_atomics.sv /home/pescampus/Desktop/CVA6/cva6/corev_apu/src/axi_riscv_atomics/src/axi_riscv_atomics_wrap.sv /home/pescampus/Desktop/CVA6/cva6/corev_apu/src/axi_riscv_atomics/src/axi_riscv_lrsc.sv /home/pescampus/Desktop/CVA6/cva6/corev_apu/src/axi_riscv_atomics/src/axi_riscv_lrsc_wrap.sv /home/pescampus/Desktop/CVA6/cva6/corev_apu/axi_mem_if/src/axi2mem.sv /home/pescampus/Desktop/CVA6/cva6/corev_apu/rv_plic/rtl/rv_plic_target.sv /home/pescampus/Desktop/CVA6/cva6/corev_apu/rv_plic/rtl/rv_plic_gateway.sv /home/pescampus/Desktop/CVA6/cva6/corev_apu/rv_plic/rtl/plic_regmap.sv /home/pescampus/Desktop/CVA6/cva6/corev_apu/rv_plic/rtl/plic_top.sv /home/pescampus/Desktop/CVA6/cva6/corev_apu/riscv-dbg/src/dmi_cdc.sv /home/pescampus/Desktop/CVA6/cva6/corev_apu/riscv-dbg/src/dmi_jtag.sv /home/pescampus/Desktop/CVA6/cva6/corev_apu/riscv-dbg/src/dmi_jtag_tap.sv /home/pescampus/Desktop/CVA6/cva6/corev_apu/riscv-dbg/src/dm_csrs.sv /home/pescampus/Desktop/CVA6/cva6/corev_apu/riscv-dbg/src/dm_mem.sv /home/pescampus/Desktop/CVA6/cva6/corev_apu/riscv-dbg/src/dm_sba.sv /home/pescampus/Desktop/CVA6/cva6/corev_apu/riscv-dbg/src/dm_top.sv /home/pescampus/Desktop/CVA6/cva6/corev_apu/riscv-dbg/debug_rom/debug_rom.sv /home/pescampus/Desktop/CVA6/cva6/corev_apu/register_interface/src/apb_to_reg.sv /home/pescampus/Desktop/CVA6/cva6/vendor/pulp-platform/axi/src/axi_multicut.sv /home/pescampus/Desktop/CVA6/cva6/vendor/pulp-platform/common_cells/src/rstgen_bypass.sv /home/pescampus/Desktop/CVA6/cva6/vendor/pulp-platform/common_cells/src/rstgen.sv /home/pescampus/Desktop/CVA6/cva6/vendor/pulp-platform/common_cells/src/addr_decode.sv /home/pescampus/Desktop/CVA6/cva6/vendor/pulp-platform/common_cells/src/stream_register.sv /home/pescampus/Desktop/CVA6/cva6/vendor/pulp-platform/axi/src/axi_cut.sv /home/pescampus/Desktop/CVA6/cva6/vendor/pulp-platform/axi/src/axi_join.sv /home/pescampus/Desktop/CVA6/cva6/vendor/pulp-platform/axi/src/axi_delayer.sv /home/pescampus/Desktop/CVA6/cva6/vendor/pulp-platform/axi/src/axi_to_axi_lite.sv /home/pescampus/Desktop/CVA6/cva6/vendor/pulp-platform/axi/src/axi_id_prepend.sv /home/pescampus/Desktop/CVA6/cva6/vendor/pulp-platform/axi/src/axi_atop_filter.sv /home/pescampus/Desktop/CVA6/cva6/vendor/pulp-platform/axi/src/axi_err_slv.sv /home/pescampus/Desktop/CVA6/cva6/vendor/pulp-platform/axi/src/axi_mux.sv /home/pescampus/Desktop/CVA6/cva6/vendor/pulp-platform/axi/src/axi_demux.sv /home/pescampus/Desktop/CVA6/cva6/vendor/pulp-platform/axi/src/axi_xbar.sv /home/pescampus/Desktop/CVA6/cva6/vendor/pulp-platform/common_cells/src/cdc_2phase.sv /home/pescampus/Desktop/CVA6/cva6/vendor/pulp-platform/common_cells/src/spill_register_flushable.sv /home/pescampus/Desktop/CVA6/cva6/vendor/pulp-platform/common_cells/src/spill_register.sv /home/pescampus/Desktop/CVA6/cva6/vendor/pulp-platform/common_cells/src/deprecated/fifo_v1.sv /home/pescampus/Desktop/CVA6/cva6/vendor/pulp-platform/common_cells/src/deprecated/fifo_v2.sv /home/pescampus/Desktop/CVA6/cva6/vendor/pulp-platform/common_cells/src/stream_delay.sv /home/pescampus/Desktop/CVA6/cva6/vendor/pulp-platform/common_cells/src/lfsr_16bit.sv /home/pescampus/Desktop/CVA6/cva6/vendor/pulp-platform/tech_cells_generic/src/deprecated/cluster_clk_cells.sv /home/pescampus/Desktop/CVA6/cva6/vendor/pulp-platform/tech_cells_generic/src/deprecated/pulp_clk_cells.sv /home/pescampus/Desktop/CVA6/cva6/vendor/pulp-platform/tech_cells_generic/src/rtl/tc_clk.sv /home/pescampus/Desktop/CVA6/cva6/corev_apu/tb/ariane_testharness.sv /home/pescampus/Desktop/CVA6/cva6/corev_apu/tb/ariane_peripherals.sv /home/pescampus/Desktop/CVA6/cva6/corev_apu/tb/rvfi_tracer.sv /home/pescampus/Desktop/CVA6/cva6/corev_apu/tb/common/uart.sv /home/pescampus/Desktop/CVA6/cva6/corev_apu/tb/common/SimDTM.sv /home/pescampus/Desktop/CVA6/cva6/corev_apu/tb/common/SimJTAG.sv +define+ corev_apu/tb/common/mock_uart.sv +incdir+corev_apu/axi_node --unroll-count 256 -Wall -Werror-PINMISSING -Werror-IMPLICIT -Wno-fatal -Wno-PINCONNECTEMPTY -Wno-ASSIGNDLY -Wno-DECLFILENAME -Wno-UNUSED -Wno-UNOPTFLAT -Wno-BLKANDNBLK -Wno-style -DPRELOAD=1 -LDFLAGS "-L/home/pescampus/Desktop/CVA6/cva6/util/toolchain-builder/gcc-13.1.0-baremetal/lib -L/home/pescampus/Desktop/CVA6/cva6/tools/spike/lib -Wl,-rpath,/home/pescampus/Desktop/CVA6/cva6/util/toolchain-builder/gcc-13.1.0-baremetal/lib -Wl,-rpath,/home/pescampus/Desktop/CVA6/cva6/tools/spike/lib -lfesvr -lriscv -ldisasm -lpthread " -CFLAGS "-I/include -I/include -I/home/pescampus/Desktop/CVA6/cva6/tools/verilator/share/verilator/include/vltstd -I/home/pescampus/Desktop/CVA6/cva6/util/toolchain-builder/gcc-13.1.0-baremetal/include -I/home/pescampus/Desktop/CVA6/cva6/tools/spike/include -std=c++17 -I/home/pescampus/Desktop/CVA6/cva6/corev_apu/tb/dpi -O3 -DVL_DEBUG -I/home/pescampus/Desktop/CVA6/cva6/tools/spike" --cc --vpi +incdir+/home/pescampus/Desktop/CVA6/cva6/vendor/pulp-platform/common_cells/include/ +incdir+/home/pescampus/Desktop/CVA6/cva6/vendor/pulp-platform/axi/include/ +incdir+/home/pescampus/Desktop/CVA6/cva6/corev_apu/register_interface/include/ +incdir+/home/pescampus/Desktop/CVA6/cva6/corev_apu/tb/common/ +incdir+/home/pescampus/Desktop/CVA6/cva6/vendor/pulp-platform/axi/include/ +incdir+/home/pescampus/Desktop/CVA6/cva6/verif/core-v-verif/lib/uvm_agents/uvma_rvfi/ +incdir+/home/pescampus/Desktop/CVA6/cva6/verif/core-v-verif/lib/uvm_components/uvmc_rvfi_reference_model/ +incdir+/home/pescampus/Desktop/CVA6/cva6/verif/core-v-verif/lib/uvm_components/uvmc_rvfi_scoreboard/ +incdir+/home/pescampus/Desktop/CVA6/cva6/verif/core-v-verif/lib/uvm_agents/uvma_core_cntrl/ +incdir+/home/pescampus/Desktop/CVA6/cva6/verif/tb/core/ +incdir+/home/pescampus/Desktop/CVA6/cva6/core/include/ +incdir+/home/pescampus/Desktop/CVA6/cva6/tools/spike/include/disasm/ --top-module ariane_testharness --threads-dpi none --Mdir work-ver -O3 --exe corev_apu/tb/ariane_tb.cpp corev_apu/tb/dpi/SimDTM.cc corev_apu/tb/dpi/SimJTAG.cc corev_apu/tb/dpi/remote_bitbang.cc corev_apu/tb/dpi/msim_helper.cc %Error: Cannot find file containing module: /home/pescampus/Desktop/CVA6/cva6/core/include/cv32a60x_config_pkg.sv ... Looked in: /home/pescampus/Desktop/CVA6/cva6/core/include///home/pescampus/Desktop/CVA6/cva6/core/include/cv32a60x_config_pkg.sv /home/pescampus/Desktop/CVA6/cva6/core/include///home/pescampus/Desktop/CVA6/cva6/core/include/cv32a60x_config_pkg.sv.v /home/pescampus/Desktop/CVA6/cva6/core/include///home/pescampus/Desktop/CVA6/cva6/core/include/cv32a60x_config_pkg.sv.sv /home/pescampus/Desktop/CVA6/cva6/vendor/pulp-platform/common_cells/include///home/pescampus/Desktop/CVA6/cva6/core/include/cv32a60x_config_pkg.sv /home/pescampus/Desktop/CVA6/cva6/vendor/pulp-platform/common_cells/include///home/pescampus/Desktop/CVA6/cva6/core/include/cv32a60x_config_pkg.sv.v /home/pescampus/Desktop/CVA6/cva6/vendor/pulp-platform/common_cells/include///home/pescampus/Desktop/CVA6/cva6/core/include/cv32a60x_config_pkg.sv.sv /home/pescampus/Desktop/CVA6/cva6/vendor/pulp-platform/common_cells/src///home/pescampus/Desktop/CVA6/cva6/core/include/cv32a60x_config_pkg.sv /home/pescampus/Desktop/CVA6/cva6/vendor/pulp-platform/common_cells/src///home/pescampus/Desktop/CVA6/cva6/core/include/cv32a60x_config_pkg.sv.v /home/pescampus/Desktop/CVA6/cva6/vendor/pulp-platform/common_cells/src///home/pescampus/Desktop/CVA6/cva6/core/include/cv32a60x_config_pkg.sv.sv /home/pescampus/Desktop/CVA6/cva6/vendor/pulp-platform/axi/include///home/pescampus/Desktop/CVA6/cva6/core/include/cv32a60x_config_pkg.sv /home/pescampus/Desktop/CVA6/cva6/vendor/pulp-platform/axi/include///home/pescampus/Desktop/CVA6/cva6/core/include/cv32a60x_config_pkg.sv.v /home/pescampus/Desktop/CVA6/cva6/vendor/pulp-platform/axi/include///home/pescampus/Desktop/CVA6/cva6/core/include/cv32a60x_config_pkg.sv.sv /home/pescampus/Desktop/CVA6/cva6/common/local/util///home/pescampus/Desktop/CVA6/cva6/core/include/cv32a60x_config_pkg.sv /home/pescampus/Desktop/CVA6/cva6/common/local/util///home/pescampus/Desktop/CVA6/cva6/core/include/cv32a60x_config_pkg.sv.v /home/pescampus/Desktop/CVA6/cva6/common/local/util///home/pescampus/Desktop/CVA6/cva6/core/include/cv32a60x_config_pkg.sv.sv /home/pescampus/Desktop/CVA6/cva6/core/cache_subsystem/hpdcache/rtl/include//home/pescampus/Desktop/CVA6/cva6/core/include/cv32a60x_config_pkg.sv /home/pescampus/Desktop/CVA6/cva6/core/cache_subsystem/hpdcache/rtl/include//home/pescampus/Desktop/CVA6/cva6/core/include/cv32a60x_config_pkg.sv.v /home/pescampus/Desktop/CVA6/cva6/core/cache_subsystem/hpdcache/rtl/include//home/pescampus/Desktop/CVA6/cva6/core/include/cv32a60x_config_pkg.sv.sv corev_apu/axi_node//home/pescampus/Desktop/CVA6/cva6/core/include/cv32a60x_config_pkg.sv corev_apu/axi_node//home/pescampus/Desktop/CVA6/cva6/core/include/cv32a60x_config_pkg.sv.v corev_apu/axi_node//home/pescampus/Desktop/CVA6/cva6/core/include/cv32a60x_config_pkg.sv.sv /home/pescampus/Desktop/CVA6/cva6/corev_apu/register_interface/include///home/pescampus/Desktop/CVA6/cva6/core/include/cv32a60x_config_pkg.sv /home/pescampus/Desktop/CVA6/cva6/corev_apu/register_interface/include///home/pescampus/Desktop/CVA6/cva6/core/include/cv32a60x_config_pkg.sv.v /home/pescampus/Desktop/CVA6/cva6/corev_apu/register_interface/include///home/pescampus/Desktop/CVA6/cva6/core/include/cv32a60x_config_pkg.sv.sv /home/pescampus/Desktop/CVA6/cva6/corev_apu/tb/common///home/pescampus/Desktop/CVA6/cva6/core/include/cv32a60x_config_pkg.sv /home/pescampus/Desktop/CVA6/cva6/corev_apu/tb/common///home/pescampus/Desktop/CVA6/cva6/core/include/cv32a60x_config_pkg.sv.v /home/pescampus/Desktop/CVA6/cva6/corev_apu/tb/common///home/pescampus/Desktop/CVA6/cva6/core/include/cv32a60x_config_pkg.sv.sv /home/pescampus/Desktop/CVA6/cva6/verif/core-v-verif/lib/uvm_agents/uvma_rvfi///home/pescampus/Desktop/CVA6/cva6/core/include/cv32a60x_config_pkg.sv /home/pescampus/Desktop/CVA6/cva6/verif/core-v-verif/lib/uvm_agents/uvma_rvfi///home/pescampus/Desktop/CVA6/cva6/core/include/cv32a60x_config_pkg.sv.v /home/pescampus/Desktop/CVA6/cva6/verif/core-v-verif/lib/uvm_agents/uvma_rvfi///home/pescampus/Desktop/CVA6/cva6/core/include/cv32a60x_config_pkg.sv.sv /home/pescampus/Desktop/CVA6/cva6/verif/core-v-verif/lib/uvm_components/uvmc_rvfi_reference_model///home/pescampus/Desktop/CVA6/cva6/core/include/cv32a60x_config_pkg.sv /home/pescampus/Desktop/CVA6/cva6/verif/core-v-verif/lib/uvm_components/uvmc_rvfi_reference_model///home/pescampus/Desktop/CVA6/cva6/core/include/cv32a60x_config_pkg.sv.v /home/pescampus/Desktop/CVA6/cva6/verif/core-v-verif/lib/uvm_components/uvmc_rvfi_reference_model///home/pescampus/Desktop/CVA6/cva6/core/include/cv32a60x_config_pkg.sv.sv /home/pescampus/Desktop/CVA6/cva6/verif/core-v-verif/lib/uvm_components/uvmc_rvfi_scoreboard///home/pescampus/Desktop/CVA6/cva6/core/include/cv32a60x_config_pkg.sv /home/pescampus/Desktop/CVA6/cva6/verif/core-v-verif/lib/uvm_components/uvmc_rvfi_scoreboard///home/pescampus/Desktop/CVA6/cva6/core/include/cv32a60x_config_pkg.sv.v /home/pescampus/Desktop/CVA6/cva6/verif/core-v-verif/lib/uvm_components/uvmc_rvfi_scoreboard///home/pescampus/Desktop/CVA6/cva6/core/include/cv32a60x_config_pkg.sv.sv /home/pescampus/Desktop/CVA6/cva6/verif/core-v-verif/lib/uvm_agents/uvma_core_cntrl///home/pescampus/Desktop/CVA6/cva6/core/include/cv32a60x_config_pkg.sv /home/pescampus/Desktop/CVA6/cva6/verif/core-v-verif/lib/uvm_agents/uvma_core_cntrl///home/pescampus/Desktop/CVA6/cva6/core/include/cv32a60x_config_pkg.sv.v /home/pescampus/Desktop/CVA6/cva6/verif/core-v-verif/lib/uvm_agents/uvma_core_cntrl///home/pescampus/Desktop/CVA6/cva6/core/include/cv32a60x_config_pkg.sv.sv /home/pescampus/Desktop/CVA6/cva6/verif/tb/core///home/pescampus/Desktop/CVA6/cva6/core/include/cv32a60x_config_pkg.sv /home/pescampus/Desktop/CVA6/cva6/verif/tb/core///home/pescampus/Desktop/CVA6/cva6/core/include/cv32a60x_config_pkg.sv.v /home/pescampus/Desktop/CVA6/cva6/verif/tb/core///home/pescampus/Desktop/CVA6/cva6/core/include/cv32a60x_config_pkg.sv.sv /home/pescampus/Desktop/CVA6/cva6/tools/spike/include/disasm///home/pescampus/Desktop/CVA6/cva6/core/include/cv32a60x_config_pkg.sv /home/pescampus/Desktop/CVA6/cva6/tools/spike/include/disasm///home/pescampus/Desktop/CVA6/cva6/core/include/cv32a60x_config_pkg.sv.v /home/pescampus/Desktop/CVA6/cva6/tools/spike/include/disasm///home/pescampus/Desktop/CVA6/cva6/core/include/cv32a60x_config_pkg.sv.sv /home/pescampus/Desktop/CVA6/cva6/core/include/cv32a60x_config_pkg.sv /home/pescampus/Desktop/CVA6/cva6/core/include/cv32a60x_config_pkg.sv.v /home/pescampus/Desktop/CVA6/cva6/core/include/cv32a60x_config_pkg.sv.sv work-ver//home/pescampus/Desktop/CVA6/cva6/core/include/cv32a60x_config_pkg.sv work-ver//home/pescampus/Desktop/CVA6/cva6/core/include/cv32a60x_config_pkg.sv.v work-ver//home/pescampus/Desktop/CVA6/cva6/core/include/cv32a60x_config_pkg.sv.sv %Error-PKGNODECL: /home/pescampus/Desktop/CVA6/cva6/core/include/riscv_pkg.sv:25:21: Package/class 'cva6_config_pkg' not found, and needs to be predeclared (IEEE 1800-2017 26.3) 25 | localparam XLEN = cva6_config_pkg::CVA6ConfigXlen; | ^~~~~~~ ... For error description see https://verilator.org/warn/PKGNODECL?v=5.008 %Error: Exiting due to 2 error(s) make[1]: [Makefile:632: verilate] Error 1 make[1]: Leaving directory '/home/pescampus/Desktop/CVA6/cva6' make: [Makefile:406: veri-testharness] Error 2

Please help me to solve this error.

JeanRochCoulon commented 4 months ago

cv32A60x is deprecated because no more supported, the file cv32a60x_config_pkg.sv has been renamed cv32a60x_config_pkg_deprecated.sv. Submit another issue if you meet another problem.