CIRCT  19.0.0git
Public Member Functions | Public Attributes | List of all members
esiaccel.types.ESIType Class Reference
Inheritance diagram for esiaccel.types.ESIType:
Inheritance graph
[legend]

Public Member Functions

def __init__ (self, cpp.Type cpp_type)
 
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)
 
str __str__ (self)
 

Public Attributes

 cpp_type
 

Detailed Description

Definition at line 40 of file types.py.

Constructor & Destructor Documentation

◆ __init__()

def esiaccel.types.ESIType.__init__ (   self,
cpp.Type  cpp_type 
)

Definition at line 42 of file types.py.

Member Function Documentation

◆ __str__()

str esiaccel.types.ESIType.__str__ (   self)

◆ bit_width()

int esiaccel.types.ESIType.bit_width (   self)

◆ deserialize()

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.ArrayType, esiaccel.types.StructType, esiaccel.types.SIntType, esiaccel.types.UIntType, esiaccel.types.BitsType, and esiaccel.types.VoidType.

Definition at line 76 of file types.py.

◆ is_valid()

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.ArrayType, esiaccel.types.StructType, esiaccel.types.SIntType, esiaccel.types.UIntType, esiaccel.types.BitsType, and esiaccel.types.VoidType.

Definition at line 54 of file types.py.

◆ max_size()

int esiaccel.types.ESIType.max_size (   self)

◆ serialize()

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

Reimplemented in esiaccel.types.StructType, and esiaccel.types.VoidType.

Definition at line 72 of file types.py.

◆ supports_host()

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.

Definition at line 46 of file types.py.

References esiaccel.types.ESIType.bit_width(), esiaccel.types.VoidType.bit_width(), esiaccel.types.BitsType.bit_width(), esiaccel.types.IntType.bit_width(), esiaccel.types.StructType.bit_width(), and esiaccel.types.ArrayType.bit_width().

Member Data Documentation

◆ cpp_type

esiaccel.types.ESIType.cpp_type

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