Hi ,
I see that when seq_item_port of uvm_driver is instantiated in its constructor the min_size and max_size are 0 and 1 respectively .
So I decided to change max_size to UVM_UNBOUNDED_CONNECTIONS ( To connect multiple sequencers )
class user_driver extends uvm_driver#(Txn) ; // uvm_driver Requires uvm_sequence_item Type as a Parameter !!
`uvm_component_utils(user_driver)
function new (string name , uvm_component parent);
super.new(name,parent);
seq_item_port = new("my_seq_item_port",this,0,UVM_UNBOUNDED_CONNECTIONS); // Name Argument Changed !!
endfunction
.....
// In agent which instantiates driver
user_driver drv ;
uvm_sequencer #(Txn) seqr1 ;
uvm_sequencer #(Txn) seqr2 ;
virtual function void build_phase ( uvm_phase phase ) ;
drv = user_driver::type_id::create("drv",this);
seqr1 = uvm_sequencer#(Txn)::type_id::create("seqr1",this); // Remember uvm_sequencer#(Txn)::type_id else Error !!
seqr2 = uvm_sequencer#(Txn)::type_id::create("seqr2",this);
endfunction
virtual function void connect_phase ( uvm_phase phase ) ;
drv.seq_item_port.connect(seqr1.seq_item_export);
drv.seq_item_port.connect(seqr2.seq_item_export);
endfunction
virtual function void end_of_elaboration_phase ( uvm_phase phase ) ;
uvm_root uvm_top = uvm_root::get() ;
uvm_top.print_topology();
endfunction
I see the Output ( Only driver part written down ) as ::
----------------------------------------------------------
Name Type Size Value
----------------------------------------------------------
uvm_test_top my_agent - @454
drv user_driver - @462
my_seq_item_port uvm_seq_item_pull_port - @488
rsp_port uvm_analysis_port - @479
seq_item_port uvm_seq_item_pull_port - @470 // [Q2]
[Q1] Why was the min_size of uvm_seq_item_pull_port chosen to be 0 ?
[Q2] Why is that uvm_seq_item_pull_port gets displayed twice ? Shouldn’t the default one ( instantiated inside uvm_driver ) be null since we
call new() again on it ? ( SV LRM 8.29 ) .
[Q3] If I call null explicitly before calling new() again I still see same output , why so ?
Thanks ,