'msft' Dialect
Microsoft internal support dialect
Umbrella dialect for everything needed to support Microsoft development but not thoroughly discussed. Most (if not everything) in this dialect is a candidate for generalization and re-homing.
Operations ¶
msft.hlc.linear
(::circt::msft::LinearOp) ¶
Model of a linear datapath which can be arbitrarily pipelined
Syntax:
operation ::= `msft.hlc.linear` `clock` $clock attr-dict `:` type($outs) $datapath
Defines a feed-forward datapath which can be scheduled into a pipeline.
Due to the feed-forwardness, the inner region is NOT a graph region.
Internally, only combinational operations (comb
, msft
, hw
) are allowed.
Example:
msft.module @foo(%in0 : i32, %in1 : i32, %in2 : i32, %clk : i1) -> (out: i32) -> {
%0 = msft.hlc.linear(%a = %in0, %b = %in1, %c = %in2) clock %clk (i32, i32, i32) -> (i32) {
%0 = comb.mul %a, %b : i32
%1 = comb.add %0, %c : i32
msft.output %1 : i32
}
}
Traits: SingleBlockImplicitTerminator<OutputOp>
, SingleBlock
Operands: ¶
Operand | Description |
---|---|
clock | A type for clock-carrying wires |
Results: ¶
Result | Description |
---|---|
outs | variadic of any type |
msft.instance.dynamic
(::circt::msft::DynamicInstanceOp) ¶
A module instance in the instance hierarchy
Syntax:
operation ::= `msft.instance.dynamic` custom<ImplicitInnerRef>($instanceRef) $body attr-dict
Represents an instance (as in instance in the instance hierarchy) referred
to henceforth as a dynamic instance. Specified with a path through the
instance hierarchy (which in the future will be replaced with an AppID).
Lowers to a hw.hierpath
but unlike a global ref, does not require all of
the ops participating in the hierpath to contain a back pointer attribute.
Allows users to efficiently add placements to a large number of dynamic
instances which happen to map to a small number of static instances by
bulk-adding the necessary hw.hierpath
attributes.
During the lowering, moves the operations in the body to the top level and gives them the symbol of the hierpath which was created to replace the dynamic instance.
Traits: HasParent<circt::msft::InstanceHierarchyOp, circt::msft::DynamicInstanceOp>
, NoTerminator
Attributes: ¶
Attribute | MLIR Type | Description |
---|---|---|
instanceRef | ::circt::hw::InnerRefAttr | Refer to a name inside a module |
msft.instance.hierarchy
(::circt::msft::InstanceHierarchyOp) ¶
The root of an instance hierarchy
Syntax:
operation ::= `msft.instance.hierarchy` $topModuleRef ($instName^)? $body attr-dict
Models the “root” / “top” of an instance hierarchy. DynamicInstanceOp
s
must be contained by this op. Specifies the top module and (optionally) an
“instance” name in the case where there are multiple instances of a
particular module in a design. (As is often the case where one isn’t
producing the design’s “top” module but a subdesign.)
Traits: HasParent<mlir::ModuleOp>
, NoTerminator
Attributes: ¶
Attribute | MLIR Type | Description |
---|---|---|
topModuleRef | ::mlir::FlatSymbolRefAttr | flat symbol reference attribute |
instName | ::mlir::StringAttr | string attribute |
msft.instance.verb_attr
(::circt::msft::DynamicInstanceVerbatimAttrOp) ¶
Specify an arbitrary attribute attached to a dynamic instance
Syntax:
operation ::= `msft.instance.verb_attr` ($ref^)? `name` `:` $name `value` `:` $value (`path` `:` $subPath^)? attr-dict
Allows a user to specify a custom attribute name and value which is attached to a dynamic instance.
For Quartus tcl, translates to: set_instance_assignment -name $name $value -to $parent|<instance_path>
Interfaces: DynInstDataOpInterface
, UnaryDynInstDataOpInterface
Attributes: ¶
Attribute | MLIR Type | Description |
---|---|---|
name | ::mlir::StringAttr | string attribute |
value | ::mlir::StringAttr | string attribute |
subPath | ::mlir::StringAttr | string attribute |
ref | ::mlir::FlatSymbolRefAttr | flat symbol reference attribute |
msft.output
(::circt::msft::OutputOp) ¶
Termination operation
Syntax:
operation ::= `msft.output` attr-dict ($operands^ `:` qualified(type($operands)))?
Traits: AlwaysSpeculatableImplTrait
, ReturnLike
, Terminator
Interfaces: ConditionallySpeculatable
, NoMemoryEffect (MemoryEffectOpInterface)
, RegionBranchTerminatorOpInterface
Effects: MemoryEffects::Effect{}
Operands: ¶
Operand | Description |
---|---|
operands | variadic of any type |
msft.pd.location
(::circt::msft::PDPhysLocationOp) ¶
Specify a location for an instance
Syntax:
operation ::= `msft.pd.location` ($ref^)? custom<PhysLoc>($loc) (`path` `:` $subPath^)? attr-dict
Used to specify a specific location on an FPGA to place a dynamic instance.
Supports specifying the location of a subpath for extern modules and device
primitives. Intended to live as a child of instance.dynamic
initially
without the ref
field. The dynamic instance lowering will fill in ref
with the symol of the hw.hierpath
op corresponding to the lowered dynamic
instance.
Interfaces: DynInstDataOpInterface
, UnaryDynInstDataOpInterface
Attributes: ¶
Attribute | MLIR Type | Description |
---|---|---|
loc | ::circt::msft::PhysLocationAttr | Descibes a physical location on a device |
subPath | ::mlir::StringAttr | string attribute |
ref | ::mlir::FlatSymbolRefAttr | flat symbol reference attribute |
msft.pd.multicycle
(::circt::msft::PDMulticycleOp) ¶
Specify a multicycle constraint
Syntax:
operation ::= `msft.pd.multicycle` $cycles $source `->` $dest attr-dict
Specifies a multicycle constraint in between two registers.
source
and dest
symbols reference HierPathOp
symbols denoting the
exact registers in the instance hierarchy to which the constraint applies.
Interfaces: DynInstDataOpInterface
Attributes: ¶
Attribute | MLIR Type | Description |
---|---|---|
source | ::mlir::FlatSymbolRefAttr | flat symbol reference attribute |
dest | ::mlir::FlatSymbolRefAttr | flat symbol reference attribute |
cycles | ::mlir::IntegerAttr | 32-bit signless integer attribute whose minimum value is 1 |
msft.pd.physregion
(::circt::msft::PDPhysRegionOp) ¶
Specify a physical region for an instance
Syntax:
operation ::= `msft.pd.physregion` ($ref^)? $physRegionRef (`path` `:` $subPath^)? attr-dict
Annotate a particular entity within an op with the region of the devices on an FPGA to which it should mapped. The physRegionRef must refer to a DeclPhysicalRegion operation.
Interfaces: DynInstDataOpInterface
, UnaryDynInstDataOpInterface
Attributes: ¶
Attribute | MLIR Type | Description |
---|---|---|
physRegionRef | ::mlir::FlatSymbolRefAttr | flat symbol reference attribute |
subPath | ::mlir::StringAttr | string attribute |
ref | ::mlir::FlatSymbolRefAttr | flat symbol reference attribute |
msft.pd.reg_location
(::circt::msft::PDRegPhysLocationOp) ¶
Specify register locations
Syntax:
operation ::= `msft.pd.reg_location` (`ref` $ref^)? custom<ListOptionalRegLocList>($locs) attr-dict
A version of “PDPhysLocationOp” specialized for registers, which have one location per bit.
Interfaces: DynInstDataOpInterface
, UnaryDynInstDataOpInterface
Attributes: ¶
Attribute | MLIR Type | Description |
---|---|---|
locs | ::circt::msft::LocationVectorAttr | Vector of optional locations corresponding to bits in a type |
ref | ::mlir::FlatSymbolRefAttr | flat symbol reference attribute |
msft.pe.output
(::circt::msft::PEOutputOp) ¶
Set the outputs from a PE block
Syntax:
operation ::= `msft.pe.output` $output attr-dict `:` type($output)
Traits: Terminator
Operands: ¶
Operand | Description |
---|---|
output | any type |
msft.physical_region
(::circt::msft::DeclPhysicalRegionOp) ¶
Syntax:
operation ::= `msft.physical_region` $sym_name `,` $bounds attr-dict
Traits: HasParent<mlir::ModuleOp>
Interfaces: Symbol
Attributes: ¶
Attribute | MLIR Type | Description |
---|---|---|
sym_name | ::mlir::StringAttr | string attribute |
bounds | ::mlir::ArrayAttr | array of PhysicalBounds |
msft.systolic.array
(::circt::msft::SystolicArrayOp) ¶
Model of a row/column broadcast systolic array
Note: the PE region is NOT a graph region. This was intentional since systolic arrays are entirely feed-forward.
Traits: SingleBlockImplicitTerminator<PEOutputOp>
, SingleBlock
Operands: ¶
Operand | Description |
---|---|
rowInputs | an ArrayType |
colInputs | an ArrayType |
Results: ¶
Result | Description |
---|---|
peOutputs | an array of arrays |
Attributes ¶
LocationVectorAttr ¶
Vector of optional locations corresponding to bits in a type
Parameters: ¶
Parameter | C++ type | Description |
---|---|---|
type | ::mlir::TypeAttr | |
locs | ::llvm::ArrayRef<::circt::msft::PhysLocationAttr> |
PhysLocationAttr ¶
Descibes a physical location on a device
Annotate a particular entity within an op with the location of the device on an FPGA to which it should mapped. The coordinates in this attribute are absolute locations on the device, so if there are two instances of a module with this annotation incorrect results will be generated. How to solve this is a more general, open problem.
Parameters: ¶
Parameter | C++ type | Description |
---|---|---|
primitiveType | PrimitiveTypeAttr | |
x | uint64_t | |
y | uint64_t | |
num | uint64_t |
PhysicalBoundsAttr ¶
Describes a rectangle bounding a physical region on a device
Describes a rectangular bound within a device. The lower and upper bounds must be specified for both the X and Y axis. The bounds are inclusive.
Parameters: ¶
Parameter | C++ type | Description |
---|---|---|
xMin | uint64_t | |
xMax | uint64_t | |
yMin | uint64_t | |
yMax | uint64_t |
Enums ¶
PrimitiveType ¶
Type of device at physical location
Cases: ¶
Symbol | Value | String |
---|---|---|
M20K | 1 | M20K |
DSP | 2 | DSP |
FF | 3 | FF |