From b6a45579add1491f23a06ca5437c5e5e5989e75e Mon Sep 17 00:00:00 2001 From: Jacob Lifshay Date: Fri, 28 Apr 2023 01:49:30 -0700 Subject: [PATCH] prefix-sum remap works! --- openpower/isa/simplev.mdwn | 56 +++++++++++++------ .../test_caller_svp64_parallel_prefix_sum.py | 23 ++++++++ src/openpower/test/svp64/__init__.py | 0 .../test/svp64/parallel_prefix_sum.py | 53 ++++++++++++++++++ 4 files changed, 114 insertions(+), 18 deletions(-) create mode 100644 src/openpower/decoder/isa/test_caller_svp64_parallel_prefix_sum.py create mode 100644 src/openpower/test/svp64/__init__.py create mode 100644 src/openpower/test/svp64/parallel_prefix_sum.py diff --git a/openpower/isa/simplev.mdwn b/openpower/isa/simplev.mdwn index fae79b4c..33a02e66 100644 --- a/openpower/isa/simplev.mdwn +++ b/openpower/isa/simplev.mdwn @@ -278,22 +278,45 @@ Pseudo-code: else SVSHAPE0[30:31] <- 0b11 # DCT mode SVSHAPE0[6:11] <- 0b000101 # DCT "half-swap" mode - # set schedule up for parallel reduction + # set schedule up for parallel reduction or prefix-sum if (SVrm = 0b0111) then + # is scan/prefix-sum + is_scan <- SVyd = 2 # calculate the total number of operations (brute-force) vlen[0:6] <- [0] * 7 itercount[0:6] <- (0b00 || SVxd) + 0b0000001 - step[0:6] <- 0b0000001 - i[0:6] <- 0b0000000 - do while step