|
CIRCT 23.0.0git
|


Public Member Functions | |
| __init__ (self, str id, int width) | |
| Tuple[bool, Optional[str]] | is_valid (self, obj) |
| bytearray | serialize (self, Union[bytearray, bytes, List[int]] obj) |
| Tuple[bytearray, bytearray] | deserialize (self, bytearray data) |
Public Member Functions inherited from esiaccel.types.ESIType | |
| wrap_cpp (cls, cpp.Type cpp_type) | |
| str | id (self) |
| Tuple[bool, Optional[str]] | supports_host (self) |
| int | bit_width (self) |
| int | max_size (self) |
| int | __hash__ (self) |
| bool | __eq__ (self, other) |
| str | __str__ (self) |
Additional Inherited Members | |
Public Attributes inherited from esiaccel.types.ESIType | |
| cpp_type | |
| id | |
Protected Member Functions inherited from esiaccel.types.ESIType | |
| _init_from_cpp (self, cpp.Type cpp_type) | |
| esiaccel.types.BitsType.__init__ | ( | self, | |
| str | id, | ||
| int | width | ||
| ) |
Reimplemented from esiaccel.types.ESIType.
Definition at line 208 of file types.py.
References esiaccel.types.ArrayType._init_from_cpp(), esiaccel.types.BundleType._init_from_cpp(), esiaccel.types.ChannelType._init_from_cpp(), esiaccel.types.ListType._init_from_cpp(), esiaccel.types.StructType._init_from_cpp(), esiaccel.types.ESIType._init_from_cpp(), esiaccel.types.TypeAlias._init_from_cpp(), esiaccel.types.UnionType._init_from_cpp(), and esiaccel.types.WindowType._init_from_cpp().
Referenced by synth.LongestPathCollection.drop_non_critical_paths(), and synth.LongestPathCollection.merge().
| Tuple[bytearray, bytearray] esiaccel.types.BitsType.deserialize | ( | self, | |
| bytearray | data | ||
| ) |
Convert a bytearray to a Python object. Return the object and the leftover bytes.
Reimplemented from esiaccel.types.ESIType.
Definition at line 228 of file types.py.
References esiaccel.types.ESIType.max_size(), esiaccel.types.UIntType.max_size, and esiaccel.types.SIntType.max_size.
| Tuple[bool, Optional[str]] esiaccel.types.BitsType.is_valid | ( | self, | |
| obj | |||
| ) |
Is a Python object compatible with HW type? Returns either '(True, None)' if it is, or '(False, reason)' if it is not.
Reimplemented from esiaccel.types.ESIType.
Definition at line 211 of file types.py.
References esiaccel.types.ESIType.max_size(), esiaccel.types.UIntType.max_size, and esiaccel.types.SIntType.max_size.
| bytearray esiaccel.types.BitsType.serialize | ( | self, | |
| Union[bytearray, bytes, List[int]] | obj | ||
| ) |
Convert a Python object to a bytearray.
Reimplemented from esiaccel.types.ESIType.