SpecHLS

SpecHLS: A Speculative High-Level Synthesis Framework

'spechls' Dialect

A dialect for speculative High-Level Synthesis.

TODO

Operations

spechls.alpha (spechls::AlphaOp)

Operands:

OperandDescription
arrayarray type
indexinteger
valueany type
we1-bit signless integer

Results:

ResultDescription
resultarray type

spechls.call (spechls::CallOp)

Syntax:

operation ::= `spechls.call` $callee `(` $arguments `)` attr-dict `:` functional-type($arguments, $result)

Interfaces: CallOpInterface, OpAsmOpInterface

Attributes:

AttributeMLIR TypeDescription
callee::mlir::FlatSymbolRefAttrflat symbol reference attribute
arg_attrs::mlir::ArrayAttrArray of dictionary attributes
res_attrs::mlir::ArrayAttrArray of dictionary attributes

Operands:

OperandDescription
argumentsvariadic of any type

Results:

ResultDescription
resultany type

spechls.commit (spechls::CommitOp)

Syntax:

operation ::= `spechls.commit` $enable (`,` $value^ `:` type($value))? attr-dict

Traits: HasParent<TaskOp>, Terminator

Operands:

OperandDescription
enable1-bit signless integer
valueany type

spechls.delay (spechls::DelayOp)

Traits: AttrSizedOperandSegments

Interfaces: InferTypeOpInterface

Attributes:

AttributeMLIR TypeDescription
depth::mlir::IntegerAttr32-bit unsigned integer attribute

Operands:

OperandDescription
inputany type
enable1-bit signless integer
initany type

Results:

ResultDescription
resultany type

spechls.exit (spechls::ExitOp)

Traits: HasParent<KernelOp>, ReturnLike, Terminator

Interfaces: RegionBranchTerminatorOpInterface

Operands:

OperandDescription
guard1-bit signless integer
valuesvariadic of any type

spechls.field (spechls::FieldOp)

Syntax:

operation ::= `spechls.field` `<` $name `>` $input attr-dict `:` type($input)

Interfaces: InferTypeOpInterface

Attributes:

AttributeMLIR TypeDescription
name::mlir::StringAttrstring attribute

Operands:

OperandDescription
inputstructure type

Results:

ResultDescription
resultany type

spechls.fifo (spechls::FIFOOp)

Syntax:

operation ::= `spechls.fifo` `<` $depth `>` $input attr-dict `:` functional-type($input, $result)

Interfaces: OpAsmOpInterface

Attributes:

AttributeMLIR TypeDescription
depth::mlir::IntegerAttr32-bit unsigned integer attribute

Operands:

OperandDescription
inputstructure type

Results:

ResultDescription
resultstructure type

spechls.fsm (spechls::FSMOp)

Syntax:

operation ::= `spechls.fsm` $name `,` $mispec `,` $state attr-dict `:` type($mispec) `,` type($state)

Interfaces: InferTypeOpInterface

Attributes:

AttributeMLIR TypeDescription
name::mlir::StringAttrstring attribute

Operands:

OperandDescription
mispecstructure type
statestructure type

Results:

ResultDescription
resultstructure type

spechls.fsm_command (spechls::FSMCommandOp)

Syntax:

operation ::= `spechls.fsm_command` $name `,` $state attr-dict `:` functional-type($state, $result)

Attributes:

AttributeMLIR TypeDescription
name::mlir::StringAttrstring attribute

Operands:

OperandDescription
statestructure type

Results:

ResultDescription
resultstructure type

spechls.gamma (spechls::GammaOp)

Traits: AlwaysSpeculatableImplTrait

Interfaces: ConditionallySpeculatable, NoMemoryEffect (MemoryEffectOpInterface), OpAsmOpInterface

Effects: MemoryEffects::Effect{}

Attributes:

AttributeMLIR TypeDescription
sym_name::mlir::StringAttrstring attribute

Operands:

OperandDescription
selectinteger
inputsvariadic of any type

Results:

ResultDescription
resultany type

spechls.kernel (spechls::KernelOp)

Traits: IsolatedFromAbove, SingleBlock

Interfaces: CallableOpInterface, FunctionOpInterface, RegionKindInterface, Symbol

Attributes:

AttributeMLIR TypeDescription
sym_name::mlir::StringAttrstring attribute
function_type::mlir::TypeAttrtype attribute of function type
arg_attrs::mlir::ArrayAttrArray of dictionary attributes
res_attrs::mlir::ArrayAttrArray of dictionary attributes

spechls.load (spechls::LoadOp)

Syntax:

