Skip to content

Commit

Permalink
Add other operators
Browse files Browse the repository at this point in the history
  • Loading branch information
leonardt committed Oct 28, 2019
1 parent 70b5a84 commit 2371e01
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions docs/cheat_sheet.md
Original file line number Diff line number Diff line change
Expand Up @@ -208,3 +208,11 @@ as well as arithmetic and comparison operastors.

Note that the the right shift operator when applied to an `SInt` becomes
an arithmetic shift right operator (which replicates the sign bit as it shifts right).

Other
- `mantle.mux(I, S)` where `len(S) == log2_ceil(len(I))` and the value of `S`
corresponds to the index in `I` to be selected
- `m.zext` - zero extend array type
- `m.sext` - sign extend array type
- `m.concat(*arrays)` - concat arrays together
- `m.repeat(value, n)` - create an array replicating `value` `n` times

0 comments on commit 2371e01

Please sign in to comment.