What is Sequence Layering?
Sequence layering is refered to as running sequences inside sequences.
So whats the big deal. There are virtual sequences we will use to run multiple sequences. A generic example of sequence layering.
you have two sequences
- Interrupt sequence
- register read write sequence.
Generally when you have interrupt, we generally enter into interrupt service routine, which can be implemented as an interrupt sequence. So when you run an interrupt sequence, you might end up running register read /write sequence like polling or clearing interrupts.
Well thats easy, just run one sequence in another.
class top_seq extends uvm_sequence#(txn_item); //Two sequencers say.. sub sequences. sub_seq1 seq1; sub_seq2 seq2; ... task body(); seq1.start(some_seqr); seq2.start(some_seqr2); endtask endclass
Killing sequences:
That was great you are running nested sequences. But how to kill them when needed.UVM provides method called seq.kill() to kill the sequences.
Does this kill the sequences started off by a sequence?
when you call top_seq.kill().. does it kill the sub sequences when above code is considered? No. because sequences dont have any hierarchical notion. So we have to mention what is the parent sequence while starting a sub sequence..
When starting a sequence with in another sequence, pass the current sequencer(this) as argument to the start task.
class top_seq extends uvm_sequence#(txn_item); //Two sequencers say.. sub sequences. sub_seq1 seq1; sub_seq2 seq2; ... task body(); seq1.start(some_seqr, this); seq2.start(some_seqr2, this); endtask endclass
Here if you see we are passing this as argument to seq.start. This will register the child sequences in the top_seq.
By this when you call top_seq.kill(). this will check for child sequences which are started with this top sequence as parent and kill those sequences.
شركة تنظيف سجاد ببريدة
ReplyDeleteشركة تنظيف سجاد بالرس
شركة تنظيف سجاد بعنيزة
where the top_seq.kill() is being called , after end task
ReplyDelete