Hazard3 icon indicating copy to clipboard operation
Hazard3 copied to clipboard

what's the problem when I run 'make ' command ?

Open bigdot123456 opened this issue 1 year ago • 2 comments

make failure

when we run 'make' command, here is the result:

make: listfiles: Command not found
make: listfiles: Command not found
mkdir -p build-tb.f
yosys -p 'read_verilog -I ../../../hdl -DCONFIG_HEADER="config_default.vh" ; hierarchy -top tb; write_cxxrtl build-tb.f/dut.cpp' 2>&1 > build-tb.f/cxxrtl.log
ERROR: Command syntax error: No filename given.
> read_verilog -I ../../../hdl -DCONFIG_HEADER="config_default.vh"
>                                                                  ^
make: *** [build-tb.f/dut.cpp] Error 1

Our environment is as following:

uname -a 
Linux bigdot-poweredge-R740 3.10.0-1160.95.1.el7.x86_64 #1 SMP Mon Jul 24 13:59:37 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux

bigdot123456 avatar Oct 24 '23 10:10 bigdot123456

When I update my environment variable, the error becomes as following:

yosys -p 'read_verilog -I ../../../hdl -DCONFIG_HEADER="config_default.vh" /data/gitEDA/hazard3/test/sim/tb_cxxrtl/tb.v /home/bigdot/gitEDA/hazard3/hdl/debug/cdc/hazard3_reset_sync.v /data/gitEDA/hazard3/hdl/hazard3_core.v /data/gitEDA/hazard3/hdl/hazard3_cpu_1port.v /data/gitEDA/hazard3/hdl/hazard3_cpu_2port.v /data/gitEDA/hazard3/hdl/arith/hazard3_alu.v /data/gitEDA/hazard3/hdl/arith/hazard3_branchcmp.v /data/gitEDA/hazard3/hdl/arith/hazard3_mul_fast.v /data/gitEDA/hazard3/hdl/arith/hazard3_muldiv_seq.v /data/gitEDA/hazard3/hdl/arith/hazard3_onehot_encode.v /data/gitEDA/hazard3/hdl/arith/hazard3_onehot_priority.v /data/gitEDA/hazard3/hdl/arith/hazard3_onehot_priority_dynamic.v /data/gitEDA/hazard3/hdl/arith/hazard3_priority_encode.v /data/gitEDA/hazard3/hdl/arith/hazard3_shift_barrel.v /data/gitEDA/hazard3/hdl/hazard3_csr.v /data/gitEDA/hazard3/hdl/hazard3_decode.v /data/gitEDA/hazard3/hdl/hazard3_frontend.v /data/gitEDA/hazard3/hdl/hazard3_instr_decompress.v /data/gitEDA/hazard3/hdl/hazard3_irq_ctrl.v /data/gitEDA/hazard3/hdl/hazard3_pmp.v /data/gitEDA/hazard3/hdl/hazard3_power_ctrl.v /data/gitEDA/hazard3/hdl/hazard3_regfile_1w2r.v /data/gitEDA/hazard3/hdl/hazard3_triggers.v /data/gitEDA/hazard3/hdl/debug/dm/hazard3_dm.v /data/gitEDA/hazard3/hdl/debug/dtm/hazard3_jtag_dtm.v /data/gitEDA/hazard3/hdl/debug/dtm/hazard3_jtag_dtm_core.v /data/gitEDA/hazard3/hdl/debug/cdc/hazard3_apb_async_bridge.v /data/gitEDA/hazard3/hdl/debug/cdc/hazard3_reset_sync.v /data/gitEDA/hazard3/hdl/debug/cdc/hazard3_sync_1bit.v; hierarchy -top tb; write_cxxrtl build-tb.f/dut.cpp' 2>&1 > build-tb.f/cxxrtl.log
/data/gitEDA/hazard3/hdl/debug/cdc/hazard3_reset_sync.v:19: ERROR: Re-definition of module `\hazard3_reset_sync'!
make: *** [build-tb.f/dut.cpp] Error 1

bigdot123456 avatar Oct 24 '23 10:10 bigdot123456

That's interesting, the file list from that yosys command line does have two instances of the hazard3_reset_sync.v source file, which would explain why it complains about multiple definitions. One of them is at /home/bigdot/gitEDA/hazard3/hdl/debug/cdc/hazard3_reset_sync.v and the other is at /data/gitEDA/hazard3/hdl/debug/cdc/hazard3_reset_sync.v .

What I think has happened here is you have checked out the hazard3 repository in two different locations, run . sourceme in one of them, and then tried to build the simulator in the other checkout. This would cause relative links to that source file to pick up the version in the current checkout, and $HDL env-relative links to pick up the version in the other checkout.

Could you please:

  • Paste the output of env (particularly the HDL and PROJ_ROOT variables
  • Re-run . sourceme or source sourceme in the root of the same checkout you are building the simulator in and then try building again

Wren6991 avatar Nov 03 '23 19:11 Wren6991

The underlying issue here should be fixed by d239de8

Wren6991 avatar May 27 '24 15:05 Wren6991