Snitch
snitch
¶
This dialect provides operations to target features of the Snitch[1] streaming architecture based on custom extensions to the RISC-V ISA. This dialect works on 'riscv' types directly as all arguments are of 'riscv.reg<>' type and it is meant to be as close as possible to the asm that aims at generating.
[1] https://pulp-platform.github.io/snitch/publications
Snitch = Dialect('snitch', [SsrSetDimensionBoundOp, SsrSetDimensionStrideOp, SsrSetDimensionSourceOp, SsrSetDimensionDestinationOp, SsrSetStreamRepetitionOp, SsrEnableOp, SsrDisableOp], [ReadableStreamType, WritableStreamType])
module-attribute
¶
ReadableStreamType
dataclass
¶
Bases: ParametrizedAttribute, TypeAttribute, ContainerType[_StreamTypeElement], Generic[_StreamTypeElement]
Source code in xdsl/dialects/snitch.py
name = 'snitch.readable'
class-attribute
instance-attribute
¶
element_type: _StreamTypeElement
instance-attribute
¶
get_element_type() -> _StreamTypeElement
¶
constr(element_type: IRDLAttrConstraint[_StreamTypeElement] = AnyAttr()) -> ParamAttrConstraint[ReadableStreamType[_StreamTypeElement]]
staticmethod
¶
Source code in xdsl/dialects/snitch.py
WritableStreamType
dataclass
¶
Bases: ParametrizedAttribute, TypeAttribute, ContainerType[_StreamTypeElement], Generic[_StreamTypeElement]
Source code in xdsl/dialects/snitch.py
name = 'snitch.writable'
class-attribute
instance-attribute
¶
element_type: _StreamTypeElement
instance-attribute
¶
get_element_type() -> _StreamTypeElement
¶
constr(element_type: IRDLAttrConstraint[_StreamTypeElement] = AnyAttr()) -> ParamAttrConstraint[WritableStreamType[_StreamTypeElement]]
staticmethod
¶
Source code in xdsl/dialects/snitch.py
SnitchResources
dataclass
¶
Bounds for resources provided by the Snitch architecture.
Source code in xdsl/dialects/snitch.py
SsrSetDimensionConfigOperation
¶
Bases: IRDLOperation, ABC
A base class for Snitch operations that set a configuration value for a specific dimension handled by a streamer.
Source code in xdsl/dialects/snitch.py
value = operand_def(IntRegisterType)
class-attribute
instance-attribute
¶
dm = prop_def(IntAttr)
class-attribute
instance-attribute
¶
dimension = prop_def(IntAttr)
class-attribute
instance-attribute
¶
__init__(value: OperandArg, dm: IntAttr, dimension: IntAttr)
¶
verify_() -> None
¶
Source code in xdsl/dialects/snitch.py
SsrSetStreamConfigOperation
¶
Bases: IRDLOperation, ABC
A base class for Snitch operations that set a configuration value for a streamer.
Source code in xdsl/dialects/snitch.py
SsrSetDimensionBoundOp
dataclass
¶
Bases: SsrSetDimensionConfigOperation
Set the bound for one of the dimensions handled by a specific streamer.
Source code in xdsl/dialects/snitch.py
name = 'snitch.ssr_set_dimension_bound'
class-attribute
instance-attribute
¶
SsrSetDimensionStrideOp
dataclass
¶
Bases: SsrSetDimensionConfigOperation
Set the stride for one of the dimensions handled by a specific streamer.
Source code in xdsl/dialects/snitch.py
name = 'snitch.ssr_set_dimension_stride'
class-attribute
instance-attribute
¶
SsrSetDimensionSourceOp
dataclass
¶
Bases: SsrSetDimensionConfigOperation
Set the data source for one of the dimensions handled by a specific streamer.
Source code in xdsl/dialects/snitch.py
name = 'snitch.ssr_set_dimension_source'
class-attribute
instance-attribute
¶
SsrSetDimensionDestinationOp
dataclass
¶
Bases: SsrSetDimensionConfigOperation
Set the data destination for one of the dimensions handled by a specific streamer.
Source code in xdsl/dialects/snitch.py
name = 'snitch.ssr_set_dimension_destination'
class-attribute
instance-attribute
¶
SsrSetStreamRepetitionOp
dataclass
¶
Bases: SsrSetStreamConfigOperation
Setup repetition count for a specific data mover.
Source code in xdsl/dialects/snitch.py
name = 'snitch.ssr_set_stream_repetition'
class-attribute
instance-attribute
¶
SsrEnableOp
¶
Bases: IRDLOperation
Enable stream semantics.