CIRCT  20.0.0git
Public Member Functions | List of all members
esiaccel.types.BitsType Class Reference
Inheritance diagram for esiaccel.types.BitsType:
Inheritance graph
[legend]
Collaboration diagram for esiaccel.types.BitsType:
Collaboration graph
[legend]

Public Member Functions

def __init__ (self, cpp.BitsType cpp_type)
 
Tuple[bool, Optional[str]] is_valid (self, obj)
 
int bit_width (self)
 
bytearray serialize (self, Union[bytearray, bytes, List[int]] obj)
 
Tuple[bytearray, bytearray] deserialize (self, bytearray data)
 
- Public Member Functions inherited from esiaccel.types.ESIType
def __init__ (self, cpp.Type cpp_type)
 
Tuple[bool, Optional[str]] supports_host (self)
 
int max_size (self)
 
bytearray serialize (self, obj)
 
str __str__ (self)
 

Additional Inherited Members

- Public Attributes inherited from esiaccel.types.ESIType
 cpp_type
 

Detailed Description

Definition at line 110 of file types.py.

Constructor & Destructor Documentation

◆ __init__()

def esiaccel.types.BitsType.__init__ (   self,
cpp.BitsType  cpp_type 
)

Member Function Documentation

◆ bit_width()

int esiaccel.types.BitsType.bit_width (   self)

◆ deserialize()

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 136 of file types.py.

References esiaccel.types.ESIType.max_size().

◆ is_valid()

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 115 of file types.py.

References esiaccel.types.ESIType.max_size().

◆ serialize()

bytearray esiaccel.types.BitsType.serialize (   self,
Union[bytearray, bytes, List[int]]  obj 
)

Definition at line 129 of file types.py.


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