reallocate opcodes for ffadds (converted to X-FORM) and fdmadds to make space for...
authorJacob Lifshay <programmerjake@gmail.com>
Sun, 4 Sep 2022 07:53:30 +0000 (00:53 -0700)
committerJacob Lifshay <programmerjake@gmail.com>
Sun, 4 Sep 2022 07:53:30 +0000 (00:53 -0700)
openpower/isatables/RM-1P-2S1D.csv
openpower/isatables/minor_59.csv
src/openpower/decoder/isa/caller.py
src/openpower/decoder/power_decoder2.py
src/openpower/sv/trans/svp64.py

index 0e155d5e62a24cadba190fa84989df6b555df6a9..dc265695955250339c078082f951a77fbc13f639 100644 (file)
@@ -91,11 +91,11 @@ divdo,NORMAL,,1P,EXTRA3,d:RT;d:CR0,s:RA,s:RB,0,RA,RB,0,RT,0,CR0,0
 divwo,NORMAL,,1P,EXTRA3,d:RT;d:CR0,s:RA,s:RB,0,RA,RB,0,RT,0,CR0,0
 grev,NORMAL,,1P,EXTRA3,d:RT;d:CR0,s:RA,s:RB,0,RA,RB,0,RT,0,CR0,0
 grevw,NORMAL,,1P,EXTRA3,d:RT;d:CR0,s:RA,s:RB,0,RA,RB,0,RT,0,CR0,0
-ffadds,NORMAL,,1P,EXTRA3,d:FRT;d:CR1,s:FRA,s:FRB,0,FRA,FRB,0,FRT,0,CR1,0
 fdivs,NORMAL,,1P,EXTRA3,d:FRT;d:CR1,s:FRA,s:FRB,0,FRA,FRB,0,FRT,0,CR1,0
 fsubs,NORMAL,,1P,EXTRA3,d:FRT;d:CR1,s:FRA,s:FRB,0,FRA,FRB,0,FRT,0,CR1,0
 fadds,NORMAL,,1P,EXTRA3,d:FRT;d:CR1,s:FRA,s:FRB,0,FRA,FRB,0,FRT,0,CR1,0
 fmuls,NORMAL,,1P,EXTRA3,d:FRT;d:CR1,s:FRA,s:FRC,0,FRA,0,FRC,FRT,0,CR1,0
+ffadds,NORMAL,,1P,EXTRA3,d:FRT;d:CR1,s:FRA,s:FRB,0,FRA,FRB,0,FRT,0,CR1,0
 fdiv,NORMAL,,1P,EXTRA3,d:FRT;d:CR1,s:FRA,s:FRB,0,FRA,FRB,0,FRT,0,CR1,0
 fsub,NORMAL,,1P,EXTRA3,d:FRT;d:CR1,s:FRA,s:FRB,0,FRA,FRB,0,FRT,0,CR1,0
 fadd,NORMAL,,1P,EXTRA3,d:FRT;d:CR1,s:FRA,s:FRB,0,FRA,FRB,0,FRT,0,CR1,0
index 0f0cb8d6d52b1d6585c7d59bb6f855d774a34e43..25214b44ce74839c20a2224eaea0762937cd567e 100644 (file)
@@ -18,7 +18,7 @@ opcode,unit,internal op,in1,in2,in3,out,CR in,CR out,inv A,inv out,cry in,cry ou
 -----00101,FPU,OP_FP_MADD,FRA,FRB,FRC,FRT,NONE,CR1,0,0,ZERO,0,NONE,0,0,0,0,1,0,RC_ONLY,0,0,ffmadds,A,,1,unofficial until submitted and approved/renumbered by the opf isa wg
 -----00110,FPU,OP_FP_MADD,FRA,FRB,FRC,FRT,NONE,CR1,0,0,ZERO,0,NONE,0,0,0,0,1,0,RC_ONLY,0,0,ffnmsubs,A,,1,unofficial until submitted and approved/renumbered by the opf isa wg
 -----00111,FPU,OP_FP_MADD,FRA,FRB,FRC,FRT,NONE,CR1,0,0,ZERO,0,NONE,0,0,0,0,1,0,RC_ONLY,0,0,ffnmadds,A,,1,unofficial until submitted and approved/renumbered by the opf isa wg
