CIRCT 22.0.0git
|
Public Member Functions | |
__init__ (self, str id, List[Tuple[str, "ESIType"]] fields) | |
int | bit_width (self) |
Tuple[bool, Optional[str]] | is_valid (self, obj) |
bytearray | serialize (self, obj) |
Tuple[Dict[str, Any], bytearray] | deserialize (self, bytearray data) |
![]() | |
wrap_cpp (cls, cpp.Type cpp_type) | |
Tuple[bool, Optional[str]] | supports_host (self) |
int | max_size (self) |
str | __str__ (self) |
Public Attributes | |
fields | |
![]() | |
cpp_type | |
Protected Member Functions | |
_init_from_cpp (self, cpp.StructType cpp_type) | |
esiaccel.types.StructType.__init__ | ( | self, | |
str | id, | ||
List[Tuple[str, "ESIType"]] | fields | ||
) |
Reimplemented from esiaccel.types.ESIType.
Definition at line 227 of file types.py.
References esiaccel.types.ArrayType._init_from_cpp(), esiaccel.types.StructType._init_from_cpp(), and esiaccel.types.ESIType._init_from_cpp().
|
protected |
Initialize instance attributes from a C++ type object.
Reimplemented from esiaccel.types.ESIType.
Definition at line 232 of file types.py.
References esiaccel.types.StructType._init_from_cpp().
Referenced by esiaccel.types.ESIType.__init__(), esiaccel.types.VoidType.__init__(), esiaccel.types.ArrayType.__init__(), esiaccel.types.BitsType.__init__(), esiaccel.types.IntType.__init__(), esiaccel.types.UIntType.__init__(), esiaccel.types.SIntType.__init__(), esiaccel.types.StructType.__init__(), and esiaccel.types.StructType._init_from_cpp().
int esiaccel.types.StructType.bit_width | ( | self | ) |
Size of this type, in bits. Negative for unbounded types.
Reimplemented from esiaccel.types.ESIType.
Definition at line 239 of file types.py.
References circt::om::evaluator::ObjectValue.fields, esi::StructType.fields, esiaccel.types.StructType.fields, llvm::yaml::MappingContextTraits< sv::InterfaceOp, Context >::Interface.fields, and MappingInfo.fields.
Referenced by esiaccel.types.UIntType.is_valid(), esiaccel.types.SIntType.is_valid(), esiaccel.types.ESIType.max_size(), and esiaccel.types.ESIType.supports_host().
Tuple[Dict[str, Any], bytearray] esiaccel.types.StructType.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 274 of file types.py.
References esiaccel.types.ESIType.cpp_type, circt::om::evaluator::ObjectValue.fields, esi::StructType.fields, esiaccel.types.StructType.fields, llvm::yaml::MappingContextTraits< sv::InterfaceOp, Context >::Interface.fields, and MappingInfo.fields.
Tuple[bool, Optional[str]] esiaccel.types.StructType.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 245 of file types.py.
References circt::om::evaluator::ObjectValue.fields, esi::StructType.fields, esiaccel.types.StructType.fields, llvm::yaml::MappingContextTraits< sv::InterfaceOp, Context >::Interface.fields, and MappingInfo.fields.
bytearray esiaccel.types.StructType.serialize | ( | self, | |
obj | |||
) |
Convert a Python object to a bytearray.
Reimplemented from esiaccel.types.ESIType.
Definition at line 263 of file types.py.
References esiaccel.types.ESIType.cpp_type, circt::om::evaluator::ObjectValue.fields, esi::StructType.fields, esiaccel.types.StructType.fields, llvm::yaml::MappingContextTraits< sv::InterfaceOp, Context >::Interface.fields, and MappingInfo.fields.
esiaccel.types.StructType.fields |
Definition at line 236 of file types.py.
Referenced by esiaccel.types.StructType.bit_width(), esiaccel.types.StructType.deserialize(), esiaccel.types.StructType.is_valid(), and esiaccel.types.StructType.serialize().