The type_id::create is working for uvm_sequencer but not for uvm_push_sequencer in questa
my code looks like this
/////////
uvm_sequencer #(Trans) stim_sqr;
function void build_phase (uvm_phase phase);
super.build_phase(phase);
stim_sqr = uvm_sequencer#(Trans)::type_id::create(“stim_sqr”,this);
endfunction
This works well
But if i try to use uvm_push_sequencer
uvm_push_sequencer #(Trans) stim_push_sqr;
function void build_phase (uvm_phase phase);
super.build_phase(phase);
stim_push_sqr = uvm_push_sequencer#(Trans)::type_id::create(“stim_push_sqr”,this);
endfunction
I am getting compile error “Failed to find type_id in specified scope”
If I remember correctly, the uvm_push_sequencer is not registered with the factory in the UVM source code, hence the reason for the error below, you need to use the new() method. Probably this was intentional as pull mode is the UVM standard mechanism for sequencer-driver handshaking.
Hi Ayehia,
Can i use start_item and finish_item in sequence body just like we did for pull sequencer
Or should i use anyother handshake for push sequencer/driver
You need to use a uvm_push_driver which has an imp to be connected to the uvm_push_sequencer port. Then implement the put() method of the uvm_push_driver. start_item/finish_item in your sequence should be the same.
For some reason uvm_push_driver doesn’t have `uvm_component_param_utils leading to this. Maybe we should file a bug ticket? Meanwhile you can extend and add the macro as in:
class stim_push_sqr extends uvm_push_sequencer #(Trans);
`uvm_component_param_utils (stim_push_sqr)
//..
endclass