Deeploy.Targets.Snitch.DataTypes.Snitch_DMA_copy

class Deeploy.Targets.Snitch.DataTypes.Snitch_DMA_copy(structDict: str | Struct | Dict[str, BaseType], ctxt: _NetworkContext | None = None)

Bases: Struct

Methods

__init__(structDict: str | Struct | Dict[str, BaseType], ctxt: _NetworkContext | None = None)

Initialize a new struct object

Parameters:
  • structDict (Union[str, Struct, Dict[str, BaseType]]) – Either an initialized Deeploy-type struct, a string name refering to an intialized struct registered in the NetworkContext, or a full definition of the struct to-be-initialized

  • ctxt (Optional[_NetworkContext]) – Current NetworkContext

Raises:

Exception – Raises an Exception if structDict cannot be assigned to a struct of layout structTypeDict

__init__(structDict[, ctxt])

Initialize a new struct object

checkPromotion(_other[, ctxt])

Checks whether a given Python-typed or Deeploy-typed value can be represented with the Deeploy type

checkValue(value[, ctxt])

Checks whether a given Python-type value (usually FP64) can be represented with a Deeploy type

Attributes

value

the value of the struct; corresponds to an element with type layout defined in cls.structTypeDict

structTypeDict

The definition of the struct mapping its field names to their associated Deeploy-types

typeName

The C typename of this type

typeWidth

the number of BITS to be assigned to the type

typeName: str = 'DMA_copy'

The C typename of this type

Type:

str

structTypeDict: Dict[str, Type[BaseType]] = {'dst': <class 'Deeploy.AbstractDataTypes.voidPtr'>, 'dst_stride': <class 'Deeploy.CommonExtensions.DataTypes.uint16_t'>, 'repeat': <class 'Deeploy.CommonExtensions.DataTypes.uint16_t'>, 'size': <class 'Deeploy.CommonExtensions.DataTypes.uint16_t'>, 'src': <class 'Deeploy.AbstractDataTypes.voidPtr'>, 'src_stride': <class 'Deeploy.CommonExtensions.DataTypes.uint16_t'>, 'tid': <class 'Deeploy.CommonExtensions.DataTypes.uint16_t'>}

The definition of the struct mapping its field names to their associated Deeploy-types

Type:

Dict[str, Type[BaseType]]

value

the value of the struct; corresponds to an element with type layout defined in cls.structTypeDict

Type:

structTypeDict

classmethod checkPromotion(_other: str | Dict[str, BaseType] | Struct, ctxt: _NetworkContext | None = None)

Checks whether a given Python-typed or Deeploy-typed value can be represented with the Deeploy type

Parameters:
  • value (Union[_PythonType, _DeeployType]) – Python-typed or Deeploy-typed value to be checked for promotion to cls

  • ctxt (Optional[_NetworkContext]) – Current NetworkContext

Returns:

Returns true if the value can be promoted to cls

Return type:

bool

classmethod checkValue(value: str | Dict[str, BaseType], ctxt: _NetworkContext | None = None)

Checks whether a given Python-type value (usually FP64) can be represented with a Deeploy type

Parameters:
  • value (_PythonType) – Python-typed value to check

  • ctxt (Optional[_NetworkContext]) – Current NetworkContext

Returns:

Returns true if value can represented by cls

Return type:

bool

typeWidth: int = 144

the number of BITS to be assigned to the type

Type:

int