|
CIRCT 24.0.0git
|


Public Member Functions | |
| __init__ (self, str id) | |
| wrap_cpp (cls, cpp.Type cpp_type) | |
| str | id (self) |
| Tuple[bool, Optional[str]] | supports_host (self) |
| Tuple[bool, Optional[str]] | is_valid (self, obj) |
| int | bit_width (self) |
| int | max_size (self) |
| bytearray | serialize (self, obj) |
| Tuple[object, bytearray] | deserialize (self, bytearray data) |
| int | __hash__ (self) |
| bool | __eq__ (self, other) |
| str | __str__ (self) |
Public Attributes | |
| cpp_type = cpp_type | |
| str | id |
Protected Member Functions | |
| _init_from_cpp (self, cpp.Type cpp_type) | |
| esiaccel.types.ESIType.__init__ | ( | self, | |
| str | id ) |
Definition at line 42 of file types.py.
References _init_from_cpp().
| bool esiaccel.types.ESIType.__eq__ | ( | self, | |
| other ) |
Definition at line 100 of file types.py.
References circt::arc::runtime::impl::VCDSignalTableEntry.id, circt::FieldRef.id, circt::ImportVerilog::Context::PendingMonitor.id, esi::backends::cosim::RpcClient.Impl::ChannelMeta.id, esi::BundlePort.id, esi::cosim::RpcServer::Impl::ChannelInfo.id, esi::Instance.id, esi::services::CustomService.id, esi::services::TelemetryService.id, esi::Type.id, id, and WriteTraceChannelPort.id.
| str esiaccel.types.ESIType.__str__ | ( | self | ) |
|
protected |
Initialize instance attributes from a C++ type object.
Reimplemented in esiaccel.types.ArrayType, esiaccel.types.BundleType, esiaccel.types.ChannelType, esiaccel.types.ListType, esiaccel.types.StructType, esiaccel.types.TypeAlias, esiaccel.types.UnionType, and esiaccel.types.WindowType.
Definition at line 52 of file types.py.
Referenced by esiaccel.types.AnyType.__init__(), esiaccel.types.ArrayType.__init__(), esiaccel.types.BitsType.__init__(), esiaccel.types.BundleType.__init__(), esiaccel.types.ChannelType.__init__(), __init__(), esiaccel.types.IntType.__init__(), esiaccel.types.ListType.__init__(), esiaccel.types.SIntType.__init__(), esiaccel.types.StructType.__init__(), esiaccel.types.TypeAlias.__init__(), esiaccel.types.UIntType.__init__(), esiaccel.types.UnionType.__init__(), esiaccel.types.VoidType.__init__(), and esiaccel.types.WindowType.__init__().
| int esiaccel.types.ESIType.bit_width | ( | self | ) |
Size of this type, in bits. Negative for unbounded types.
Definition at line 76 of file types.py.
References cpp_type.
Referenced by esiaccel.types.SIntType.deserialize(), esiaccel.types.UnionType.deserialize(), esiaccel.types.SIntType.is_valid(), max_size(), esiaccel.types.UnionType.serialize(), and supports_host().
| Tuple[object, bytearray] esiaccel.types.ESIType.deserialize | ( | self, | |
| bytearray | data ) |
Convert a bytearray to a Python object. Return the object and the leftover bytes.
Reimplemented in esiaccel.types.AnyType, esiaccel.types.ArrayType, esiaccel.types.BitsType, esiaccel.types.ChannelType, esiaccel.types.ListType, esiaccel.types.SIntType, esiaccel.types.StructType, esiaccel.types.TypeAlias, esiaccel.types.UIntType, esiaccel.types.UnionType, esiaccel.types.VoidType, and esiaccel.types.WindowType.
| str esiaccel.types.ESIType.id | ( | self | ) |
| Tuple[bool, Optional[str]] esiaccel.types.ESIType.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 in esiaccel.types.AnyType, esiaccel.types.ArrayType, esiaccel.types.BitsType, esiaccel.types.ChannelType, esiaccel.types.ListType, esiaccel.types.SIntType, esiaccel.types.StructType, esiaccel.types.TypeAlias, esiaccel.types.UIntType, esiaccel.types.UnionType, esiaccel.types.VoidType, and esiaccel.types.WindowType.
| int esiaccel.types.ESIType.max_size | ( | self | ) |
Maximum size of a value of this type, in bytes.
Definition at line 81 of file types.py.
References bit_width(), and esiaccel.types.UIntType.bit_width.
| bytearray esiaccel.types.ESIType.serialize | ( | self, | |
| obj ) |
Convert a Python object to a bytearray.
Reimplemented in esiaccel.types.AnyType, esiaccel.types.ArrayType, esiaccel.types.BitsType, esiaccel.types.ChannelType, esiaccel.types.ListType, esiaccel.types.SIntType, esiaccel.types.StructType, esiaccel.types.TypeAlias, esiaccel.types.UIntType, esiaccel.types.UnionType, esiaccel.types.VoidType, and esiaccel.types.WindowType.
| Tuple[bool, Optional[str]] esiaccel.types.ESIType.supports_host | ( | self | ) |
Does this type support host communication via Python? Returns either '(True, None)' if it is, or '(False, reason)' if it is not.
Reimplemented in esiaccel.types.ChannelType, esiaccel.types.ListType, and esiaccel.types.WindowType.
Definition at line 62 of file types.py.
References bit_width(), and esiaccel.types.UIntType.bit_width.
| esiaccel.types.ESIType.wrap_cpp | ( | cls, | |
| cpp.Type | cpp_type ) |
Wrap a C++ ESI type with its corresponding Python ESI Type.
Definition at line 46 of file types.py.
References esiaccel.types.BundlePort.__new__().
| esiaccel.types.ESIType.cpp_type = cpp_type |
Definition at line 54 of file types.py.
Referenced by __str__(), bit_width(), esiaccel.types.StructType.deserialize(), id(), and esiaccel.types.StructType.serialize().