fix up DCT modes for inner/outer butterfly,
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Tue, 27 Jul 2021 13:27:41 +0000 (14:27 +0100)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Tue, 27 Jul 2021 13:27:41 +0000 (14:27 +0100)
add new costables schedule and set up REMAP correctly

openpower/isa/simplev.mdwn
src/openpower/decoder/isa/svshape.py

index bdf792f2d8ae851023ccc704267de7781e736c03..6af33bb89a42ecc64e41d9ce953775fba830f1a8 100644 (file)
@@ -204,7 +204,7 @@ Pseudo-code:
         # for FRA and FRT
         SVSHAPE1[28:29] <- 0b01           # j+halfstep schedule
     # set schedule up for DCT COS table generation
-    if (SVRM = 0b0011) then
+    if (SVRM = 0b0101) then
         # calculate O(N log2 N)
         vlen[0:6] <- [0] * 7
         itercount[0:6] <- (0b00 || SVxd) + 0b0000001
index 02d312420422562f66ae0ca0d3c3fb8ddadda9f0..75b392a028bbbc511947f92e30ff34743324dbc8 100644 (file)
@@ -4,6 +4,7 @@ from openpower.decoder.isa.remapyield import iterate_indices
 from openpower.decoder.isa.remap_fft_yield import iterate_butterfly_indices
 from openpower.decoder.isa.remap_dct_yield import (
                                 iterate_dct_inner_butterfly_indices,
+                                iterate_dct_inner_costable_indices,
                                 iterate_dct_outer_butterfly_indices)
 from openpower.sv.svp64 import SVP64SHAPE
 import os
@@ -120,10 +121,12 @@ class SVSHAPE(SelectableInt):
             # further sub-selection
             if self.ydimsz == 1:
                 iterate_fn = iterate_butterfly_indices
-            elif self.ydimsz == 2:
+            elif self.ydimsz in [2, 4]:
                 iterate_fn = iterate_dct_inner_butterfly_indices
             elif self.ydimsz == 3:
                 iterate_fn = iterate_dct_outer_butterfly_indices
+            elif self.ydimsz == 3:
+                iterate_fn = iterate_dct_inner_costable_indices
         # create a **NEW** iterator each time this is called
         return iterate_fn(deepcopy(self))