Jump to content

David Long

  • Content Count

  • Joined

  • Last visited

  • Days Won


David Long last won the day on January 3 2019

David Long had the most liked content!


About David Long

  • Rank
    Junior Member

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Hi Adam, Setting the use_metadata bit in the packer will add an extra 32 bits to the payload. I gather from the original question that the driver is using the UVM packer to generate the payload that is being sent to the DUT. This must reflect what the DUT is actually expecting to see. Adding extra bytes just to enable the monitor to automatically unpack it would not be acceptable here! That is why I suggested using a for loop with `uvm_unpack_int once the dynamic array size was known. Regards, Dave
  2. The critical point that you must remember is that it is not possible to automatically unpack a stream of bits/bytes into a dynamic array since the unpack operation does not know how big the dynamic array should be (assigning to a dynamic array overwrites the existing contents and can therefore change its size). In your case, and using the example above, you would need something like this in your do_unpack function virtual function void do_unpack(uvm_packer packer); ... //unpack preceeding bytes payload = new [payload_size_in_bytes]; foreach (payload[i]) `uvm_unpack_int(payload[i])
  • Create New...