projects
/
libreriscv.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1827643
)
(no commit message)
author
lkcl
<lkcl@web>
Fri, 11 Mar 2022 23:32:18 +0000
(23:32 +0000)
committer
IkiWiki
<ikiwiki.info>
Fri, 11 Mar 2022 23:32:18 +0000
(23:32 +0000)
openpower/sv/bitmanip.mdwn
patch
|
blob
|
history
diff --git
a/openpower/sv/bitmanip.mdwn
b/openpower/sv/bitmanip.mdwn
index d5d75ef257cb1caed4453d6e0b53ea976ad00d21..ab84650132fe600e462f27c94c57a1b6061a3ead 100644
(file)
--- a/
openpower/sv/bitmanip.mdwn
+++ b/
openpower/sv/bitmanip.mdwn
@@
-207,8
+207,9
@@
a 4 operand variant which becomes more along the lines of an FPGA:
| NN | RT | RA | RB | RC | mode 01 |1 |
for i in range(64):
- idx = RT[i] << 2 | RA[i] << 1 | RB[i]
- RT[i] = (RC & (1<<idx)) != 0
+ j = (i//8)*8 # 0,8,16,24,..,56
+ lookup = RC[j:j+8]
+ RT[i] = lut3(lookup, RT[i], RA[i], RB[i])
mode (3 bit) may be used to do inversion of ordering, similar to carryless mul,
3 modes.