From 04881326285fae4f05a8fe02b56db382f9230eae Mon Sep 17 00:00:00 2001 From: lkcl Date: Mon, 16 May 2022 11:55:51 +0100 Subject: [PATCH] --- openpower/sv/bitmanip.mdwn | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) 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 -- 2.30.2