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

Public Member Functions

 __init__ (self, cpp.StructType cpp_type)
 
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)
 
- Public Member Functions inherited from esiaccel.types.ESIType
Tuple[bool, Optional[str]] supports_host (self)
 
int max_size (self)
 
str __str__ (self)
 

Public Attributes

 cpp_type
 
 fields
 
- Public Attributes inherited from esiaccel.types.ESIType
 cpp_type
 

Detailed Description

Definition at line 202 of file types.py.

Constructor & Destructor Documentation

◆ __init__()

esiaccel.types.StructType.__init__ (   self,
cpp.StructType  cpp_type 
)

Reimplemented from esiaccel.types.ESIType.

Definition at line 204 of file types.py.

Member Function Documentation

◆ bit_width()

int esiaccel.types.StructType.bit_width (   self)

◆ deserialize()

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 240 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.

◆ is_valid()

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 217 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.

◆ serialize()

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

Reimplemented from esiaccel.types.ESIType.

Definition at line 233 of file types.py.

Member Data Documentation

◆ cpp_type

esiaccel.types.StructType.cpp_type

◆ fields

esiaccel.types.StructType.fields

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