I am applying on the fly reset in my env. code is similar to this.
//code in Env
task main_phase(uvm_phase phase)
if(on_fly_reset) begin
#100000000;
reset_dut();
end
endtask
task reset_dut();
reset_assert.start(null);
vir_seqr.stop_sequnces();
reset_deassert.start(null);
endtask
//Code in test
task main_phase(uvm_phase phase);
for(int i=0;i<10;i++) begin
my_seq.start(env.vir_seqr);
end
endtask
When on_fly_reset arg is enabled it asserts reset to dut,kill all sequences on vir seqr and de-asserts the reset. The problem is when reset is applied seq which is running is killed(this is fine) and the test is immediately starting the another seq on seqr.
I want my seqr to suspend till reset is de-asserted. Can someone provide me solution for this?