Since the UVC doesn't do any kind of reset at the start of the simulation (only when triggered), I need to implement drive a negedge on reset_n at time 0:
bit reset_n = 1;
bit clk;
always #1 clk = ~clk;
initial begin
reset_n <= 0;
@(negedge clk);
@(negedge clk);
reset_n <= 1;
end
Normally I start a sequence in my test also at time 0:
The problem is that there is a race condition here and the sequence process gets killed. This is because the sequencer's handle_reset() method stops all running sequences.
Since the UVC doesn't do any kind of reset at the start of the simulation (only when triggered), I need to implement drive a negedge on reset_n at time 0:
Normally I start a sequence in my test also at time 0:
The problem is that there is a race condition here and the sequence process gets killed. This is because the sequencer's
handle_reset()
method stops all running sequences.