rsd-devel / rsd

RSD: RISC-V Out-of-Order Superscalar Processor
Apache License 2.0
934 stars 95 forks source link

cannot convert ‘const VlWide<92>’ to ‘const uint32_t (&)[92]’ {aka ‘const unsigned int (&)[92]’} #67

Closed Ailie-chen closed 1 year ago

Ailie-chen commented 1 year ago
I use the verilator branch v4.026-2-g0c6c83e to run Simulation. But when I make Makefile.verilator.mk, I get the error "In file included from ../../../Src/SysDeps/Verilator/TestMain.cpp:4: ../../../Src/SysDeps/Verilator/VerilatorHelper.h:475:85: error: cannot convert ‘const VlWide<92>’ to ‘const uint32_t (&)[92]’ {aka ‘const unsigned int (&)[92]’} 475 d->memberName0.memberName1 = h->DebugRegister##memberName0####memberName1(r); \ ^
const VlWide<92>

../../../Src/SysDeps/Verilator/VerilatorHelper.h:732:5: note: in expansion of macro ‘RSD_MAKE_STRUCT_ACCESSOR_LV2’ 732 | RSD_MAKE_STRUCT_ACCESSOR_LV2(DebugRegister, perfCounter, DataPath, numBranchPredMissDetectedOnDecode) | ^~~~~~~~ In file included from ./VMain_Zynq_Wrapper__Syms.h:16, from ../../../Src/SysDeps/Verilator/TestMain.cpp:2:" It seems like a verilator version problem, How should I fix it?

Ailie-chen commented 1 year ago

I have address it. Beacause I don't set the right VERILATOR_ROOT besides RSD_VERILATOR_BIN

zhangkanqi commented 7 months ago

How did you fix this error? I also encountered this problem. #72

Ailie-chen commented 7 months ago

Add an Environment Virable: VERILATOR_ROOT, and set it as same as RSD_VERILATOR_BIN

zhangkanqi commented 7 months ago

I have set VERILATOR_ROOT and RSD_VERILATOR_BIN already, and make them same. But it reports: image

Ailie-chen commented 7 months ago

Get it!, Problem is the version: Verilator 4.026 2020-01-11 rev v4.026-2-g0c6c83e is required. Check test environment carefully.

zhangkanqi commented 7 months ago

I've noticed this problem before, but I think it should also work with Verilator 4.026+. I will try Verilator 4.026.

Ailie-chen commented 7 months ago

Verilator 4.026 is not enough, branch v4.026-2-g0c6c83e is needed.

zhangkanqi commented 7 months ago

why? Have you tried this before?

Ailie-chen commented 7 months ago

Yes, I have try it. For more information, you can email me.:chenwei_cs@stu.pku.edu.cn

zhangkanqi commented 7 months ago

ok~