From: Luke Kenneth Casson Leighton Date: Sat, 31 Jul 2021 12:10:22 +0000 (+0100) Subject: add iDCT modes to interim svshape instruction pseudo-code X-Git-Tag: xlen-bcd~174 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e548e29a6cee7c30cdb5e66185206599b090131d;p=openpower-isa.git add iDCT modes to interim svshape instruction pseudo-code --- diff --git a/openpower/isa/simplev.mdwn b/openpower/isa/simplev.mdwn index a48c405e..00410112 100644 --- a/openpower/isa/simplev.mdwn +++ b/openpower/isa/simplev.mdwn @@ -148,10 +148,11 @@ Pseudo-code: SVSHAPE1[28:29] <- 0b01 # j+halfstep schedule # FRC (coefficients) SVSHAPE2[28:29] <- 0b10 # k schedule - # set schedule up for DCT Inner butterfly - # SVRM Mode 2 is for pre-calculated coefficients, - # SVRM Mode 4 is for on-the-fly (Vertical-First Mode) - if (SVRM = 0b0010) | (SVRM = 0b0100) then + # set schedule up for (i)DCT Inner butterfly + # SVRM Mode 2 (Mode 6 for iDCT) is for pre-calculated coefficients, + # SVRM Mode 4 (Mode 12 for iDCT) is for on-the-fly (Vertical-First Mode) + if ((SVRM = 0b0010) | (SVRM = 0b0100) | + (SVRM = 0b1010) | (SVRM = 0b1100)) then # calculate O(N log2 N) n <- [0] * 3 do while n < 5 @@ -163,11 +164,14 @@ Pseudo-code: # 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 # DCT/FFT mode - if (SVRM = 0b0100) then - SVSHAPE0[6:11] <- 0b000011 # DCT Inner Butterfly mode 4 + if (SVRM = 0b1010) | (SVRM = 0b1100) then + SVSHAPE0[30:31] <- 0b11 # iDCT mode + else + SVSHAPE0[30:31] <- 0b01 # DCT mode + if (SVRM = 0b1100) | (SVRM = 0b0100) then + SVSHAPE0[6:11] <- 0b000011 # (i)DCT Inner Butterfly mode 4 else - SVSHAPE0[6:11] <- 0b000001 # DCT Inner Butterfly mode 2 + SVSHAPE0[6:11] <- 0b000001 # (i)DCT Inner Butterfly mode 2 SVSHAPE0[18:20] <- 0b001 # DCT Inner Butterfly sub-mode SVSHAPE0[21:23] <- 0b001 # "inverse" on outer loop # copy @@ -181,8 +185,8 @@ Pseudo-code: SVSHAPE2[28:29] <- 0b10 # ci (k for mode 4) schedule if (SVRM != 0b0100) then SVSHAPE3[28:29] <- 0b11 # size schedule - # set schedule up for DCT Outer butterfly - if (SVRM = 0b0011) then + # set schedule up for (i)DCT Outer butterfly + if (SVRM = 0b0011) | (SVRM = 0b1011) then # calculate O(N log2 N) number of outer butterfly overlapping adds vlen[0:6] <- [0] * 7 n <- 0b000 @@ -200,9 +204,13 @@ Pseudo-code: # 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 # DCT/FFT mode + if (SVRM = 0b1011) then + SVSHAPE0[30:31] <- 0b11 # iDCT mode + SVSHAPE0[18:20] <- 0b011 # iDCT Outer Butterfly sub-mode + else + SVSHAPE0[30:31] <- 0b01 # DCT mode + SVSHAPE0[18:20] <- 0b100 # DCT Outer Butterfly sub-mode SVSHAPE0[6:11] <- 0b000010 # DCT Butterfly mode - SVSHAPE0[18:20] <- 0b100 # DCT Outer Butterfly sub-mode # copy SVSHAPE1[0:31] <- SVSHAPE0[0:31] SVSHAPE2[0:31] <- SVSHAPE0[0:31]