'ibis' Dialect
Types and operations for Ibis dialect
The ibis
dialect is intended to support porting and eventual open sourcing
of an internal hardware development language.
Operations
ibis.call
(::circt::ibis::CallOp)
Ibis method call
Syntax:
operation ::= `ibis.call` $callee `(` $operands `)` attr-dict `:` functional-type($operands, results)
Dispatch a call to an Ibis method.
Interfaces: CallOpInterface
, InnerRefUserOpInterface
Attributes:
Attribute | MLIR Type | Description |
---|---|---|
callee | ::circt::hw::InnerRefAttr | Refer to a name inside a module |
Operands:
Operand | Description |
---|---|
operands | variadic of any type |
Results:
Result | Description |
---|---|
«unnamed» | variadic of any type |
ibis.class
(::circt::ibis::ClassOp)
Ibis class
Syntax:
operation ::= `ibis.class` ($name^)? `sym` $inner_sym attr-dict-with-keyword $body
Ibis has the notion of a class which can contain methods and member variables.
In the low-level Ibis representation, the ClassOp becomes a container for
ibis.port
s, ibis.container
s, and contain logic for member variables.
Traits: HasParent<DesignOp>
, IsolatedFromAbove
, NoTerminator
, SingleBlock
Interfaces: InnerSymbol
, InstanceGraphModuleOpInterface
, NamedInnerSymbol
, RegionKindInterface
, ScopeOpInterface
Attributes:
Attribute | MLIR Type | Description |
---|---|---|
inner_sym | ::circt::hw::InnerSymAttr | Inner symbol definition |
name | ::mlir::StringAttr | string attribute |
ibis.container
(::circt::ibis::ContainerOp)
Ibis container
Syntax:
operation ::= `ibis.container` ($name^)? `sym` $inner_sym (`top_level` $isTopLevel^)? attr-dict-with-keyword $body
An ibis container describes a collection of logic nested within an Ibis class.
Traits: HasParent<DesignOp, ClassOp>
, IsolatedFromAbove
, NoRegionArguments
, NoTerminator
, SingleBlock
Interfaces: InnerSymbol
, InstanceGraphModuleOpInterface
, NamedInnerSymbolInterface
, NamedInnerSymbol
, RegionKindInterface
, ScopeOpInterface
Attributes:
Attribute | MLIR Type | Description |
---|---|---|
inner_sym | ::circt::hw::InnerSymAttr | Inner symbol definition |
isTopLevel | ::mlir::UnitAttr | unit attribute |
name | ::mlir::StringAttr | string attribute |
ibis.container.instance
(::circt::ibis::ContainerInstanceOp)
Ibis container instance
Syntax:
operation ::= `ibis.container.instance` $inner_sym `,` $targetName attr-dict
custom<ScopeRefFromName>(type($scopeRef), ref($targetName))
Instantiates an Ibis container.
Interfaces: HasCustomSSAName
, InnerRefUserOpInterface
, InnerSymbolOpInterface
, InstanceGraphInstanceOpInterface
Attributes:
Attribute | MLIR Type | Description |
---|---|---|
inner_sym | ::circt::hw::InnerSymAttr | Inner symbol definition |
targetName | ::circt::hw::InnerRefAttr | Refer to a name inside a module |
Results:
Result | Description |
---|---|
scopeRef |
ibis.design
(::circt::ibis::DesignOp)
All Ibis containers must be inside this op
Syntax:
operation ::= `ibis.design` $sym_name attr-dict-with-keyword $body
Traits: InnerSymbolTable
, IsolatedFromAbove
, NoRegionArguments
, NoTerminator
, SingleBlock
Interfaces: Symbol
Attributes:
Attribute | MLIR Type | Description |
---|---|---|
sym_name | ::mlir::StringAttr | string attribute |
ibis.get_port
(::circt::ibis::GetPortOp)
Ibis get port
Syntax:
operation ::= `ibis.get_port` $instance `,` $portSymbol `:` qualified(type($instance)) `->`
qualified(type($port)) attr-dict
Given an Ibis class reference, returns a port of said class. The port is specified by the symbol name of the port in the referenced class.
Importantly, the user must specify how they intend to use the op, by
specifying the direction of the portref type that this op is generated with.
If the request port is to be read from, the type must be !ibis.portref<out T>
and if the port is to be written to, the type must be !ibis.portref<in T>
.
This is to ensure that the usage is reflected in the get_port type which in
turn is used by the tunneling passes to create the proper ports through the
hierarchy.
This implies that the portref direction of the get_port op is independent of the actual direction of the target port, and only the inner portref type must match.
Traits: AlwaysSpeculatableImplTrait
Interfaces: ConditionallySpeculatable
, HasCustomSSAName
, InnerRefUserOpInterface
, NoMemoryEffect (MemoryEffectOpInterface)
Effects: MemoryEffects::Effect{}
Attributes:
Attribute | MLIR Type | Description |
---|---|---|
portSymbol | ::mlir::FlatSymbolRefAttr | flat symbol reference attribute |
Operands:
Operand | Description |
---|---|
instance |
Results:
Result | Description |
---|---|
port |
ibis.get_var
(::circt::ibis::GetVarOp)
Dereferences an ibis member variable through a scoperef
Syntax:
operation ::= `ibis.get_var` $instance `,` $varName attr-dict `:` qualified(type($instance)) `->` qualified(type($var))
Interfaces: HasCustomSSAName
, InnerRefUserOpInterface
Attributes:
Attribute | MLIR Type | Description |
---|---|---|
varName | ::mlir::FlatSymbolRefAttr | flat symbol reference attribute |
Operands:
Operand | Description |
---|---|
instance |
Results:
Result | Description |
---|---|
var | memref of any type values |
ibis.instance
(::circt::ibis::InstanceOp)
Ibis class instance
Syntax:
operation ::= `ibis.instance` $inner_sym `,` $targetName attr-dict
custom<ScopeRefFromName>(type($scopeRef), ref($targetName))
Instantiates an Ibis class.
Interfaces: HasCustomSSAName
, InnerRefUserOpInterface
, InnerSymbolOpInterface
, InstanceGraphInstanceOpInterface
Attributes:
Attribute | MLIR Type | Description |
---|---|---|
inner_sym | ::circt::hw::InnerSymAttr | Inner symbol definition |
targetName | ::circt::hw::InnerRefAttr | Refer to a name inside a module |
Results:
Result | Description |
---|---|
scopeRef |
ibis.method
(::circt::ibis::MethodOp)
Ibis method
Ibis methods are a lot like software functions: a list of named arguments and unnamed return values with imperative control flow.
Traits: AutomaticAllocationScope
, HasParent<ClassOp>
, IsolatedFromAbove
Interfaces: InnerSymbolOpInterface
, MethodLikeOpInterface
, OpAsmOpInterface
Attributes:
Attribute | MLIR Type | Description |
---|---|---|
inner_sym | ::circt::hw::InnerSymAttr | Inner symbol definition |
function_type | ::mlir::TypeAttr | type attribute of function type |
argNames | ::mlir::ArrayAttr | array attribute |
arg_attrs | ::mlir::ArrayAttr | Array of dictionary attributes |
res_attrs | ::mlir::ArrayAttr | Array of dictionary attributes |
ibis.method.df
(::circt::ibis::DataflowMethodOp)
Ibis dataflow method
Ibis dataflow methods share the same interface as an ibis.method
but
without imperative CFG-based control flow. Instead, this method implements a
graph region, and control flow is expected to be defined by dataflow operations.
Traits: HasParent<ClassOp>
, IsolatedFromAbove
, SingleBlockImplicitTerminator<ibis::ReturnOp>
, SingleBlock
Interfaces: FineGrainedDataflowRegionOpInterface
, InnerSymbolOpInterface
, MethodLikeOpInterface
, RegionKindInterface
Attributes:
Attribute | MLIR Type | Description |
---|---|---|
inner_sym | ::circt::hw::InnerSymAttr | Inner symbol definition |
function_type | ::mlir::TypeAttr | type attribute of function type |
argNames | ::mlir::ArrayAttr | array attribute |
arg_attrs | ::mlir::ArrayAttr | Array of dictionary attributes |
res_attrs | ::mlir::ArrayAttr | Array of dictionary attributes |
ibis.path
(::circt::ibis::PathOp)
Ibis path
Syntax:
operation ::= `ibis.path` $path attr-dict
The ibis.path
operation describes an instance hierarchy path relative to
the current scope. The path is specified by a list of either parent or
child identifiers (navigating up or down the hierarchy, respectively).
Scopes along the path are optionally typed, however, An ibis.path
must
lways terminate in a fully typed specifier, i.e. never an !ibis.scoperef<>
.
The operation returns a single !ibis.scoperef
-typed value representing
the scope at the end of the path.
Traits: AlwaysSpeculatableImplTrait
Interfaces: ConditionallySpeculatable
, HasCustomSSAName
, InferTypeOpInterface
, InnerRefUserOpInterface
, NoMemoryEffect (MemoryEffectOpInterface)
Effects: MemoryEffects::Effect{}
Attributes:
Attribute | MLIR Type | Description |
---|---|---|
path | ::mlir::ArrayAttr | Path step array attribute |
Results:
Result | Description |
---|---|
instance |
ibis.pipeline.header
(::circt::ibis::PipelineHeaderOp)
Ibis pipeline header operation
Syntax:
operation ::= `ibis.pipeline.header` attr-dict
This operation defines the hardware-like values used to drive a pipeline, such as clock and reset. This is an intermediate operation, meaning that it’s strictly used to facilitate progressive lowering of ibis static blocks to scheduled pipelines.
Traits: AlwaysSpeculatableImplTrait
Interfaces: ConditionallySpeculatable
, InferTypeOpInterface
, NoMemoryEffect (MemoryEffectOpInterface)
Effects: MemoryEffects::Effect{}
Results:
Result | Description |
---|---|
clock | A type for clock-carrying wires |
reset | 1-bit signless integer |
go | 1-bit signless integer |
stall | 1-bit signless integer |
ibis.port.input
(::circt::ibis::InputPortOp)
Ibis input port
Syntax:
operation ::= `ibis.port.input` ($name^)? `sym` $inner_sym `:` $type attr-dict
An ibis port has an attached ’name’ attribute. This is a name-hint used to generate the final port name. The port name and port symbol are not related, and all references to a port is done through the port symbol.
Traits: HasParent<ClassOp, ContainerOp>
Interfaces: HasCustomSSAName
, InferTypeOpInterface
, InnerSymbol
, NamedInnerSymbol
, PortOpInterface
Attributes:
Attribute | MLIR Type | Description |
---|---|---|
inner_sym | ::circt::hw::InnerSymAttr | Inner symbol definition |
type | ::mlir::TypeAttr | type attribute of any type |
name | ::mlir::StringAttr | string attribute |
Results:
Result | Description |
---|---|
port |
ibis.port.output
(::circt::ibis::OutputPortOp)
Ibis output port
Syntax:
operation ::= `ibis.port.output` ($name^)? `sym` $inner_sym `:` $type attr-dict
An ibis port has an attached ’name’ attribute. This is a name-hint used to generate the final port name. The port name and port symbol are not related, and all references to a port is done through the port symbol.
Traits: HasParent<ClassOp, ContainerOp>
Interfaces: HasCustomSSAName
, InferTypeOpInterface
, InnerSymbol
, NamedInnerSymbol
, PortOpInterface
Attributes:
Attribute | MLIR Type | Description |
---|---|---|
inner_sym | ::circt::hw::InnerSymAttr | Inner symbol definition |
type | ::mlir::TypeAttr | type attribute of any type |
name | ::mlir::StringAttr | string attribute |
Results:
Result | Description |
---|---|
port |
ibis.port.read
(::circt::ibis::PortReadOp)
Ibis port read
Syntax:
operation ::= `ibis.port.read` $port attr-dict `:` qualified(type($port))
Read the value of a port reference.
Traits: AlwaysSpeculatableImplTrait
Interfaces: ConditionallySpeculatable
, HasCustomSSAName
, InferTypeOpInterface
, NoMemoryEffect (MemoryEffectOpInterface)
Effects: MemoryEffects::Effect{}
Operands:
Operand | Description |
---|---|
port |
Results:
Result | Description |
---|---|
output | any type |
ibis.port.write
(::circt::ibis::PortWriteOp)
Ibis port write
Syntax:
operation ::= `ibis.port.write` $port `,` $value attr-dict `:` qualified(type($port))
Write a value to a port reference.
Operands:
Operand | Description |
---|---|
port | |
value | any type |
ibis.return
(::circt::ibis::ReturnOp)
Ibis method terminator
Syntax:
operation ::= `ibis.return` ($retValues^)? attr-dict (`:` type($retValues)^)?
Traits: AlwaysSpeculatableImplTrait
, HasParent<MethodOp, DataflowMethodOp>
, ReturnLike
, Terminator
Interfaces: ConditionallySpeculatable
, NoMemoryEffect (MemoryEffectOpInterface)
, RegionBranchTerminatorOpInterface
Effects: MemoryEffects::Effect{}
Operands:
Operand | Description |
---|---|
retValues | variadic of any type |
ibis.sblock
(::circt::ibis::StaticBlockOp)
Ibis block
The ibis.sblock
operation defines a block wherein a group of operations
are expected to be statically scheduleable.
The operation is not isolated from above to facilitate ease of construction.
However, once a program has been constructed and lowered to a sufficient
level, the user may run --ibis-argify-blocks
to effectively isolate the
block from above, by converting SSA values referenced through dominanes into
arguments of the block
The block may contain additional attributes to specify constraints on the block further down the compilation pipeline.
Traits: AutomaticAllocationScope
, SingleBlockImplicitTerminator<BlockReturnOp>
, SingleBlock
Interfaces: BlockOpInterface
Attributes:
Attribute | MLIR Type | Description |
---|---|---|
maxThreads | ::mlir::IntegerAttr | 64-bit signless integer attribute whose minimum value is 1 |
Operands:
Operand | Description |
---|---|
inputs | variadic of any type |
Results:
Result | Description |
---|---|
outputs | variadic of any type |
ibis.sblock.dc
(::circt::ibis::DCBlockOp)
DC-interfaced Ibis block
The ibis.sblock.dc
operation is like an ibis.sblock
operation with
a few differences, being:
- The operation is DC-interfaced, meaning that all arguments and results are dc-value typed.
- The operation is IsolatedFromAbove.
Traits: AutomaticAllocationScope
, IsolatedFromAbove
, SingleBlockImplicitTerminator<BlockReturnOp>
, SingleBlock
Interfaces: BlockOpInterface
Attributes:
Attribute | MLIR Type | Description |
---|---|---|
maxThreads | ::mlir::IntegerAttr | 64-bit signless integer attribute whose minimum value is 1 |
Operands:
Operand | Description |
---|---|
inputs | variadic of any type |
Results:
Result | Description |
---|---|
outputs | variadic of any type |
ibis.sblock.inline.begin
(::circt::ibis::InlineStaticBlockBeginOp)
Ibis inline static block begin marker
Syntax:
operation ::= `ibis.sblock.inline.begin` attr-dict
The ibis.sblock.inline.begin
operation is a marker that indicates the
begin of an inline static block.
The operation is used to maintain ibis.sblocks
while in the Ibis inline
phase (to facilitate e.g. mem2reg).
The operation:
- denotes the begin of the sblock
- carries whatever attributes that the source
ibis.sblock
carried. - is considered side-effectfull.
Traits: HasParent<MethodOp>
ibis.sblock.inline.end
(::circt::ibis::InlineStaticBlockEndOp)
Ibis inline static block end marker
Syntax:
operation ::= `ibis.sblock.inline.end` attr-dict
The ibis.sblock.inline.end
operation is a marker that indicates the
end of an inline static block.
The operation is used to maintain ibis.sblocks
while in the Ibis inline
phase (to facilitate e.g. mem2reg).
Traits: HasParent<MethodOp>
ibis.sblock.isolated
(::circt::ibis::IsolatedStaticBlockOp)
Ibis isolated block
The ibis.sblock.isolated
operation is like an ibis.sblock
operation
but with an IsolatedFromAbove condition, meaning that all arguments and
results are passed through the block as arguments and results.
Traits: AutomaticAllocationScope
, IsolatedFromAbove
, SingleBlockImplicitTerminator<BlockReturnOp>
, SingleBlock
Interfaces: BlockOpInterface
Attributes:
Attribute | MLIR Type | Description |
---|---|---|
maxThreads | ::mlir::IntegerAttr | 64-bit signless integer attribute whose minimum value is 1 |
Operands:
Operand | Description |
---|---|
inputs | variadic of any type |
Results:
Result | Description |
---|---|
outputs | variadic of any type |
ibis.sblock.return
(::circt::ibis::BlockReturnOp)
Ibis static block terminator
Syntax:
operation ::= `ibis.sblock.return` ($retValues^)? attr-dict (`:` type($retValues)^)?
Traits: AlwaysSpeculatableImplTrait
, HasParent<StaticBlockOp, IsolatedStaticBlockOp, DCBlockOp>
, ReturnLike
, Terminator
Interfaces: ConditionallySpeculatable
, NoMemoryEffect (MemoryEffectOpInterface)
, RegionBranchTerminatorOpInterface
Effects: MemoryEffects::Effect{}
Operands:
Operand | Description |
---|---|
retValues | variadic of any type |
ibis.this
(::circt::ibis::ThisOp)
Return a handle to the current scope !ibis.scoperef
Syntax:
operation ::= `ibis.this` $scopeName attr-dict custom<ScopeRefFromName>(type($thisRef), ref($scopeName))
Interfaces: HasCustomSSAName
, InnerRefUserOpInterface
Attributes:
Attribute | MLIR Type | Description |
---|---|---|
scopeName | ::circt::hw::InnerRefAttr | Refer to a name inside a module |
Results:
Result | Description |
---|---|
thisRef |
ibis.var
(::circt::ibis::VarOp)
Ibis variable definition
Syntax:
operation ::= `ibis.var` $inner_sym `:` $type attr-dict
Defines an Ibis class member variable. The variable is typed with a
memref.memref
type, and may define either a singleton or uni-dimensional
array of values.
ibis.var
defines a symbol within the encompassing class scope which can
be dereferenced through a !ibis.scoperef
value of the parent class.
Interfaces: InnerSymbolOpInterface
Attributes:
Attribute | MLIR Type | Description |
---|---|---|
inner_sym | ::circt::hw::InnerSymAttr | Inner symbol definition |
type | ::mlir::TypeAttr | any memref type |
ibis.wire.input
(::circt::ibis::InputWireOp)
Ibis input wire
Syntax:
operation ::= `ibis.wire.input` $inner_sym `:` qualified(type($output)) attr-dict
An input wire defines an ibis.portref<in T>
port alongside a value
of type T
which represents the value to-be-written to the wire.
Traits: HasParent<ClassOp, ContainerOp>
Interfaces: HasCustomSSAName
, InnerSymbolOpInterface
, InnerSymbol
, NamedInnerSymbol
, PortOpInterface
Attributes:
Attribute | MLIR Type | Description |
---|---|---|
inner_sym | ::circt::hw::InnerSymAttr | Inner symbol definition |
name | ::mlir::StringAttr | string attribute |
Results:
Result | Description |
---|---|
port | |
output | any type |
ibis.wire.output
(::circt::ibis::OutputWireOp)
Ibis output wire
Syntax:
operation ::= `ibis.wire.output` $inner_sym `,` $input `:` qualified(type($input)) attr-dict
An output wire defines an ibis.portref<out T>
port that can be read.
The operation takes an input value of type T
which represents the value
on the output portref.
Traits: HasParent<ClassOp, ContainerOp>
Interfaces: HasCustomSSAName
, InferTypeOpInterface
, InnerSymbolOpInterface
, InnerSymbol
, NamedInnerSymbol
, PortOpInterface
Attributes:
Attribute | MLIR Type | Description |
---|---|---|
inner_sym | ::circt::hw::InnerSymAttr | Inner symbol definition |
name | ::mlir::StringAttr | string attribute |
Operands:
Operand | Description |
---|---|
input | any type |
Results:
Result | Description |
---|---|
port |
Attributes
PathStepAttr
Syntax:
#ibis.step<
PathDirection, # direction
::mlir::Type, # type
mlir::FlatSymbolRefAttr # child
>
Used to describe a single step in a path
Parameters:
Parameter | C++ type | Description |
---|---|---|
direction | PathDirection | |
type | ::mlir::Type | |
child | mlir::FlatSymbolRefAttr |
Types
PortRefType
Syntax:
!ibis.portref<
TypeAttr, # portTypeAttr
ibis::Direction # direction
>
A reference to an Ibis port.
Parameters:
Parameter | C++ type | Description |
---|---|---|
portTypeAttr | TypeAttr | |
direction | ibis::Direction |
ScopeRefType
A reference to an Ibis scope. May be either a reference to a specific
scope (given a $scopeName
argument) or an opaque reference.
Parameters:
Parameter | C++ type | Description |
---|---|---|
scopeRef | ::circt::hw::InnerRefAttr |
Enums
Direction
Ibis port direction
Cases:
Symbol | Value | String |
---|---|---|
Input | 0 | in |
Output | 1 | out |
PathDirection
path direction
Cases:
Symbol | Value | String |
---|---|---|
Parent | 0 | parent |
Child | 1 | child |