| 1 |
- BlackBox: |
| 2 |
name: Clash.Sized.Internal.BitVector.replaceBit# |
| 3 |
kind: Declaration |
| 4 |
outputUsage: Blocking |
| 5 |
type: |- |
| 6 |
replaceBit# :: KnownNat n -- ARG[0] |
| 7 |
=> BitVector n -- ARG[1] |
| 8 |
-> Int -- ARG[2] |
| 9 |
-> Bit -- ARG[3] |
| 10 |
-> BitVector n |
| 11 |
template: |- |
| 12 |
// replaceBit start |
| 13 |
always @(*) begin |
| 14 |
~RESULT = ~ARG[1]; |
| 15 |
~RESULT[~ARG[2]] = ~VAR[din][3]; |
| 16 |
end |
| 17 |
// replaceBit end |
| 18 |
- BlackBox: |
| 19 |
name: Clash.Sized.Internal.BitVector.setSlice# |
| 20 |
kind: Declaration |
| 21 |
outputUsage: Blocking |
| 22 |
type: |- |
| 23 |
setSlice# :: SNat (m + 1 + i) |
| 24 |
-> BitVector (m + 1 + i) -- ARG[1] |
| 25 |
-> SNat m -- ARG[2] |
| 26 |
-> SNat n -- ARG[3] |
| 27 |
-> BitVector (m + 1 - n) -- ARG[4] |
| 28 |
-> BitVector (m + 1 + i) |
| 29 |
template: |- |
| 30 |
// setSlice begin |
| 31 |
always @(*) begin |
| 32 |
~RESULT = ~ARG[1]; |
| 33 |
~RESULT[~LIT[2] : ~LIT[3]] = ~VAR[din][4]; |
| 34 |
end |
| 35 |
// setSlice end |
| 36 |
workInfo: Never |
| 37 |
- BlackBox: |
| 38 |
name: Clash.Sized.Internal.BitVector.split# |
| 39 |
kind: Expression |
| 40 |
type: |- |
| 41 |
split# :: KnownNat n -- ARG[0] |
| 42 |
=> BitVector (m + n) -- ARG[1] |
| 43 |
-> (BitVector m, BitVector n) |
| 44 |
template: ~ARG[1] |
| 45 |
- BlackBox: |
| 46 |
name: Clash.Sized.Internal.BitVector.rotateL# |
| 47 |
kind: Declaration |
| 48 |
type: 'rotateL# :: KnownNat |
| 49 |
n => BitVector n -> Int -> BitVector n' |
| 50 |
template: |- |
| 51 |
// rotateL begin |
| 52 |
wire [2*~SIZE[~TYPO]-1:0] ~GENSYM[bv][0]; |
| 53 |
assign ~SYM[0] = {~ARG[1],~ARG[1]} << (~ARG[2] % ~SIZE[~TYPO]); |
| 54 |
assign ~RESULT = ~SYM[0][2*~SIZE[~TYPO]-1 : ~SIZE[~TYPO]]; |
| 55 |
// rotateL end |
| 56 |
- BlackBox: |
| 57 |
name: Clash.Sized.Internal.BitVector.rotateR# |
| 58 |
kind: Declaration |
| 59 |
type: 'rotateR# :: KnownNat |
| 60 |
n => BitVector n -> Int -> BitVector n' |
| 61 |
template: |- |
| 62 |
// rotateR begin |
| 63 |
wire [2*~SIZE[~TYPO]-1:0] ~GENSYM[bv][0]; |
| 64 |
assign ~SYM[0] = {~ARG[1],~ARG[1]} >> (~ARG[2] % ~SIZE[~TYPO]); |
| 65 |
assign ~RESULT = ~SYM[0][~SIZE[~TYPO]-1 : 0]; |
| 66 |
// rotateR end |