Hey,
I've been playing around with this repo for a few weeks now and I find it really interesting! But now I've hit a roadblock.
My plan was to use the generated design.v from the GUI with a testbench I got from this Issue (slightly adapted) and use verilator to build myself a CGRA simulator. This is where I cannot progress, because I can't seem to get the testbench working with the verilog file.
For reference, I used following command:
verilator --cc --build --exe --trace --Wno-fatal design.v --top-module CGRATemplateRTL__203d86ac8b96739b testbench.cpp
While the top-module can be found in design.v, the class that is used in the testbench is VCGRATemplateRTL___05F203d86ac8b96739b which I'm guessing is generated by verilator. But using this class in the testbench doesn't work because I'm getting a lot of errors like this:
../testbench.cpp:140:40: error: ‘class VCGRATemplateRTL___05F203d86ac8b96739b’ has no member named ‘recv_from_noc___05Fmsg’; did you mean ‘recv_wopt___05Fmsg’? 140 | m->recv_from_noc___05Fmsg = model->recv_from_noc___05Fmsg;
This is even more confusing because the testbench defines it's own type similar to the mentioned class. Could this be resolved by just further altering the testbench or do I need to use a different approach?
To be honest I'm not even sure if what I'm doing could acutally work, so I'd love to get some help! I'm currently using this repo for a project in university so my experience with open-source software like this is pretty limited.
Thanks in advance!
Hey,
I've been playing around with this repo for a few weeks now and I find it really interesting! But now I've hit a roadblock.
My plan was to use the generated
design.vfrom the GUI with a testbench I got from this Issue (slightly adapted) and use verilator to build myself a CGRA simulator. This is where I cannot progress, because I can't seem to get the testbench working with the verilog file.For reference, I used following command:
verilator --cc --build --exe --trace --Wno-fatal design.v --top-module CGRATemplateRTL__203d86ac8b96739b testbench.cppWhile the top-module can be found in
design.v, the class that is used in the testbench isVCGRATemplateRTL___05F203d86ac8b96739bwhich I'm guessing is generated by verilator. But using this class in the testbench doesn't work because I'm getting a lot of errors like this:../testbench.cpp:140:40: error: ‘class VCGRATemplateRTL___05F203d86ac8b96739b’ has no member named ‘recv_from_noc___05Fmsg’; did you mean ‘recv_wopt___05Fmsg’? 140 | m->recv_from_noc___05Fmsg = model->recv_from_noc___05Fmsg;This is even more confusing because the testbench defines it's own type similar to the mentioned class. Could this be resolved by just further altering the testbench or do I need to use a different approach?
To be honest I'm not even sure if what I'm doing could acutally work, so I'd love to get some help! I'm currently using this repo for a project in university so my experience with open-source software like this is pretty limited.
Thanks in advance!