K
krivan
Guest
verilog inout testbench
I wrote a testbench for my i2c code but it doesn't seem to work.
In the module SDA is an inout port.
In the testbench:
...
wire SDA;
reg SDA_reg;
OE = 1;
...
assign SDA = (OE == 1) ? SDA_reg : 1'bz;
...
I always write SDA_reg. The problem is that SDA always stays in Z and it isn't loaded. Does anyone has idea what I do wrong?
Thx,
krivan
I wrote a testbench for my i2c code but it doesn't seem to work.
In the module SDA is an inout port.
In the testbench:
...
wire SDA;
reg SDA_reg;
OE = 1;
...
assign SDA = (OE == 1) ? SDA_reg : 1'bz;
...
I always write SDA_reg. The problem is that SDA always stays in Z and it isn't loaded. Does anyone has idea what I do wrong?
Thx,
krivan