# for cos coefficient
SVSHAPE1[28:29] <- 0b10 # ci schedule
SVSHAPE2[28:29] <- 0b11 # size schedule
+ # set schedule up for DCT inverse of half-swapped ordering
+ if (SVRM = 0b0110) then
+ vlen[0:6] <- (0b00 || SVxd)
+ # set up template in SVSHAPE0
+ SVSHAPE0[0:5] <- (0b0 || SVxd) # xdim
+ SVSHAPE0[30:31] <- 0b01 # DCT/FFT mode
+ SVSHAPE0[6:11] <- 0b000101 # DCT "half-swap" mode
# set VL, MVL and Vertical-First
SVSTATE[0:6] <- vlen
SVSTATE[7:13] <- vlen
return res
+# python "yield" can be iterated. use this to make it clear how
+# the indices are generated by using natural-looking nested loops
+def iterate_dct_inner_halfswap_loadstore(SVSHAPE):
+ # get indices to iterate over, in the required order
+ n = SVSHAPE.lims[0]
+ mode = SVSHAPE.lims[1]
+ print ("inner halfswap loadstore", n, mode, SVSHAPE.skip)
+
+ # reference list for not needing to do data-swaps, just swap what
+ # *indices* are referenced (two levels of indirection at the moment)
+ # pre-reverse the data-swap list so that it *ends up* in the order 0123..
+ ji = list(range(n))
+ ji = halfrev2(ji, True)
+
+ # invert order if requested
+ if SVSHAPE.invxyz[0]:
+ ji.reverse()
+
+ yield from ji
+
+
# python "yield" can be iterated. use this to make it clear how
# the indices are generated by using natural-looking nested loops
def iterate_dct_inner_costable_indices(SVSHAPE):
from openpower.decoder.isa.remap_dct_yield import (
iterate_dct_inner_butterfly_indices,
iterate_dct_inner_costable_indices,
- iterate_dct_outer_butterfly_indices)
+ iterate_dct_outer_butterfly_indices,
+ iterate_dct_inner_halfswap_loadstore)
from openpower.sv.svp64 import SVP64SHAPE
import os
from copy import deepcopy
iterate_fn = iterate_dct_outer_butterfly_indices
elif self.ydimsz == 5:
iterate_fn = iterate_dct_inner_costable_indices
+ elif self.ydimsz == 6:
+ iterate_fn = iterate_dct_inner_halfswap_loadstore
# create a **NEW** iterator each time this is called
return iterate_fn(deepcopy(self))