------01101,FPU,OP_FPOP,FRA,FRB,NONE,FRT,NONE,CR1,0,0,ZERO,0,NONE,0,0,0,0,1,0,RC_ONLY,0,0,ffadds,A,,1,unofficial until submitted and approved/renumbered by the opf isa wg
------01111,FPU,OP_FP_MADD,FRA,FRB,FRC,FRT,NONE,CR1,0,0,ZERO,0,NONE,0,0,0,0,1,0,RC_ONLY,0,0,fdmadds,A,,1,unofficial until submitted and approved/renumbered by the opf isa wg
+1000001100,FPU,OP_FPOP,FRA,FRB,NONE,FRT,NONE,CR1,0,0,ZERO,0,NONE,0,0,0,0,1,0,RC_ONLY,0,0,ffadds,X,,1,unofficial until submitted and approved/renumbered by the opf isa wg
+-----11011,FPU,OP_FP_MADD,FRA,FRB,FRC,FRT,NONE,CR1,0,0,ZERO,0,NONE,0,0,0,0,1,0,RC_ONLY,0,0,fdmadds,A,,1,unofficial until submitted and approved/renumbered by the opf isa wg
 1000001110,FPU,OP_FPOP,NONE,FRB,NONE,FRT,NONE,CR1,0,0,ZERO,0,NONE,0,0,0,0,1,0,RC_ONLY,0,0,fsins,X,,1,unofficial until submitted and approved/renumbered by the opf isa wg
 1000101110,FPU,OP_FPOP,NONE,FRB,NONE,FRT,NONE,CR1,0,0,ZERO,0,NONE,0,0,0,0,1,0,RC_ONLY,0,0,fcoss,X,,1,unofficial until submitted and approved/renumbered by the opf isa wg
index 2d8defab90cfcc6ddfc488448a48cef90fc4a7b1..7eb265e430e22eace277718ecd45076fd77441a1 100644 (file)
@@ -14,7 +14,7 @@ related bugs:
 """
 
 import re
-from nmigen.sim import Settle
+from nmigen.sim import Settle, Delay
 from functools import wraps
 from copy import copy, deepcopy
 from openpower.decoder.orderedset import OrderedSet
@@ -1686,6 +1686,7 @@ class ISACaller(ISACallerHelper, ISAFPHelpers):
         it is purely for skipping masked-out bits
         """
         # get SVSTATE VL (oh and print out some debug stuff)
+        # yield Delay(1e-10)  # make changes visible
         vl = self.svstate.vl
         subvl = yield self.dec2.rm_dec.rm_in.subvl
         srcstep = self.svstate.srcstep
index 9312e7904908fcc89c323dbfd5c780a9eaac2fc5..d6b1815a913beaa741453ec3ed32569a7a0cd15c 100644 (file)
@@ -1026,12 +1026,16 @@ class PowerDecodeSubset(Elaboratable):
             # likely with a sub-decoder.
             major = Signal(6)
             comb += major.eq(self.dec.opcode_in[26:32])
-            xo5 = Signal(1)  # 1 bit from Minor 59 XO field == 0b0XXXX
-            comb += xo5.eq(self.dec.opcode_in[5])
-            xo = Signal(5)  # 5 bits from Minor 59 fcfids == 0b01110
-            comb += xo.eq(self.dec.opcode_in[1:6])
-            comb += self.use_svp64_fft.eq((major == 59) & (xo5 == 0b0) &
-                                          (xo != 0b01110))
+            xo = Signal(10)
+            comb += xo.eq(self.dec.opcode_in[1:11])
+            comb += self.use_svp64_fft.eq((major == 59) & xo.matches(
+                '-----00100',  # ffmsubs
+                '-----00101',  # ffmadds
+                '-----00110',  # ffnmsubs
+                '-----00111',  # ffnmadds
+                '1000001100',  # ffadds
+                '-----11011',  # fdmadds
+            ))
 
         # decoded/selected instruction flags
         comb += self.do_copy("data_len", self.op_get("ldst_len"))
index e094392e5560774edd1e5a7969203a10ad5bccae..7d32cf7cdec69c61e970512885d60a72c8b9905b 100644 (file)
@@ -1375,7 +1375,7 @@ class SVP64Asm:
             opcode |= int(v30b_newfields[1]) << (32-16)  # FRA
             opcode |= int(v30b_newfields[2]) << (32-21)  # FRB
             opcode |= int(v30b_newfields[3]) << (32-26)  # FRC
-            opcode |= 0b01111 << (32-31)   # bits 26-30
+            opcode |= 0b11011 << (32-31)   # bits 26-30
             if rc:
                 opcode |= 1  # Rc, bit 31.
             yield ".long 0x%x" % opcode
@@ -1385,7 +1385,7 @@ class SVP64Asm:
             opcode |= int(v30b_newfields[0]) << (32-11)  # FRT
             opcode |= int(v30b_newfields[1]) << (32-16)  # FRA
             opcode |= int(v30b_newfields[2]) << (32-21)  # FRB
-            opcode |= 0b01101 << (32-31)   # bits 26-30
+            opcode |= 0b1000001100 << (32-31)   # bits 21-30
             if rc:
                 opcode |= 1  # Rc, bit 31.
             yield ".long 0x%x" % opcode