I would like to understand the rule of item instantiation vs. the rule of item creation .
refmofel.sv file :
`uvm_analysis_imp_decl(_from_axi)
`uvm_analysis_imp_decl(_from_apb)
class refmodel extends uvm_component;
ram_item item;
uvm_analysis_port #(ram_item) ram_analysis_port
...
function void write_from_axi(axi_item axi_curr_item)
item = ram_item::type_id::create("item");
item.data = axi_curr_item.data;
ram_analysis_port.write(item);
endfunction : write_from_axi
function void write_from_apb(apb_item apb_curr_item)
item = ram_item::type_id::create("item");
item.data = apb_curr_item.data;
ram_analysis_port.write(item);
endfunction : write_from_apb
endclass
My question is on "item" of type ram_item.
If I instance 1 item and use it 2 times in 2 functions + create and send with write,
Is it OK to do that ?
or can cause issues ?