operation ::= `spechls.load` $array `[` $index `:` type($index) `]` attr-dict `:` type($array)

Interfaces: InferTypeOpInterface

Operands:

OperandDescription
arrayarray type
indexinteger

Results:

ResultDescription
resultany type

spechls.lut (spechls::LUTOp)

Syntax:

operation ::= `spechls.lut` $index $contents attr-dict `:` functional-type($index, $result)

Interfaces: OpAsmOpInterface

Attributes:

AttributeMLIR TypeDescription
contents::mlir::DenseI64ArrayAttri64 dense array attribute

Operands:

OperandDescription
indexinteger

Results:

ResultDescription
resultinteger

spechls.mu (spechls::MuOp)

Traits: AlwaysSpeculatableImplTrait, SameOperandsAndResultType

Interfaces: ConditionallySpeculatable, InferTypeOpInterface, NoMemoryEffect (MemoryEffectOpInterface), OpAsmOpInterface

Effects: MemoryEffects::Effect{}

Attributes:

AttributeMLIR TypeDescription
sym_name::mlir::StringAttrstring attribute

Operands:

OperandDescription
initValueany type
loopValueany type

Results:

ResultDescription
resultany type

spechls.pack (spechls::PackOp)

Syntax:

operation ::= `spechls.pack` $inputs attr-dict `:` functional-type($inputs, $result)

Operands:

OperandDescription
inputsvariadic of any type

Results:

ResultDescription
resultstructure type

spechls.print (spechls::PrintOp)

Syntax:

operation ::= `spechls.print` $state `,` $enable `,` $format (`,` $args^ `:` type($args))? attr-dict

Interfaces: InferTypeOpInterface, OpAsmOpInterface

Attributes:

AttributeMLIR TypeDescription
format::mlir::StringAttrstring attribute

Operands:

OperandDescription
state32-bit signless integer
enable1-bit signless integer
argsvariadic of any type

Results:

ResultDescription
new_state32-bit signless integer

spechls.rewind (spechls::RewindOp)

Syntax:

operation ::= `spechls.rewind` `<` $depths `>` $input `:` type($input)
              (`,` $rewind^ `:` type($rewind) (`,` $writeCommand^ `:` type($writeCommand))?)? attr-dict

Traits: AttrSizedOperandSegments

Interfaces: InferTypeOpInterface

Attributes:

AttributeMLIR TypeDescription
depths::mlir::DenseI64ArrayAttri64 dense array attribute

Operands:

OperandDescription
inputany type
rewindinteger
writeCommand1-bit signless integer

Results:

ResultDescription
resultany type

spechls.rollback (spechls::RollbackOp)

Syntax:

operation ::= `spechls.rollback` `<` $depths `,` $offset `>` $input `:` type($input) `,` $rollback `:` type($rollback) `,`
              $writeCommand `:` type($writeCommand) attr-dict

Interfaces: InferTypeOpInterface

Attributes:

AttributeMLIR TypeDescription
depths::mlir::DenseI64ArrayAttri64 dense array attribute
offset::mlir::IntegerAttr64-bit signless integer attribute

Operands:

OperandDescription
inputany type
rollbackinteger
writeCommand1-bit signless integer

Results:

ResultDescription
resultany type

spechls.sync (spechls::SyncOp)

Syntax:

operation ::= `spechls.sync` $inputs attr-dict `:` type($inputs)

Interfaces: InferTypeOpInterface

Operands:

OperandDescription
inputsvariadic of any type

Results:

ResultDescription
resultany type

spechls.task (spechls::TaskOp)

Traits: IsolatedFromAbove, SingleBlock

Interfaces: RegionKindInterface

Attributes:

AttributeMLIR TypeDescription
sym_name::mlir::StringAttrstring attribute

Operands:

OperandDescription
argsvariadic of any type

Results:

ResultDescription
resultany type

spechls.unpack (spechls::UnpackOp)

Syntax:

operation ::= `spechls.unpack` $input attr-dict `:` type($input)

Interfaces: InferTypeOpInterface

Operands:

OperandDescription
inputstructure type

Results:

ResultDescription
resultsvariadic of any type

Types

ArrayType

Array type

Syntax:

!spechls.array<
  unsigned,   # size
  ::mlir::Type   # element_type
>

Parameters:

ParameterC++ typeDescription
sizeunsigned
element_type::mlir::Type

StructType

Structure type

Parameters:

ParameterC++ typeDescription
name::llvm::StringRefstruct name
fieldNames::llvm::ArrayRef<::std::string>
fieldTypes::llvm::ArrayRef<::mlir::Type>
Last updated on 27 Jun 2025
Published on 27 Jun 2025