I am implementing a class extended from uvm_component with 2 uvm_blocking_put_imp ports
As we know to implement a uvm_blocking_put port we need to define the put method in the class where imp port is declared
I can write a code with one imp port. But how can we write put implementation code for 2 imp ports?
This is my imp port declaration
uvm_blocking_put_imp#(cbc_sequence_item,cbc_monitor) driver_imp;
uvm_blocking_put_imp#(cbc_sequence_item,cbc_monitor) put_imp;
NB: To avoid any confusion, these 2 ports are connected to put ports in 2 different components
pinnuk
May 25, 2022, 10:54am
2
In reply to bachan21 :
uvm_blocking_put_port #(reg[31:0]) send1;
uvm_blocking_put_port #(reg[15:0]) send2;
uvm_blocking_put_port #(reg[63:0]) send3;
lass consumer extends uvm_component;
`uvm_component_utils(consumer)
`uvm_blocking_put_imp_decl(_1)
`uvm_blocking_put_imp_decl(_2)
`uvm_blocking_put_imp_decl(_3)
uvm_blocking_put_imp_1 #(reg[7:0],consumer) recv1;
uvm_blocking_put_imp_2 #(reg[15:0],consumer) recv2;
uvm_blocking_put_imp_3 #(reg[3:0],consumer) recv3;
function new(input string inst="CONS",uvm_component c);
super.new(inst,c);
recv1=new("RECV1",this);
recv2=new("RECV2",this);
recv3=new("RECV3",this);
endfunction
You can take this as a reference.