(no commit message)
[libreriscv.git] / openpower / sv / twin_butterfly.mdwn
index 9933380e2c2ffd1019a0c3dbabef5d612d7877d9..3bd36d897ffc18685d9c606856bec608c3a07a20 100644 (file)
@@ -1,10 +1,15 @@
+# Introduction
+
+<!-- hide -->
 * <https://bugs.libre-soc.org/show_bug.cgi?id=1074>
 * <https://libre-soc.org/openpower/sv/biginteger/> for format and
   information about implicit RS/FRS
 * <https://git.libre-soc.org/?p=openpower-isa.git;a=blob;f=src/openpower/decoder/isa/test_caller_svp64_dct.py;hb=HEAD>
 * [[openpower/isa/svfparith]]
+* [[openpower/isa/svfixedarith]]
+<!-- show -->
 
-# [DRAFT] Twin Butterfly DCT Instruction(s)
+# Twin Butterfly Integer DCT Instruction(s)
 
 The goal is to implement instructions that calculate the expression:
 
@@ -32,7 +37,7 @@ Arm includes special instructions to optimize these operations, although they ar
 The suggestion is to have a single instruction to calculate both values `((a + b) * c) >> N`, and `((a - b) * c) >> N`.
 The instruction will run in accumulate mode, so in order to calculate the 2-coeff version one would just have to call the same instruction with different order a, b and a different constant c.
 
-# [DRAFT] Integer Butterfly Multiply Add/Sub FFT/DCT
+## [DRAFT] Integer Butterfly Multiply Add/Sub FFT/DCT
 
 A-Form
 
@@ -70,7 +75,6 @@ Where we have added this variant in A-Form (defined in fields.txt):
 ```
 # # 1.6.17 A-FORM
     |0     |6     |11      |16     |21      |26    |31 |
-    ...
     | PO   |  RT  |   RA   |   RB  |   SH   |   XO |Rc |
 
 ```
@@ -82,13 +86,15 @@ The instruction has been added to `minor_22.csv`:
 ```
 
 
-# [DRAFT] Floating Twin Multiply-Add DCT [Single]
+# Twin Butterfly Integer DCT Instruction(s)
+
+## [DRAFT] Floating Twin Multiply-Add DCT [Single]
 
-DCT-Form
+X-Form
 
 ```
-    |0     |6     |11      |16     |21      |26    |31 |
-    | PO   |  FRT |   FRA  |   FRB |   //   |   XO |Rc |
+    |0     |6     |11      |16     |21      |31 |
+    | PO   |  FRT |  FRA   |  FRB  |   XO   | Rc|
 ```
 
 * fdmadds FRT,FRA,FRB (Rc=0)
@@ -111,9 +117,14 @@ Special Registers Altered:
     CR1          (if Rc=1)
 ```
 
-# [DRAFT] Floating Multiply-Add FFT [Single]
+## [DRAFT] Floating Multiply-Add FFT [Single]
 
-A-Form
+X-Form
+
+```
+    |0     |6     |11      |16     |21      |31 |
+    | PO   |  FRT |  FRA   |  FRB  |   XO   | Rc|
+```
 
 * ffmadds FRT,FRA,FRB (Rc=0)
 * ffmadds. FRT,FRA,FRB (Rc=1)
@@ -121,9 +132,8 @@ A-Form
 Pseudo-code:
 
 ```
-    tmp <- FRT
-    FRT <- FPMULADD32(tmp, FRA, FRB, 1, 1)
-    FRS <- FPMULADD32(tmp, FRA, FRB, -1, 1)
+    FRS <- FPMULADD32(FRT, FRA, FRB, -1, 1)
+    FRT <- FPMULADD32(FRT, FRA, FRB, 1, 1)
 ```
 
 Special Registers Altered: