I have a specific requirement in the below code.
task normal_seq::body();
begin
reset_seq.start(null,this); // reset sequence
begin
normal_seq1.start(null,this); // sequences following reset sequence.
normal_seq2.start(null,this);
normal_seq3.start(null,this);
normal_seq4.start(null,this);
normal_seq5.start(null,this);
end
end
endtask
I wanted to have multiple resets during simulation with random delays. and if reset is detected, then normal_seq1 should start executing after each reset.
task normal_seq::body();
fork
repeat(5) begin
#($urandom_range(25,20))
reset_seq.start(null,this); // reset sequence
end
begin
normal_seq1.start(null,this); // sequences following reset sequence.
normal_seq2.start(null,this);
normal_seq3.start(null,this);
normal_seq4.start(null,this);
normal_seq5.start(null,this);
end
join
endtask
Problem is i am not finding a way to return my normal sequence flow to normal_seq1 each time reset is detected. Could you please suggest a way to do it.
Thanks