Hi all,
I have a doubt regarding caravel RTL simulation, I have two GPIO inputs both defined as GPIO_MODE_USER_STD_INPUT_NOPULL in the C file, both are configured with the same signal in the testbench verilog but when I see the simulation one signal has a X value instead of 0 and the other one works correctly. Attached is the simulation showing this behavior.
What could cause this behavior, is it due to the use of GPIO 36?
m
Mitch Bailey
04/02/2024, 1:09 AM
@Emilio Baungarten you’re simulating
caravel
not
caravan
, correct?
If these signals are both inputs, I expect that the testbench is driving them. What testbench are you using?
✅ 1
e
Emilio Baungarten
04/02/2024, 2:16 AM
I started with the
io_ports
example and modified some things to simulate my module, I attach the verilog file.
on line 320 I have
assign mprj_io[36] = prog_clk[0];
, on line 327 I assign _gfpga_pad_GPIO_PAD[0]_ to _mprj_io[26]_ (
after reviewing carefully the TB code, I found the problem, and it was due to using the GPIO template, at the beginning of the code it was defined as follows
assign mprj_io[37:35] = 3'b111;
so when port 36 receives the 0 clock it generates an unknown value because a 0 and a 1 are assigned at the same time.
Linen is a search-engine friendly community platform. We offer integrations with existing Slack/Discord communities and make those conversations Google-searchable.