CIRCT 24.0.0git
Loading...
Searching...
No Matches
esiaccel.types.WindowType Class Reference
Inheritance diagram for esiaccel.types.WindowType:
Collaboration diagram for esiaccel.types.WindowType:

Classes

class  Field
class  Frame

Public Member Functions

 __init__ (self, str id, str name, "ESIType" into_type, "ESIType" lowered_type, List["WindowType.Frame"] frames)
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
 __init__ (self, str id)
 wrap_cpp (cls, cpp.Type cpp_type)
str id (self)
int bit_width (self)
int max_size (self)
int __hash__ (self)
bool __eq__ (self, other)
str __str__ (self)

Public Attributes

 name = cpp_type.name
 into_type = _get_esi_type(cpp_type.into)
 lowered_type = _get_esi_type(cpp_type.lowered)
list frames
Public Attributes inherited from esiaccel.types.ESIType
 cpp_type = cpp_type
str id

Protected Member Functions

 _init_from_cpp (self, cpp.WindowType cpp_type)

Static Protected Attributes

tuple _HOST_UNSUPPORTED_REASON

Detailed Description

Definition at line 427 of file types.py.

Constructor & Destructor Documentation

◆ __init__()

esiaccel.types.WindowType.__init__ ( self,
str id,
str name,
"ESIType" into_type,
"ESIType" lowered_type,
List["WindowType.Frame"] frames )

Definition at line 442 of file types.py.

References esiaccel.types.ESIType._init_from_cpp().

Member Function Documentation

◆ _init_from_cpp()

esiaccel.types.WindowType._init_from_cpp ( self,
cpp.WindowType cpp_type )
protected
Initialize instance attributes from a C++ type object.

Reimplemented from esiaccel.types.ESIType.

Definition at line 455 of file types.py.

References _init_from_cpp().

Referenced by _init_from_cpp().

◆ deserialize()

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

References _HOST_UNSUPPORTED_REASON.

◆ is_valid()

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

References _HOST_UNSUPPORTED_REASON.

◆ serialize()

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

Reimplemented from esiaccel.types.ESIType.

Definition at line 474 of file types.py.

References _HOST_UNSUPPORTED_REASON.

◆ supports_host()

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

References _HOST_UNSUPPORTED_REASON.

Member Data Documentation

◆ _HOST_UNSUPPORTED_REASON

esiaccel.types.WindowType._HOST_UNSUPPORTED_REASON
staticprotected
Initial value:
= (
"window types require into/lowered translation and are not yet "
"supported for host communication")

Definition at line 429 of file types.py.

Referenced by deserialize(), is_valid(), serialize(), and supports_host().

◆ frames

list esiaccel.types.WindowType.frames
Initial value:
= [
WindowType.Frame(frame.name, [
WindowType.Field(field.name, field.num_items,
field.bulk_count_width) for field in frame.fields
]) for frame in cpp_type.frames
]

Definition at line 460 of file types.py.

◆ into_type

esiaccel.types.WindowType.into_type = _get_esi_type(cpp_type.into)

Definition at line 458 of file types.py.

◆ lowered_type

esiaccel.types.WindowType.lowered_type = _get_esi_type(cpp_type.lowered)

Definition at line 459 of file types.py.

◆ name

esiaccel.types.WindowType.name = cpp_type.name

Definition at line 457 of file types.py.

Referenced by esiaccel.types.TypeAlias.__str__().


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