Skip to content

'hls' Dialect

An HLS out-of-tree MLIR dialect This dialect contains dedicated operations, types, and attributes designed for representing HLS-specific structures and components in MLIR.

Operations

hls.connectivity (streamtensor::hls::ConnectivityOp)

Represent the connectivities between HLS modules

Syntax:

operation ::= `hls.connectivity` $sym_name $body attr-dict

Traits: HasParent<ModuleOp>, IsolatedFromAbove, NoTerminator

Interfaces: Symbol

Attributes:

AttributeMLIR TypeDescription
sym_name::mlir::StringAttrstring attribute

hls.number_kernel (streamtensor::hls::NumberKernelOp)

Represent the number of compute units to be instantiated

Syntax:

operation ::= `hls.number_kernel` $kernelName `(` $numKernels `)` attr-dict `:` type($computeUnits)

Traits: HasParent<ConnectivityOp>

Interfaces: SymbolUserOpInterface

Attributes:

AttributeMLIR TypeDescription
kernelName::mlir::FlatSymbolRefAttrflat symbol reference attribute
numKernels::mlir::IntegerAttr64-bit signed integer attribute

Results:

Result Description
computeUnits variadic of A compute unit type

hls.stream_connection (streamtensor::hls::StreamConnectionOp)

Represent the stream connection between compute units

Syntax:

operation ::= `hls.stream_connection` $source `[` $sourcePort `]` `->` $target `[` $targetPort `]` `depth`
              $fifoDepth attr-dict `:` type($source) `->` type($target)

Traits: HasParent<ConnectivityOp>

Attributes:

AttributeMLIR TypeDescription
sourcePort::mlir::StringAttrstring attribute
targetPort::mlir::StringAttrstring attribute
fifoDepth::mlir::IntegerAttr64-bit signed integer attribute

Operands:

Operand Description
source A compute unit type
target A compute unit type

hls.system_port (streamtensor::hls::SystemPortOp)

Represent the system port connection of a compute unit

Syntax:

operation ::= `hls.system_port` $computeUnit `[` $computeUnitPort`]` $tag `[` $indexMin `:` $indexMax `]`
              attr-dict `:` type($computeUnit)

Traits: HasParent<ConnectivityOp>

Attributes:

AttributeMLIR TypeDescription
computeUnitPort::mlir::StringAttrstring attribute
tag::mlir::StringAttrstring attribute
indexMin::mlir::IntegerAttr64-bit signed integer attribute
indexMax::mlir::IntegerAttr64-bit signed integer attribute

Operands:

Operand Description
computeUnit A compute unit type

Attributes

MemoryKindAttr

Kind of memory

Syntax:

#hls.memory<
  mlir::streamtensor::hls::MemoryKind   # value
>

Enum cases: * unknown (UNKNOWN) * lutram_2p (LUTRAM_2P) * bram_2p (BRAM_2P) * uram_2p (URAM_2P) * bram_t2p (BRAM_T2P) * uram_t2p (URAM_T2P) * srl_fifo (SRL_FIFO) * lutram_fifo (LUTRAM_FIFO) * bram_fifo (BRAM_FIFO) * uram_fifo (URAM_FIFO) * dram (DRAM)

Parameters:

Parameter C++ type Description
value mlir::streamtensor::hls::MemoryKind an enum of type MemoryKind

Types

ComputeUnitType

A compute unit type

Syntax:

!hls.cu<
  ::llvm::StringRef   # name
>

Parameters:

Parameter C++ type Description
name ::llvm::StringRef