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), an resource library (ResourceLibraryOp, a container for ResourceTypeOps), and the dependence graph (DependenceGraphOp, a container for OperationOps). The instance and its components (operations, operator types, resource 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 @Memory [latency<1>]
    operator_type @Add [latency<1>]
  }
  resource {
    resource_type @ReadPort [limit<1>]
    resource_type @WritePort [limit<1>]
  }
  graph {
    %0 = operation<@Memory> @load_A(@store_A [dist<1>]) uses[@ReadPort] [t<2>]
    %1 = operation<@Memory> @load_B() uses[@ReadPort] [t<0>]
    %2 = operation<@Add> @add(%0, %1) [t<3>]  // no `resource_type` needed
    operation<@Memory> @store_A(%2) uses[@WritePort] [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 and linkedResourceType property in the root Problem class are central to the problem models, because it links operations to their properties in the target IR. Therefore, the referenced operator/resource 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/resource library. Nested references can point to arbitrary operator/resource 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<@MemAccess> @store_A(%2, @store_B, @load_A) uses[@MemPort]

// 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>]

Traits: HasParent<OperatorLibraryOp>

Interfaces: Symbol

Attributes:

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

ssp.resource (::circt::ssp::ResourceLibraryOp)

Container for resource types.

Syntax:

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

The resource library represents different kinds of resource of desired usage on the target architecture/IR. Each resource will be represented by the individual ResourceTypeOps. An OperationOp can be associated with zero, one, or multiple resources. This operation may be used outside of an InstanceOp so different problems can share the same resource constraints.

Traits: NoRegionArguments, NoTerminator, SingleBlock, SymbolTable

Interfaces: OpAsmOpInterface, Symbol

Attributes:

AttributeMLIR TypeDescription
sym_name::mlir::StringAttrstring attribute

ssp.resource_type (::circt::ssp::ResourceTypeOp)

Resource of desired usage on the target architecture/IR.

Syntax:

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

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

Example

resource_type @MemPort [limit<1>]

Traits: HasParent<ResourceLibraryOp>

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

LinkedResourceTypesAttr

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

Syntax:

#ssp.rsrcs<
  ::mlir::ArrayAttr   # value
>

Parameters:

ParameterC++ typeDescription
value::mlir::ArrayAttr

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