'comb' Dialect
Types and operations for comb dialect
This dialect defines the comb
dialect, which is intended to be a generic
representation of combinational logic outside of a particular use-case.
Operation definition ¶
comb.add
(::circt::comb::AddOp) ¶
Syntax:
operation ::= `comb.add` $inputs attr-dict `:` qualified(type($result))
Traits: Commutative, SameOperandsAndResultType, SameTypeOperands
Interfaces: NoSideEffect (MemoryEffectOpInterface)
Effects: MemoryEffects::Effect{}
Operands: ¶
Operand | Description |
---|---|
inputs | an integer bitvector of one or more bits |
Results: ¶
Result | Description |
---|---|
result | an integer bitvector of one or more bits |
comb.and
(::circt::comb::AndOp) ¶
Syntax:
operation ::= `comb.and` $inputs attr-dict `:` qualified(type($result))
Traits: Commutative, SameOperandsAndResultType, SameTypeOperands
Interfaces: NoSideEffect (MemoryEffectOpInterface)
Effects: MemoryEffects::Effect{}
Operands: ¶
Operand | Description |
---|---|
inputs | an integer bitvector of one or more bits |
Results: ¶
Result | Description |
---|---|
result | an integer bitvector of one or more bits |
comb.concat
(::circt::comb::ConcatOp) ¶
Concatenate a variadic list of operands together.
Syntax:
operation ::= `comb.concat` $inputs attr-dict `:` qualified(type($inputs))
See the comb rationale document for details on operand ordering.
Interfaces: InferTypeOpInterface, NoSideEffect (MemoryEffectOpInterface)
Effects: MemoryEffects::Effect{}
Operands: ¶
Operand | Description |
---|---|
inputs | an integer bitvector of one or more bits |
Results: ¶
Result | Description |
---|---|
result | an integer bitvector of one or more bits |
comb.divs
(::circt::comb::DivSOp) ¶
Syntax:
operation ::= `comb.divs` $lhs `,` $rhs attr-dict `:` qualified(type($result))
Traits: SameOperandsAndResultType, SameTypeOperands
Interfaces: InferTypeOpInterface, NoSideEffect (MemoryEffectOpInterface)
Effects: MemoryEffects::Effect{}
Operands: ¶
Operand | Description |
---|---|
lhs | an integer bitvector of one or more bits |
rhs | an integer bitvector of one or more bits |
Results: ¶
Result | Description |
---|---|
result | an integer bitvector of one or more bits |
comb.divu
(::circt::comb::DivUOp) ¶
Syntax:
operation ::= `comb.divu` $lhs `,` $rhs attr-dict `:` qualified(type($result))
Traits: SameOperandsAndResultType, SameTypeOperands
Interfaces: InferTypeOpInterface, NoSideEffect (MemoryEffectOpInterface)
Effects: MemoryEffects::Effect{}
Operands: ¶
Operand | Description |
---|---|
lhs | an integer bitvector of one or more bits |
rhs | an integer bitvector of one or more bits |
Results: ¶
Result | Description |
---|---|
result | an integer bitvector of one or more bits |
comb.extract
(::circt::comb::ExtractOp) ¶
Extract a range of bits into a smaller value, lowBit specifies the lowest bit included.
Syntax:
operation ::= `comb.extract` $input `from` $lowBit attr-dict `:` functional-type($input, $result)
Interfaces: NoSideEffect (MemoryEffectOpInterface)
Effects: MemoryEffects::Effect{}
Attributes: ¶
Attribute | MLIR Type | Description |
---|---|---|
lowBit | ::mlir::IntegerAttr | 32-bit signless integer attribute |
Operands: ¶
Operand | Description |
---|---|
input | an integer bitvector of one or more bits |
Results: ¶
Result | Description |
---|---|
result | an integer bitvector of one or more bits |
comb.icmp
(::circt::comb::ICmpOp) ¶
Compare two integer values
Syntax:
operation ::= `comb.icmp` $predicate $lhs `,` $rhs attr-dict `:` qualified(type($lhs))
This operation compares two integers using a predicate. If the predicate is true, returns 1, otherwise returns 0. This operation always returns a one bit wide result.
%r = hw.icmp eq %a, %b : i4
Traits: SameTypeOperands
Interfaces: InferTypeOpInterface, NoSideEffect (MemoryEffectOpInterface)
Effects: MemoryEffects::Effect{}
Attributes: ¶
Attribute | MLIR Type | Description |
---|---|---|
predicate | circt::comb::ICmpPredicateAttr | hw.icmp comparison predicate |
Operands: ¶
Operand | Description |
---|---|
lhs | an integer bitvector of one or more bits |
rhs | an integer bitvector of one or more bits |
Results: ¶
Result | Description |
---|---|
result | 1-bit signless integer |
comb.mods
(::circt::comb::ModSOp) ¶
Syntax:
operation ::= `comb.mods` $lhs `,` $rhs attr-dict `:` qualified(type($result))
Traits: SameOperandsAndResultType, SameTypeOperands
Interfaces: InferTypeOpInterface, NoSideEffect (MemoryEffectOpInterface)
Effects: MemoryEffects::Effect{}
Operands: ¶
Operand | Description |
---|---|
lhs | an integer bitvector of one or more bits |
rhs | an integer bitvector of one or more bits |
Results: ¶
Result | Description |
---|---|
result | an integer bitvector of one or more bits |
comb.modu
(::circt::comb::ModUOp) ¶
Syntax:
operation ::= `comb.modu` $lhs `,` $rhs attr-dict `:` qualified(type($result))
Traits: SameOperandsAndResultType, SameTypeOperands
Interfaces: InferTypeOpInterface, NoSideEffect (MemoryEffectOpInterface)
Effects: MemoryEffects::Effect{}
Operands: ¶
Operand | Description |
---|---|
lhs | an integer bitvector of one or more bits |
rhs | an integer bitvector of one or more bits |
Results: ¶
Result | Description |
---|---|
result | an integer bitvector of one or more bits |
comb.mul
(::circt::comb::MulOp) ¶
Syntax:
operation ::= `comb.mul` $inputs attr-dict `:` qualified(type($result))
Traits: Commutative, SameOperandsAndResultType, SameTypeOperands
Interfaces: NoSideEffect (MemoryEffectOpInterface)
Effects: MemoryEffects::Effect{}
Operands: ¶
Operand | Description |
---|---|
inputs | an integer bitvector of one or more bits |
Results: ¶
Result | Description |
---|---|
result | an integer bitvector of one or more bits |
comb.mux
(::circt::comb::MuxOp) ¶
Return one or the other operand depending on a selector bit
Syntax:
operation ::= `comb.mux` $cond `,` $trueValue `,` $falseValue attr-dict `:` qualified(type($result))
%0 = mux %pred, %tvalue, %fvalue : i4
Interfaces: InferTypeOpInterface, NoSideEffect (MemoryEffectOpInterface)
Effects: MemoryEffects::Effect{}
Operands: ¶
Operand | Description |
---|---|
cond | 1-bit signless integer |
trueValue | any type |
falseValue | any type |
Results: ¶
Result | Description |
---|---|
result | any type |
comb.or
(::circt::comb::OrOp) ¶
Syntax:
operation ::= `comb.or` $inputs attr-dict `:` qualified(type($result))
Traits: Commutative, SameOperandsAndResultType, SameTypeOperands
Interfaces: NoSideEffect (MemoryEffectOpInterface)
Effects: MemoryEffects::Effect{}
Operands: ¶
Operand | Description |
---|---|
inputs | an integer bitvector of one or more bits |
Results: ¶
Result | Description |
---|---|
result | an integer bitvector of one or more bits |
comb.parity
(::circt::comb::ParityOp) ¶
Syntax:
operation ::= `comb.parity` $input attr-dict `:` qualified(type($input))
Interfaces: InferTypeOpInterface, NoSideEffect (MemoryEffectOpInterface)
Effects: MemoryEffects::Effect{}
Operands: ¶
Operand | Description |
---|---|
input | an integer bitvector of one or more bits |
Results: ¶
Result | Description |
---|---|
result | 1-bit signless integer |
comb.replicate
(::circt::comb::ReplicateOp) ¶
Concatenate the operand a constant number of times
Syntax:
operation ::= `comb.replicate` $input attr-dict `:` functional-type($input, $result)
Interfaces: NoSideEffect (MemoryEffectOpInterface)
Effects: MemoryEffects::Effect{}
Operands: ¶
Operand | Description |
---|---|
input | an integer bitvector of one or more bits |
Results: ¶
Result | Description |
---|---|
result | an integer bitvector of one or more bits |
comb.shl
(::circt::comb::ShlOp) ¶
Syntax:
operation ::= `comb.shl` $lhs `,` $rhs attr-dict `:` qualified(type($result))
Traits: SameOperandsAndResultType, SameTypeOperands
Interfaces: InferTypeOpInterface, NoSideEffect (MemoryEffectOpInterface)
Effects: MemoryEffects::Effect{}
Operands: ¶
Operand | Description |
---|---|
lhs | an integer bitvector of one or more bits |
rhs | an integer bitvector of one or more bits |
Results: ¶
Result | Description |
---|---|
result | an integer bitvector of one or more bits |
comb.shrs
(::circt::comb::ShrSOp) ¶
Syntax:
operation ::= `comb.shrs` $lhs `,` $rhs attr-dict `:` qualified(type($result))
Traits: SameOperandsAndResultType, SameTypeOperands
Interfaces: InferTypeOpInterface, NoSideEffect (MemoryEffectOpInterface)
Effects: MemoryEffects::Effect{}
Operands: ¶
Operand | Description |
---|---|
lhs | an integer bitvector of one or more bits |
rhs | an integer bitvector of one or more bits |
Results: ¶
Result | Description |
---|---|
result | an integer bitvector of one or more bits |
comb.shru
(::circt::comb::ShrUOp) ¶
Syntax:
operation ::= `comb.shru` $lhs `,` $rhs attr-dict `:` qualified(type($result))
Traits: SameOperandsAndResultType, SameTypeOperands
Interfaces: InferTypeOpInterface, NoSideEffect (MemoryEffectOpInterface)
Effects: MemoryEffects::Effect{}
Operands: ¶
Operand | Description |
---|---|
lhs | an integer bitvector of one or more bits |
rhs | an integer bitvector of one or more bits |
Results: ¶
Result | Description |
---|---|
result | an integer bitvector of one or more bits |
comb.sub
(::circt::comb::SubOp) ¶
Syntax:
operation ::= `comb.sub` $lhs `,` $rhs attr-dict `:` qualified(type($result))
Traits: SameOperandsAndResultType, SameTypeOperands
Interfaces: InferTypeOpInterface, NoSideEffect (MemoryEffectOpInterface)
Effects: MemoryEffects::Effect{}
Operands: ¶
Operand | Description |
---|---|
lhs | an integer bitvector of one or more bits |
rhs | an integer bitvector of one or more bits |
Results: ¶
Result | Description |
---|---|
result | an integer bitvector of one or more bits |
comb.xor
(::circt::comb::XorOp) ¶
Syntax:
operation ::= `comb.xor` $inputs attr-dict `:` qualified(type($result))
Traits: Commutative, SameOperandsAndResultType, SameTypeOperands
Interfaces: NoSideEffect (MemoryEffectOpInterface)
Effects: MemoryEffects::Effect{}
Operands: ¶
Operand | Description |
---|---|
inputs | an integer bitvector of one or more bits |
Results: ¶
Result | Description |
---|---|
result | an integer bitvector of one or more bits |