From: lkcl Date: Sun, 15 May 2022 23:49:29 +0000 (+0100) Subject: (no commit message) X-Git-Tag: opf_rfc_ls005_v1~2209 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b1c036f5125e2944e355c399e375b1faaa61b9dd;p=libreriscv.git --- diff --git a/openpower/sv/bitmanip.mdwn b/openpower/sv/bitmanip.mdwn index f7f4a37bd..32f6c2dca 100644 --- a/openpower/sv/bitmanip.mdwn +++ b/openpower/sv/bitmanip.mdwn @@ -96,7 +96,8 @@ TODO: convert all instructions to use RT and not RS | -- | -- | --- | --- | ----- | -------- |--| ------ | -------- | | NN | RT | RA |itype/| im0-4 | im5-7 00 |0 | xpermi | | | NN | RT | RA | RB | RC | nh 00 00 |1 | binlut | | -| NN | | | | | - 01 00 |1 | rsvd | | +| NN | RT | RA | RB | BFC// | 0 01 00 |1 | bincrlut | | +| NN | | | | | 1 01 00 |1 | rsvd | | | NN | | | | | - 10 00 |1 | rsvd | | | NN | | | | | 0 11 00 |1 | svshape | | | NN | | | | | 1 11 00 |1 | svstep | | @@ -185,9 +186,12 @@ Binary lookup is a dynamic LUT2 version of ternlogi. Firstly, the lookup table is 4 bits wide not 8 bits, and secondly the lookup table comes from a register not an immediate. -| 0.5|6.10|11.15|16.20| 21..25|26..30|31| -| -- | -- | --- | --- | ----- | ---- |--| -| NN | RT | RA | RB | RC |00011 |nh| +| 0.5|6.10|11.15|16.20| 21..25|26..30 |31| +| -- | -- | --- | --- | ----- |------ |--| +| NN | RT | RA | RB | RC |nh 0000|1 | +| NN | RT | RA | RB | BFA// |0 0100|1 | + +For binlut: lut2(imm, a, b): idx = b << 1 | a @@ -197,6 +201,11 @@ table comes from a register not an immediate. for i in range(64): RT[i] = lut2(imm, RB[i], RA[i]) +For bincrlut, `BFA` selects the 4-bit CR Field as the LUT2: + + for i in range(64): + RT[i] = lut2(CR{BFA}, RB[i], RA[i]) + *Programmer's note: a dynamic ternary lookup may be synthesised from a pair of `binlut` instructions followed by a `ternlogi` to select which to merge. Use `nh` to select which nibble to use as the lookup table