CIRCT 23.0.0git
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Protected Member Functions | List of all members
esiaccel.types.ChannelType Class Reference
Inheritance diagram for esiaccel.types.ChannelType:
Inheritance graph
[legend]
Collaboration diagram for esiaccel.types.ChannelType:
Collaboration graph
[legend]

Public Member Functions

 __init__ (self, str id, "ESIType" inner)
 
int bit_width (self)
 
"ESIType" inner (self)
 
Tuple[bool, Optional[str]] supports_host (self)
 
Tuple[bool, Optional[str]] is_valid (self, obj)
 
bytearray serialize (self, obj)
 
Tuple[object, bytearray] deserialize (self, bytearray data)
 
- Public Member Functions inherited from esiaccel.types.ESIType
 wrap_cpp (cls, cpp.Type cpp_type)
 
str id (self)
 
int max_size (self)
 
int __hash__ (self)
 
bool __eq__ (self, other)
 
str __str__ (self)
 

Public Attributes

 inner_type
 
- Public Attributes inherited from esiaccel.types.ESIType
 cpp_type
 
 id
 

Protected Member Functions

 _init_from_cpp (self, cpp.ChannelType cpp_type)
 

Detailed Description

Definition at line 107 of file types.py.

Constructor & Destructor Documentation

◆ __init__()

esiaccel.types.ChannelType.__init__ (   self,
str  id,
"ESIType"  inner 
)

Member Function Documentation

◆ _init_from_cpp()

esiaccel.types.ChannelType._init_from_cpp (   self,
cpp.ChannelType  cpp_type 
)
protected

◆ bit_width()

int esiaccel.types.ChannelType.bit_width (   self)

◆ deserialize()

Tuple[object, bytearray] esiaccel.types.ChannelType.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 134 of file types.py.

References esiaccel.types.ChannelType.deserialize(), esiaccel.types.ChannelType.inner_type, and esiaccel.types.TypeAlias.inner_type.

Referenced by esiaccel.types.ChannelType.deserialize().

◆ inner()

"ESIType" esiaccel.types.ChannelType.inner (   self)

◆ is_valid()

Tuple[bool, Optional[str]] esiaccel.types.ChannelType.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 128 of file types.py.

References esiaccel.types.ChannelType.inner_type, esiaccel.types.TypeAlias.inner_type, and esiaccel.types.ChannelType.is_valid().

Referenced by esiaccel.types.ChannelType.is_valid().

◆ serialize()

bytearray esiaccel.types.ChannelType.serialize (   self,
  obj 
)
Convert a Python object to a bytearray.

Reimplemented from esiaccel.types.ESIType.

Definition at line 131 of file types.py.

References esiaccel.types.ChannelType.inner_type, esiaccel.types.TypeAlias.inner_type, and esiaccel.types.ChannelType.serialize().

Referenced by esiaccel.types.ChannelType.serialize().

◆ supports_host()

Tuple[bool, Optional[str]] esiaccel.types.ChannelType.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 from esiaccel.types.ESIType.

Definition at line 125 of file types.py.

References esiaccel.types.ChannelType.inner_type, and esiaccel.types.TypeAlias.inner_type.

Member Data Documentation

◆ inner_type

esiaccel.types.ChannelType.inner_type

The documentation for this class was generated from the following file: