How to start sequences randomly without using fork join

Hi could you please provide the clarifications for the following.

is there any better way to start sequences randomly without using fork join


task body()
fork
seq1.start(sqr1);
seq2.start(sqr2);
join

endtask 




In reply to srbeeram:

You would have to provide more information about what you want to accomplish. Do you want to run the sequences in parallel? In series? What is wrong with fork/join that you can’t use it?

In reply to cgales:

I need to run sequences randomly. I came to know there is another way to do it. but I am not aware how to do it.

In reply to srbeeram:

Hi could you please provide the clarifications for the following.
is there any better way to start sequences randomly without using fork join


task body()
fork
seq1.start(sqr1);
seq2.start(sqr2);
join
endtask 

You could instead use a randcase or a randsequence.
For the randcase it looks like

randcase
   2: seq1.start(sqr1);
   5: seq2.start(sqr2);
endcase

2 and 5 are weights. In this case seq2 will be started with a higher priority.
You could put the randcase in a loop. Then the sequences will be started repeatedly.

In reply to chr_sue:

ok Thanks for the clarifications