Layering in Uvm - VH v7 I3 PDF
Layering in Uvm - VH v7 I3 PDF
Layering in Uvm - VH v7 I3 PDF
CHILD SEQUENCERS
A child sequencer in a layering is simply the usual
sequencer for that protocol. Very often an appropriately
paramterized uvm_sequencer is quite sufficient. If the
higher level protocol has been modeled as a
protocol UVC, then the layering should instantiate
an instance of the sequencer used by the agent for
that protocol so that sequences can be targeted
either at the bus agent or the layering.
For example, the ABC layering below has an A_
sequencer and a B_sequencer.
TRANSLATOR SEQUENCES
A sequence which translates from upstream items to
downstream items runs on the downstream sequencer
but has a reference to the upstream sequencer. It directly
references the upstream sequencer to call get_next_item
and item_done to get upstream items and tell the upstream
sequencer that it has finished processing the upstream
sequence item. Between get_next_item and item_done it
sends data to and gets data from the lower level sequencer
by calling start_item and finish_item. A simple BtoC
translator sequence is shown below:
class BtoC_seq extends uvm_sequence #(C_item);
`uvm_object_utils(BtoC_seq);
function new(string name=);
super.new(name);
endfunction
uvm_sequencer #(B_item) up_sequencer;
virtual task body();
B_item b;
C_item c;
int i;
forever begin
up_sequencer.get_next_item(b);
foreach (b.fb[i]) begin
c = C_item::type_id::create();
start_item(c);
c.fc = b.fb[i];
finish_item(c);
end
up_sequencer.item_done();
end
endtask
endclass
26
27
ap = new(ap , this );
endfunction
function void connect_phase(uvm_phase phase);
c2b_mon.ap.connect(b2a_mon.analysis_export);
b2a_mon.ap.connect( ap );
endfunction
...
endclass
28