add DCT outer butterfly svshape setup
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Fri, 23 Jul 2021 16:53:10 +0000 (17:53 +0100)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Fri, 23 Jul 2021 16:53:10 +0000 (17:53 +0100)
openpower/isa/simplev.mdwn

index 0a735cb775f21e9ac11068b260cb04f0c8aeeffe..7549a19297a9f6221671b7f174662f56a9dabbe2 100644 (file)
@@ -138,6 +138,31 @@ Pseudo-code:
         SVSHAPE1[0:31] <- SVSHAPE0[0:31]
         # for FRA and FRT
         SVSHAPE0[28:29] <- 0b01           # j+halfstep schedule
+    # set schedule up for DCT Outer butterfly
+    if (SVRM = 0b0011) then
+        # calculate O(N log2 N) number of outer butterfly overlapping adds
+        vlen[0:6] <- [0] * 7
+        n <- 0b001
+        size <- 0b0000001
+        itercount[0:6] <- (0b00 || SVxd) + 0b0000001
+        itercount[0:6] <- (0b0 || itercount[0:5])
+        do while n < 5
+           if SVxd[4-n] = 0 then
+               leave
+           n <- n + 1
+           count <- (itercount - 0b0000001) * size
+           vlen[0:6] <- vlen + count[7:13]
+           size[0:6] <- (size[1:6] || 0b0)
+           itercount[0:6] <- (0b0 || itercount[0:5])
+        # set up template in SVSHAPE0, then copy to 1-3
+        # set up FRB and FRS
+        SVSHAPE0[0:5] <- (0b0 || SVxd)   # xdim
+        SVSHAPE0[30:31] <- 0b01          # Butterfly mode
+        SVSHAPE0[18:20] <- 0b011         # DCT Outer Butterfly sub-mode
+        # copy
+        SVSHAPE1[0:31] <- SVSHAPE0[0:31]
+        # for FRA and FRT
+        SVSHAPE0[28:29] <- 0b01           # j+halfstep schedule
     # set VL, MVL and Vertical-First
     SVSTATE[0:6] <- vlen
     SVSTATE[7:13] <- vlen