CIRCT

Circuit IR Compilers and Tools

'ssp' Dialect

Static scheduling problem instances and solutions.

A dialect to abstractly represent instances and solutions of static scheduling problems, intended as an import/export format for testing, benchmarking, and rapid prototyping of problem definitions and algorithm implementations. See the rationale for more information.

Operations

ssp.graph (::circt::ssp::DependenceGraphOp)

Container for (scheduling) operations.

Syntax:

operation ::= `ssp.graph` $body attr-dict

The dependence graph is spanned by OperationOps (vertices) and a combination of MLIR value uses and symbol references (edges).

Traits: HasOnlyGraphRegion, HasParent<InstanceOp>, NoRegionArguments, NoTerminator, SingleBlock, SymbolTable

Interfaces: OpAsmOpInterface

ssp.instance (::circt::ssp::InstanceOp)

Instance of a static scheduling problem.

Syntax:

operation ::= `ssp.instance` ($sym_name^)? `of` $problemName custom<SSPProperties>($sspProperties) $body attr-dict

This operation represents an instance of a static scheduling problem, comprised of an operator library (OperatorLibraryOp, a container for OperatorTypeOps) and the dependence graph (DependenceGraphOp, a container for OperationOps). The instance and its components (operations, operator types and dependences) can carry properties, i.e. special MLIR attributes inheriting from the TableGen classes in PropertyBase.td. The ssp dialect provides attribute definitions (and short-form pretty-printing) for CIRCT’s built-in scheduling problems.

Example

ssp.instance @canis14_fig2 of "ModuloProblem" [II<3>] {
  library {
    operator_type @MemPort [latency<1>, limit<1>]
    operator_type @Add [latency<1>]
  }
  graph {
    %0 = operation<@MemPort> @load_A(@store_A [dist<1>]) [t<2>]
    %1 = operation<@MemPort> @load_B() [t<0>]
    %2 = operation<@Add> @add(%0, %1) [t<3>]
    operation<@MemPort> @store_A(%2) [t<4>]
  }
}

Traits: IsolatedFromAbove, NoRegionArguments, NoTerminator, SingleBlock, SymbolTable

Interfaces: OpAsmOpInterface, Symbol

Attributes:

AttributeMLIR TypeDescription
sym_name::mlir::StringAttrstring attribute
problemName::mlir::StringAttrstring attribute
sspProperties::mlir::ArrayAttrarray attribute

ssp.library (::circt::ssp::OperatorLibraryOp)

Container for operator types.

Syntax:

operation ::= `ssp.library` ($sym_name^)? $body attr-dict

The operator library abstracts the characteristics of the target architecture/IR (onto which the source graph is scheduled), represented by the individual OperatorTypeOps. This operation may be used outside of an InstanceOp.

Traits: NoRegionArguments, NoTerminator, SingleBlock, SymbolTable

Interfaces: OpAsmOpInterface, Symbol

Attributes:

AttributeMLIR TypeDescription
sym_name::mlir::StringAttrstring attribute

ssp.operation (::circt::ssp::OperationOp)

Vertex and incoming edges in the dependence graph.

This MLIR operation represents an operation (in the terminology of CIRCT’s scheduling infra) in a scheduling problem, or in other words, a vertex in the surrounding instance’s dependence graph. In addition, it also encodes the operation’s incoming dependences. In order to faithfully reproduce the internal modeling in the scheduling infrastructure, these dependence edges are either encoded as MLIR operands (def-use dependences) or symbol references (auxiliary dependences). To that end, OperationOps can optionally be named, and accept/produce an arbitrary number of operands/results. The operation and the incoming dependences can carry properties.

The linkedOperatorType property in the root Problem class is central to the problem models, because it links operations to their properties in the target IR. Therefore, the referenced operator type symbol is parsed/printed right after the operation keyword in the custom assembly syntax. Flat symbol references are resolved by name in the surrounding instance’s operator library. Nested references can point to arbitrary operator libraries.

Examples

// unnamed, only def-use dependences
%2 = operation<@Add>(%0, %1)

// unnamed, multiple results
%5:2 = operation<@Div>(%3, %4) // multiple results

// named, mix of def-use and auxiliary dependences
operation<@MemPort> @store_A(%2, @store_B, @load_A)

