uvm_packer

class uvm.base.uvm_packer.UVMPacker[source]

Bases: object

The UVMPacker class provides a policy object for packing and unpacking uvm_objects. The policies determine how packing and unpacking should be done. Packing an object causes the object to be placed into a bit (byte or int) array. If the `uvm_field_* macro are used to implement pack and unpack, by default no metadata information is stored for the packing of dynamic objects (strings, arrays, class objects).

bitstream = []
fabitstream = []
pack_field(value, size) None[source]
pack_field_int(value: int, size: int) None[source]
pack_bytes(value, size=-1) None[source]
pack_ints(value, size=-1) None[source]
pack_string(value) None[source]
pack_object(value) None[source]
unpack_field(size)[source]
unpack_field_int(size) int[source]
unpack_bytes(value, size=-1)[source]
unpack_ints(value, size=-1)[source]
unpack_string(num_chars=-1)[source]
unpack_object(value)[source]
get_packed_size() int[source]
get_packed_bits() int[source]
get_bit(index) int[source]
get_bits() int[source]
get_bytes() List[int][source]
get_ints() List[int][source]
put_bits(bitstream)[source]
set_packed_size()[source]
index_error(index, id, sz)[source]
enough_bits(needed, id, is_error=True)[source]
reset()[source]
flip_bit_order(value, size: int) int[source]
uvm.base.uvm_packer.get_bits(bits, count, nbits)[source]