One sequence calls another sequence which calls another sequence again.
The bottom most sequence randomizes the sequence_item and sends it over driver.
I agree that the bottom-most sequence needs a sequencer to run on (as it gets routed to driver through TLM port).
But for the other sequences mentioned here, do we need a sequencer?
If I have something like this.
class a extends uvm_sequence #(trans)
//object utils macro not shown
b b_inst //note that b is a sequence)
task body
`uvm_create(b)
some code.....
`uvm_send(b)
endtask
endclass
class b extends uvm_sequence #(trans)
//object utils macro not shown
c c_inst //note that c is a sequence)
task body
`uvm_create(c)
some code.....
`uvm_send(c)
endtask
endclass
class c extends uvm_sequence #(trans)
//object utils macro not shown
trans trans_inst;
task body
`uvm_create_on(trans_inst,some_seqr)
some code.....
`uvm_send(trans_inst)
endtask
endclass
In above code, only last sequence sends transaction item and also calls create_on and specifies a sequencer.
All others dont specify seqeuncer.Will this code work?
The question is what is your objectice. I believe your code is useless, because all sequences are parameterized with the item. That mena it should generate seq_items.
But a sequence does not have to generate sequence items.
A virtual sequence is startring several other sequences, and it does not need a sequencer.
And any sequence can contain other sequences which are intended to run on the same sequencer.
Both cases are very useful,
Thanks for your reply. For layered protocols there are some examples where sequencers are chained. Can you please point to any use case or example where only sequences are nested in non virtual sequence
And any sequence can contain other sequences which are intended to run on the same sequencer.