Araxnid
Newbie level 6
Hello, can someone help me with simulating my module, i read some topics here about this problem, but still cant understand how to use inout port in right way.
So i have a main module with USB_DATA inout type
then, i use
RX_START - my control signal ( reg ) and Q is reg[7:0]
So, in test bench i write it so:
So, in modelsim i get USB_DATA_reg zero, but USB_DATA still X, what im doing wrong?
So i have a main module with USB_DATA inout type
Code:
inout [7:0]USB_DATA;
then, i use
Code:
assign USB_DATA = RX_START ? Q : 8'bZ;
So, in test bench i write it so:
Code:
wire[7:0] USB_DATA;
reg [7:0]USB_DATA_reg;
reg oe = 0;
USB U0(RESET,
CLK,
USB_DATA,
USB_RD,
USB_WR,
USB_TXE,
USB_RXF
);
assign USB_DATA = oe? 8'bZ : USB_DATA_reg;
initial
begin
USB_DATA_reg[7:0]=0;
CLK = 0;
RESET = 0;
end
So, in modelsim i get USB_DATA_reg zero, but USB_DATA still X, what im doing wrong?