projects
/
libreriscv.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
b3d79f8
)
(no commit message)
author
shriya
<shriya@web>
Wed, 6 Dec 2023 14:46:07 +0000
(14:46 +0000)
committer
IkiWiki
<ikiwiki.info>
Wed, 6 Dec 2023 14:46:07 +0000
(14:46 +0000)
openpower/sv/cookbook/pospopcnt.mdwn
patch
|
blob
|
history
diff --git
a/openpower/sv/cookbook/pospopcnt.mdwn
b/openpower/sv/cookbook/pospopcnt.mdwn
index 1607d618b167b5fca1254b2838689194db7b8d81..cec72685f7a70a18fd5afcc84e17f722c9febf5e 100644
(file)
--- a/
openpower/sv/cookbook/pospopcnt.mdwn
+++ b/
openpower/sv/cookbook/pospopcnt.mdwn
@@
-42,14
+42,6
@@
sv.add *16,*16,*24 # and accumulate in results
sv.bc/all 16, *0, -0x28 # reduce CTR by VL and stop if -ve
```
sv.bc/all 16, *0, -0x28 # reduce CTR by VL and stop if -ve
```
-Array popcount is just standard popcount function
-([[!wikipedia Hamming weight]]) on an array of values, horizontally,
-however positional popcount is different (vertical)
-
-
-
-Positional popcount adds up the totals of each bit set to 1 in each
-bit-position, of an array of input values.
<img src="/openpower/sv/cookbook/ArrayPopcnt.drawio.svg"
<img src="/openpower/sv/cookbook/ArrayPopcnt.drawio.svg"
@@
-60,9
+52,22
@@
bit-position, of an array of input values.
<img src="/openpower/sv/cookbook/PositionalPopcnt.drawio.svg"
alt="pospopcnt" width="60%" />
<img src="/openpower/sv/cookbook/PositionalPopcnt.drawio.svg"
alt="pospopcnt" width="60%" />
+
+
+Array popcount is just standard popcount function
+([[!wikipedia Hamming weight]]) on an array of values, horizontally,
+however positional popcount is different (vertical). Refer to Fig.1
+
+
+
+Positional popcount adds up the totals of each bit set to 1 in each
+bit-position, of an array of input values. Refer to Fig.2
+
<br />
<br />
+# Visual representation of the pospopcount algorithm
+
<img src="/openpower/sv/cookbook/BlockDivision.drawio.svg"
alt="pospopcnt" width="70%" />
<img src="/openpower/sv/cookbook/BlockDivision.drawio.svg"
alt="pospopcnt" width="70%" />
@@
-79,7
+84,6
@@
bit-position, of an array of input values.
alt="pospopcnt" width="100%" />
alt="pospopcnt" width="100%" />
-# Visual representation of the pospopcount algorithm
# Walkthrough of the assembler
# Walkthrough of the assembler