avl._core.struct module
- class avl._core.struct.Struct[source]
- to_bits() int[source]
Convert the Struct instance to a bit representation. This method combines the values of all fields into a single integer, where each field’s value is shifted according to its width.
- Returns:
An integer representing the combined bit value of the Struct.
- to_hdl(hdl: <MagicMock name='mock.HierarchyObject' id='129197202092928'>) None[source]
Populate the Struct instance from a HierarchyObject. This method assigns each field’s value based on the corresponding attribute in the HierarchyObject.
- Parameters:
hdl – A HierarchyObject from which to populate the Struct fields.
- Returns:
None
- from_bits(value: int) None[source]
Populate the Struct instance from a bit representation. This method takes an integer value and assigns each field’s value based on its width, effectively reconstructing the Struct from its bit representation.
- Parameters:
value – An integer representing the combined bit value of the Struct.
- Returns:
None
- from_hdl(hdl: <MagicMock name='mock.HierarchyObject' id='129197202092928'>) None[source]
Populate the Struct instance from a HierarchyObject. This method assigns each field’s value based on the corresponding attribute in the HierarchyObject.
- Parameters:
hdl – A HierarchyObject from which to populate the Struct fields.
- Returns:
None