function void do_copy(uvm_object rhs);
write_txn rhs_;
if(!($cast(rhs_,rhs)))
`uvm_fatal(“error”,“not assigned”);
super.do_copy(rhs);
data = rhs_.data;
–
endfunction
function void do_copy(uvm_object rhs);
write_txn rhs_;
if(!($cast(rhs_,rhs)))
`uvm_fatal(“error”,“not assigned”);
super.do_copy(rhs);
endfunction
In reply to Lakshman4178:
rhs in do copy is of type uvm_object and rhs_ is mof type write_txn.
To work with both entries you have to perform a rype cast using $cast