Running two sequences parallely

Hi,

Run two sequences simultaneously
The role of the sequencer is to allow multiple sequences to run in parallel.
my_seq seq1 = my_seq::type_id::create(“seq1”);
my_seq seq2 = my_seq::type_id::create(“seq2”);
fork
seq1.start(my_sequencer);
seq2.start(my_sequencer);
join

I need to use something similar as above, where I must run two sequences in parallel.
Driver has two independent channels connected to interface.
As soon as one transaction completes on a channel, it has to pick a new transaction without waiting for other channel’s transaction to complete.
If I fork off two sequences in parallel as mentioned above, how the driver can handle to sequences at the same time if it has only one get_next_item?
If you prioritize the sequences, there would be a dependency on channels as it has to wait untill it recieves a new transaction.
For me Both channels has to start at same time and can complete its transactions at anytime and pick next data item and run independently.

Please suggest me some coding methodologies for the above scenario.
Thanks.

You use the seq_item_port.get() method in the driver.

See:

https://verificationacademy.com/uvm-ovm/Driver/Pipelined

In reply to mperyer:

  1. With fork, join, In the case of 2 sequences to be run independently on the same driver and only one sequenceR :
    Is there any in-built mechanism provided by UVM for the sequenceR to not “hang” any sequence? Meaning, if the grant for seq1 has not been received, then what happens to the seq2?

  2. what happens if we don’t use fork join? Will it hang?

Basically, trying to understand hang cases. Please share ideas.

In reply to UVM_beginner:

  1. With fork, join, In the case of 2 sequences to be run independently on the same driver and only one sequenceR :
    Is there any in-built mechanism provided by UVM for the sequenceR to not “hang” any sequence? Meaning, if the grant for seq1 has not been received, then what happens to the seq2?

  2. what happens if we don’t use fork join? Will it hang?

Basically, trying to understand hang cases. Please share ideas.

In reply to UVM_beginner:

In reply to UVM_beginner:

  1. With fork, join, In the case of 2 sequences to be run independently on the same driver and only one sequenceR :
    Is there any in-built mechanism provided by UVM for the sequenceR to not “hang” any sequence? Meaning, if the grant for seq1 has not been received, then what happens to the seq2?
  2. what happens if we don’t use fork join? Will it hang?
    Basically, trying to understand hang cases. Please share ideas.

The sequencer will never hang, because it is not the active component. Only the driver might hang.
The question is if it is agood soklution running 2 sequences in parallel. And the question is if you real asking for a pipeliend approach.