From: Luke Kenneth Casson Leighton Date: Tue, 5 Dec 2023 14:14:14 +0000 (+0000) Subject: rename pospopcount image, split into two X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b3d665654e7d7601a9c01f1020709fae6058f8e8;p=libreriscv.git rename pospopcount image, split into two --- diff --git a/openpower/sv/cookbook/1_popcount.svg b/openpower/sv/cookbook/1_popcount.svg new file mode 100644 index 000000000..69c99d14c --- /dev/null +++ b/openpower/sv/cookbook/1_popcount.svg @@ -0,0 +1,4 @@ + + + +
RESULT 1
RESULT 1
RESULT 2
RESULT 2
RESULT 3
RESULT 3
RESULT n
RESULT n
ARRAY POPCOUNT
ARRAY POPCOUNT
POSITIONAL POPCOUNT
POSITIONAL POPCOUNT
RESULT 1
RESULT 1
RESULT 2
RESULT 2
RESULT n
RESULT n
Text is not SVG - cannot display
\ No newline at end of file diff --git a/openpower/sv/cookbook/2_popcount.svg b/openpower/sv/cookbook/2_popcount.svg new file mode 100644 index 000000000..69c99d14c --- /dev/null +++ b/openpower/sv/cookbook/2_popcount.svg @@ -0,0 +1,4 @@ + + + +
RESULT 1
RESULT 1
RESULT 2
RESULT 2
RESULT 3
RESULT 3
RESULT n
RESULT n
ARRAY POPCOUNT
ARRAY POPCOUNT
POSITIONAL POPCOUNT
POSITIONAL POPCOUNT
RESULT 1
RESULT 1
RESULT 2
RESULT 2
RESULT n
RESULT n
Text is not SVG - cannot display
\ No newline at end of file diff --git a/openpower/sv/cookbook/popcount.svg b/openpower/sv/cookbook/popcount.svg deleted file mode 100644 index 69c99d14c..000000000 --- a/openpower/sv/cookbook/popcount.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - -
RESULT 1
RESULT 1
RESULT 2
RESULT 2
RESULT 3
RESULT 3
RESULT n
RESULT n
ARRAY POPCOUNT
ARRAY POPCOUNT
POSITIONAL POPCOUNT
POSITIONAL POPCOUNT
RESULT 1
RESULT 1
RESULT 2
RESULT 2
RESULT n
RESULT n
Text is not SVG - cannot display
\ No newline at end of file diff --git a/openpower/sv/cookbook/pospopcnt.mdwn b/openpower/sv/cookbook/pospopcnt.mdwn index 22ca3077e..2c9b6533b 100644 --- a/openpower/sv/cookbook/pospopcnt.mdwn +++ b/openpower/sv/cookbook/pospopcnt.mdwn @@ -42,9 +42,16 @@ sv.add *16,*16,*24 # and accumulate in results 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 whereas positional popcount adds up the totals of each bit set to 1 in each bit-position, of an array of input values. +Array popcount is just standard popcount function +([[!wikipedia Hamming weight]]) on an array of values, horizontally, +however positional popcount is different (vertical) -pospopcnt +pospopcnt + +Positional popcount adds up the totals of each bit set to 1 in each +bit-position, of an array of input values. + +pospopcnt [[!tag svp64_cookbook ]]