mastrick Posted November 30, 2012 Report Share Posted November 30, 2012 We want to pack a field of type bit[95:0] with big_endian. If we use `uvm_pack_intN(field,96), we lose 32 bits because the macro uses a temporary variable of type longint. Is there some other way to do this? If not, should uvm_pack_intN use uvm_bitstream_t like the unpack version does? Thanks, Mark Quote Link to comment Share on other sites More sharing options...
jadec Posted November 30, 2012 Report Share Posted November 30, 2012 I agree this is a bug in the library. In fact, since you passed the exact size to the macro, there's no reason not to declare the data of the appropriate size. uvm_pack_intN is a utility macro, you can just copy that code into your own implementation and fix the size issue. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.