Another question, is there any solution to simulat...
# general
r
Another question, is there any solution to simulate the top io in
verilog/dv/xxx/xxx_tb.v
. They are
inout
port and I always got
z
or
x
, if I connected them to other module or write to them.
m
I'm simulating it using io_ports_tb.v and it works almost fine... It needs quite some time to finish configuration of the GPIOs; maybe 1 ms.
r
Yes,
io_ports_tb.v
does work fine. But it's too simple. How about connect the
inout
GPIO to other module and review the waveform on
gtkwave
?
m
You need to specify the configurations in io_ports.c and use mprj_io for connections.
mprj_io is declared in io_ports_tb.v
And it appears that the GPIO initialization config in user_defines.v has no effect on this simulation... yet :)
2
r
No effect? are you sure?
m
Almost. For example, io_ports.c is configuring GPIOs 0 thru 7 as outputs. I specified this config in user_defines.v and commented this config in io_ports.c . The test failed :)
Not completely sure though... maybe the testbench needs to be updated to accommodate user_defines.v .
r
@jeffdi Is that a bug? We'd better have a correct simulation env to ensure the wrapper of the design is correct.
m
I think Jeff is busy enough as it is 😂
d
for local Simulation to work, you need to modify file:mgmt_core_wrapper/verilog/includes/includes.rtl.caravel From: -v $(CARAVEL_PATH)/rtl/user_defines.v To: -v $(USER_PROJECT_VERILOG)/rtl/user_defines.v My local simulation work fine with this change
👀 1
p
yes, I remember seeing something including it in the caravel verilog when wandering around the rtl: https://github.com/efabless/caravel/blob/5f4a5b7b46f05d476622ab9d9c24eb5721ef495a/verilog/rtl/caravel_netlists.v#L24