From: lkcl Date: Mon, 16 May 2022 10:55:51 +0000 (+0100) Subject: (no commit message) X-Git-Tag: opf_rfc_ls005_v1~2203 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=04881326285fae4f05a8fe02b56db382f9230eae;p=libreriscv.git --- diff --git a/openpower/sv/bitmanip.mdwn b/openpower/sv/bitmanip.mdwn index 4205e9479..e4fabde94 100644 --- a/openpower/sv/bitmanip.mdwn +++ b/openpower/sv/bitmanip.mdwn @@ -201,7 +201,7 @@ For binlut: 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]) + RT[i] = lut2(CRs{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 @@ -223,6 +223,9 @@ another mode selection would be CRs not Ints. ## crbinlog +With ternary (LUT3) dynamic instructions being very costly, +and CR Fields being only 4 bit, a binary (LUT2) variant is better + | 0.5|6.8 | 9.11|12.14|15.17|18.22|23...30 |31| | -- | -- | --- | --- | --- |-----| --------|--| | NN | BT | BA | BB | BC |m0-m2|00101110 |m3| @@ -232,6 +235,11 @@ another mode selection would be CRs not Ints. a,b = CRs[BA][i], CRs[BB][i]) if mask[i] CRs[BT][i] = lut2(CRs[BC], a, b) +*Programmer's note: just as with binlut and ternlogi, a pair + of crbinlog instructions followed by a merging crternlogi may + be deployed to synthesise dynamic ternary (LUT3) CR Field + manipulation* + # int ops ## min/m