Seq
seq
¶
CIRCT’s seq dialect.
See external documentation.
clock = ClockType()
module-attribute
¶
Seq = Dialect('seq', [ClockDividerOp, CompRegOp, ConstClockOp], [ClockType, ClockConstAttr])
module-attribute
¶
ClockType
dataclass
¶
Bases: ParametrizedAttribute, TypeAttribute
A type for clock-carrying wires. Signals which can be used to drive the clock input of sequential operations.
Source code in xdsl/dialects/seq.py
name = 'seq.clock'
class-attribute
instance-attribute
¶
ClockDividerOp
¶
Bases: IRDLOperation
Produces a clock divided by a power of two
Source code in xdsl/dialects/seq.py
name = 'seq.clock_div'
class-attribute
instance-attribute
¶
pow2 = prop_def(IntegerAttr[I8])
class-attribute
instance-attribute
¶
clockIn = operand_def(clock)
class-attribute
instance-attribute
¶
clockOut = result_def(clock)
class-attribute
instance-attribute
¶
assembly_format = '$clockIn `by` $pow2 attr-dict'
class-attribute
instance-attribute
¶
__init__(clockIn: SSAValue | Operation, pow2: int | IntegerAttr)
¶
CompRegOp
¶
Bases: IRDLOperation
Register a value, storing it for one cycle.
Source code in xdsl/dialects/seq.py
name = 'seq.compreg'
class-attribute
instance-attribute
¶
DATA_TYPE: ClassVar = VarConstraint('DataType', AnyAttr())
class-attribute
instance-attribute
¶
inner_sym = opt_prop_def(InnerSymAttr)
class-attribute
instance-attribute
¶
input = operand_def(DATA_TYPE)
class-attribute
instance-attribute
¶
clk = operand_def(clock)
class-attribute
instance-attribute
¶
reset = opt_operand_def(i1)
class-attribute
instance-attribute
¶
reset_value = opt_operand_def(DATA_TYPE)
class-attribute
instance-attribute
¶
power_on_value = opt_operand_def(DATA_TYPE)
class-attribute
instance-attribute
¶
data = result_def(DATA_TYPE)
class-attribute
instance-attribute
¶
irdl_options = (AttrSizedOperandSegments(),)
class-attribute
instance-attribute
¶
assembly_format = '(`sym` $inner_sym^)? $input `,` $clk (`reset` $reset^ `,` $reset_value)? (`powerOn` $power_on_value^)? attr-dict `:` type($input)'
class-attribute
instance-attribute
¶
__init__(input: SSAValue, clk: SSAValue, reset: tuple[SSAValue, SSAValue] | None = None, power_on_value: SSAValue | None = None)
¶
Source code in xdsl/dialects/seq.py
ClockConstAttrData
¶
ClockConstAttr
dataclass
¶
Bases: Data[ClockConstAttrData]
Clock constant.
This attribute diverges slightly from the upstream implementation as xDSL does not allow completely unstructured parsing and printing of attributes (for good reasons).
Source code in xdsl/dialects/seq.py
name = 'seq.clock_constant'
class-attribute
instance-attribute
¶
parse_parameter(parser: AttrParser) -> ClockConstAttrData
classmethod
¶
parse_parameter_free_standing(parser: AttrParser) -> ClockConstAttrData
classmethod
¶
Source code in xdsl/dialects/seq.py
print_parameter(printer: Printer) -> None
¶
print_parameter_free_standing(printer: Printer) -> None
¶
ConstClockOp
dataclass
¶
Bases: IRDLOperation
The constant operation produces a constant clock value.