hi,
anyone can help me with below code that how to stop replicating the values in element.
class mon extended uvm_monitor;
trans_item xtn, xtn_container[$];
.
.
function build_phase(...);
xtn = new();
endfunction
function push_in_queue(pkt);
if(pkt.tail == 1) begin
container.push_back(pkt);
pkt.payload = 'b0; //changing this pkt here is changing the element of container as well.
end
endfunction
endclass