cat Posted August 6, 2012 Report Share Posted August 6, 2012 I am mis-understanding unpack_object in some way. It does not unpack the object as I expect but does if I call unpack_field_int on each member of the instantiated class. Thanks for any clarification. class BIG extends uvm_sequence_item; bit[7:0] b; SMALL sm; function void do_unpack(uvm_packer); super.do_unpack(packer); b = packer.unpack_field_int($bits(); packer.unpack_object(sm); //does NOT give correct value to sm members // sm.a=packer.unpack_field_int($bits(sm.a)); //this gives correct value endfunction endclass class SMALL extends uvm_sequence_item; bit[3:0] a; function void do_unpack(uvm_packer); super.do_unpack(packer); this.a=packer.unpack_field_int($bits(a)); endfunction endclass Quote Link to comment Share on other sites More sharing options...
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.