Expand description
Operators for Cmtrs values, most are from FIRRTL
Currently supported operators:
- Rust ops
DShl::dshl, dynamic shift left, where the rhs is a runtime valueDShr::dshr, dynamic shift right, where the rhs is a runtime valueCat::cat, bit concatenationCvt::cvt, convert type into UIntAsUInt::as_uint, convert type into UIntAsSInt::as_sint, convert type into SIntAndr::andr, reduce andOrr::orr, reduce orXorr::xorr, reduce xorRepeat::repeat, repeat a value for constant timesPad::pad, pad zerosHead::head, get MSBsTail::tail, get LSBsExtractBits::bits, get a range of bits
Traits§
- Add
- The addition operator
+. - Andr
- AsSInt
- AsUInt
- BitAnd
- The bitwise AND operator
&. - BitOr
- The bitwise OR operator
|. - BitXor
- The bitwise XOR operator
^. - Cat
- CmpOps
- Cvt
- DShl
- DShr
- Div
- The division operator
/. - Extract
Bits - Head
- Mul
- The multiplication operator
*. - Neg
- The unary negation operator
-. - Not
- The unary logical negation operator
!. - Orr
- Pad
- Rem
- The remainder operator
%. - Repeat
- Shl
- The left shift operator
<<. Note that because this trait is implemented for all integer types with multiple right-hand-side types, Rust’s type checker has special handling for_ << _, setting the result type for integer operations to the type of the left-hand-side operand. This means that thougha << banda.shl(b)are one and the same from an evaluation standpoint, they are different when it comes to type inference. - Shr
- The right shift operator
>>. Note that because this trait is implemented for all integer types with multiple right-hand-side types, Rust’s type checker has special handling for_ >> _, setting the result type for integer operations to the type of the left-hand-side operand. This means that thougha >> banda.shr(b)are one and the same from an evaluation standpoint, they are different when it comes to type inference. - Sub
- The subtraction operator
-. - Tail
- Xorr