qat.experimental.dialect.q1_scf.ir.attrs module
Attributes for the q1_scf structured control flow dialect.
The dialect reuses the q1_cf predicate enumerations for its conditions (see
qat.experimental.dialect.q1_cf.ir.attrs) and defines one attribute of its
own:
IterDomainAttris optional metadata onForOpdescribing the linear iteration domain of a counted loop. It records thestart,stopandstepof the varied quantity, the integercountof iterations, and anIterParametertag naming the varied quantity and its unit. The attribute carries no control-flow semantics.
Reference: https://docs.qblox.com/en/main/products/qblox_instruments/q1/index.html
- class IterDomainAttr(start, stop, step, count, parameter)
Bases:
IterDomainAttrLinear iteration domain of a
ForOp.The domain is the affine sequence
start, start + step, ...truncated tocountpoints, all measured in the unit implied byparameter. It records the physical meaning of a counted loop and does not alter its control-flow semantics.- Parameters:
start¶ (
float) – First value of the varied quantity.stop¶ (
float) – Exclusive upper bound of the varied quantity.step¶ (
float) – Increment between successive iterations; must be non-zero.count¶ (
int) – Number of loop iterations, which must equalceil((stop - start) / step).parameter¶ (
IterParameter) – The varied quantity and, implicitly, its unit.
- count: IntAttr = <xdsl.irdl.attributes._ParameterDef object>
- classmethod get_irdl_definition()
Get the IRDL attribute definition.
- name: ClassVar[str] = 'q1_scf.iter_domain'
The attribute name should be a static field in the attribute classes.
- parameter: IterParameterAttr = <xdsl.irdl.attributes._ParameterDef object>
- start: FloatAttr = <xdsl.irdl.attributes._ParameterDef object>
- step: FloatAttr = <xdsl.irdl.attributes._ParameterDef object>
- stop: FloatAttr = <xdsl.irdl.attributes._ParameterDef object>
- verify()
Verify the domain is a well-formed linear iteration.
- Raises:
VerifyException – If
stepis zero, ifcountis negative, or ifcountdoes not equalceil((stop - start) / step).- Return type:
None
- class IterParameter(value)
Bases:
StrEnumThe quantity varied across iterations, which also fixes the domain unit.
- duration = 'duration'
- frequency = 'frequency'
- gain = 'gain'
- phase = 'phase'
- class IterParameterAttr(data)
Bases:
EnumAttribute[IterParameter],SpacedOpaqueSyntaxAttributeAttribute wrapper carrying an
IterParameter.- data: DataElement
- enum_type
alias of
IterParameter
- name: ClassVar[str] = 'q1_scf.iter_parameter'
The attribute name should be a static field in the attribute classes.