Help me with this error plz?

Hello all,

What is this error?

UVM_ERROR @ 1300: reporter [PCKSZ] 16 bits needed to unpack integral, yet only 0 available.
UVM_ERROR @ 1300: reporter [PCKSZ] 8 bits needed to unpack integral, yet only 0 available.

Can someone please help in resolving this error? Does it mean that unpacking of my transaction packets didnt happen properly? How does packing and unpacking work? Is it needed while creating back the bytes I received from DUT?

Thanks in advance,
swapnil

Hello all,
I am still waiting for some feedback on this error, I am still stuck at this. Can anyone of you uvm geek, put some light on this. Its kinda urgent.
Thanks in advance,
swapnil

The dynamic array of bits that you pass to unpack() must have enough bits to complete the operation. The error you are seeing indicates that the array you are providing does not contain enough bits, and thus the unpack operation has failed.

You don’t provide details of your application, so I can only give general advice.

The
UVM Reference documentation describes how pack/unpack work, and it shows a simple example.

Another example can be found in here
. (This is the docs for UVM Connect, but the SV-side pack/unpack example shown still applies.)

You know you’ve coded your do_pack/do_unpack routines correctly if you can pack an object a and unpack into another instance b, then compare a and b to find they are equal.

Pseudo code (not verified):
my_packet a, b;
uvm_bitstream_t bits;

a = new("a");
b = new("b");
  // assign properties of object a here...
a.pack(bits);
  // bits now contains "serialized" values of the properties of object a...
b.unpack(bits);
  // b's properties should now be the same values as a's
if (!a.compare(b))
   `uvm_error("MISMATCH","The pack/unpack test failed!")

If you are passing to unpack() an array of data that came from a DUT, i.e. did not come from a pack operation, you must write your do_unpack routine to match the ordering each field appeared on the bus and appended to that data array.

In reply to Adam:

Hello Adam,
Thanks for your reply. I appreciate it. The error got resolved.

Regds,
swapnil

In reply to swapnilm:

Hi swapnilm,

Could you share the solution here, I am facing similar issue in my TB.