I have to drive inout signal of DUT
so I have declared my interafce as below:
//interface
`timescale 1ns/1ps
interface tb_sys_interface;
timeunit 1ns;
timeprecision 100ps;
time clock_period = 30.3030ns;
wire x
logic x_reg ; //
...........
...........
...........
initial
begin
x_reg = 0;
forever
begin
#(clock_period/2) x_reg = 1;
#(clock_period/2) x_reg = 0;
end
end
assign x=x_reg;
endinterface
when i run this in questasim x_reg VALUE is not getting assigned to x.so can you please tell me what is the issue with interface?
or this way of continuous assignment is allowed in interface?
If you are always seeing an ‘x’ on a signal, you will need to look at how that signal is being resolved. If you have an assign statement inside your interface, that is one driver of signal x. How is the signal x connected to the DUT? Is it connected to an output or inout? The DUT could be attempting to drive signal x as well, resulting in multiple drivers and an ‘x’ value.