Stopping sequences from their middle and resuming them from next transaction

Hi all,
I have a scenario like this.

The sequence contains 10 txns.

Start Seq1. Stop it on txn 4.
Start Seq2. Stop it on txn 7.
Start Seq3. Complete it.( Sends all 10 txns)
Resume Seq1 from txn 5 and finish it.
Resume Seq2 from txn 8 and finish it.

If somebody could help me here, it would be really thankful.

Thanks,
Ajith.

It would help to know a few more details.

Are your 5 steps (start,start,start,resume,resume) to be executed in series, or are you starting 3 sequences in parallel? And are these three sequences identical? And not sure that it would matter, but is there one driver or three?

In reply to dave_59:

Hi Dave,
These 5 steps need to be executed in series. All three sequences are identical. Also, these are run on the same driver.

Thanks,
Ajith.

In reply to Ajith Jose:

One possibility is to set the sequencer arbitration to SEQ_ARB_STRICT_FIFO and start the three sequences in parallel. Each sequence should have store relative starting priority and a threshold for stopping.
Give seq1 priority 100 threshold 4
Give seq2 priority 90 threshold 7
Give seq3 priority 80 threshold 10

Then start your three sequences in parallel, and have them send their transactions with given priority. As each sequence passes the threshold number of transactions, decrease the priority by 30.

Without know more about the reasoning behind why you need to do this, I don’t know if other ways might be more adaptable.

Why not just use hierarchy:
Start Seq1 get 4 txn.
Start Seq2 get 7 txn.
Start Seq3. Complete it.( Sends all 10 txns)
Start Seq1 and finish it (with info from earlier 4 txn)
Start Seq2 and finish it (with info from earlier 7 txn)

Use Just-in-time adaptive transaction randomization

I never liked the arbitration/priority complexity in UVM

In reply to dave_59:

Hi Dave,
Thanks a lot for the update.

Let me elaborate my problem statement here.
I want to run 10 sequences ( all of same type) in DUT. They need to be picked in random order. Once a sequence is picked, only that is driven to DUT. It can either get completed or stopped in between (at any transaction) based on some condition on the DUT. [ Thus I need the capability of stopping a sequence at any txn boundary and resume it later]
If the sequence is completed or stopped in between, either a fresh sequence need to be started OR another sequence which was previously stopped need to resume.(This sequence which is resuming even can be the same sequence that is presently stopped].
This need to be repeated until all sequence are finished.
Could you help me here.

Thanks,
Ajith.

In reply to Ajith Jose:

Ajith,

I think you ought to re-read your original description in you first post and compare it to the level of detail provided in your last post - there is a big difference. And there still are a lot more questions, like how do you decide which sequence to stop or resume?

It still seems to me that you want to start 10 sequences in parallel, each with random priority from a shuffled list of 10 different priorities. The lower priority sequences will be blocked while the higher priority sequences continue to execute. Then at some point the current sequence may get blocked, which would allow the next lower priority sequence to resume.

I suggest you read some of the material below and try coding up something to get yourself started.

This UVM Cookbook article on Stimulus/Signal Wait

and

Featured Technical Papers from DVCon 2013

Sequence, Sequence on the Wall – Who’s the Fairest of Them All?

by Rich Edelman and Raghu Ardeishar, Mentor Graphics Corporation

The reader of this paper is interested to use UVM sequences to achieve his test writing goals. Examples of UVM sequences will be used to demonstrate basic and advanced techniques for creating interesting, reusable sequences and tests.

Seven Separate Sequence Styles Speed Stimulus Scenarios

by Mark Peryer, Mentor Graphics Corporation

Writing effective stimulus in UVM can prove to be challenging for various reasons, but not knowing about the relevant coding design patterns should not be one of them. There are various alternative techniques for writing sequences and choosing the right approach requires mastery of several styles. This paper describes seven common sequence design patterns which should prove useful to all UVM sequence writers. These patterns can be used stand-alone or combined to solve practical stimulus generation problems using UVM sequences.