// dependence properties
operation<@Barrier>(%2 [dist<1>], %5#1, @store_A [dist<3>])

// operator type in stand-alone library
%7 = operation<@MathLib::@Sqrt>(%6)

Traits: HasParent<DependenceGraphOp>

Interfaces: SymbolUserOpInterface, Symbol

Attributes:

AttributeMLIR TypeDescription
sym_name::mlir::StringAttrstring attribute
dependences::mlir::ArrayAttrdependence array attribute
sspProperties::mlir::ArrayAttrarray attribute

Operands:

OperandDescription
operandsvariadic of none type

Results:

ResultDescription
resultsvariadic of none type

ssp.operator_type (::circt::ssp::OperatorTypeOp)

Element of the target architecture/IR.

Syntax:

operation ::= `ssp.operator_type` $sym_name custom<SSPProperties>($sspProperties) attr-dict

This operation represents an operator type, which can be augmented with a set of problem-specific properties, and is identified through a unique name.

Example

operator_type @MemPort [latency<1>, limit<1>]

Traits: HasParent<OperatorLibraryOp>

Interfaces: Symbol

Attributes:

AttributeMLIR TypeDescription
sym_name::mlir::StringAttrstring attribute
sspProperties::mlir::ArrayAttrarray attribute

Attributes

DependenceAttr

Internal representation of dependence edges.

Syntax:

#ssp.dependence<
  unsigned,   # operandIdx
  ::mlir::FlatSymbolRefAttr,   # sourceRef
  ::mlir::ArrayAttr   # properties
>

An attribute to uniformly model def-use and auxiliary dependences as well as to attach properties to them. This attribute is an implementation detail of the ssp.OperationOp and as such is supposed to be hidden by the custom parser/printer.

Parameters:

ParameterC++ typeDescription
operandIdxunsigned
sourceRef::mlir::FlatSymbolRefAttr
properties::mlir::ArrayAttr

DistanceAttr

Models the Distance property in ::circt::scheduling::CyclicProblem.

Syntax:

#ssp.dist<
  unsigned   # value
>

Parameters:

ParameterC++ typeDescription
valueunsigned

IncomingDelayAttr

Models the IncomingDelay property in ::circt::scheduling::ChainingProblem.

Syntax:

#ssp.incDelay<
  ::mlir::FloatAttr   # value
>

Parameters:

ParameterC++ typeDescription
value::mlir::FloatAttr

InitiationIntervalAttr

Models the InitiationInterval property in ::circt::scheduling::CyclicProblem.

Syntax:

#ssp.II<
  unsigned   # value
>

Parameters:

ParameterC++ typeDescription
valueunsigned

LatencyAttr

Models the Latency property in ::circt::scheduling::Problem.

Syntax:

#ssp.latency<
  unsigned   # value
>

Parameters:

ParameterC++ typeDescription
valueunsigned

LimitAttr

Models the Limit property in ::circt::scheduling::SharedOperatorsProblem.

Syntax:

#ssp.limit<
  unsigned   # value
>

Parameters:

ParameterC++ typeDescription
valueunsigned

LinkedOperatorTypeAttr

Models the LinkedOperatorType property in ::circt::scheduling::Problem.

Syntax:

#ssp.opr<
  ::mlir::SymbolRefAttr   # value
>

Parameters:

ParameterC++ typeDescription
value::mlir::SymbolRefAttr

OutgoingDelayAttr

Models the OutgoingDelay property in ::circt::scheduling::ChainingProblem.

Syntax:

#ssp.outDelay<
  ::mlir::FloatAttr   # value
>

Parameters:

ParameterC++ typeDescription
value::mlir::FloatAttr

StartTimeInCycleAttr

Models the StartTimeInCycle property in ::circt::scheduling::ChainingProblem.

Syntax:

#ssp.z<
  ::mlir::FloatAttr   # value
>

Parameters:

ParameterC++ typeDescription
value::mlir::FloatAttr

StartTimeAttr

Models the StartTime property in ::circt::scheduling::Problem.

Syntax:

#ssp.t<
  unsigned   # value
>

Parameters:

ParameterC++ typeDescription
valueunsigned

'ssp' Dialect Docs