redo SVP64 RM Decode to new CTR-Test Mode (svstep not included)
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Sat, 4 Sep 2021 12:24:55 +0000 (13:24 +0100)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Sat, 4 Sep 2021 12:24:55 +0000 (13:24 +0100)
src/openpower/consts.py
src/openpower/decoder/power_enums.py
src/openpower/decoder/power_svp64_rm.py

index 934b4389b1b2279dc612f4ab04c93dfc080eb631..42788d5f35229326221eb38e61f52bc3d89bcbc2 100644 (file)
@@ -230,7 +230,7 @@ class SVP64MODEb:
     BC_SNZ = 3  # for branch-conditional mode
     BC_VLI = 2  # for VL include/exclude on VLSET mode
     BC_VLSET = 1 # VLSET mode
-    BC_SVSTEP = 0 # svstep mode
+    BC_CTRTEST = 0 # CTR-test mode
     # reduce mode
     REDUCE = 2  # 0=normal predication 1=reduce mode
     PARALLEL = 3 # 1=parallel reduce, 0=scalar reduce
index eee86b949e7d18675b798caf6289f2152761223e..db85439691c5821780f8e31fa2e0a0c2bad9639a 100644 (file)
@@ -210,11 +210,10 @@ class SVP64BCGate(Enum):
     ALL = 1
 
 
-@unique
-class SVP64BCStep(Enum):
+class SVP64BCCTRMode(Enum):
     NONE = 0
-    STEP = 1
-    STEP_RC = 2
+    TEST = 1
+    TEST_INV = 2
 
 
 @unique
index 81527ad5a84b285856a5a11237d443881b94c69d..02c459bc7c1b3d5ea2ed983270a7edb6be43095c 100644 (file)
@@ -20,7 +20,7 @@ from nmigen import Elaboratable, Module, Signal, Const
 from openpower.decoder.power_enums import (SVP64RMMode, Function, SVPtype,
                                     SVP64PredMode, SVP64sat, SVP64LDSTmode,
                                     SVP64BCPredMode, SVP64BCVLSETMode,
-                                    SVP64BCGate, SVP64BCStep,
+                                    SVP64BCGate, SVP64BCCTRMode,
                                     )
 from openpower.consts import EXTRA3, SVP64MODE
 from openpower.sv.svp64 import SVP64Rec
@@ -105,7 +105,7 @@ class SVP64RMModeDecode(Elaboratable):
 
         # Branch Conditional Modes
         self.bc_vlset = Signal(SVP64BCVLSETMode) # Branch-Conditional VLSET
-        self.bc_step = Signal(SVP64BCStep)   # Branch-Conditional svstep mode
+        self.bc_ctrtest = Signal(SVP64BCCTRMode) # Branch-Conditional CTR-Test
         self.bc_pred = Signal(SVP64BCPredMode) # BC predicate mode
         self.bc_vsb = Signal()                 # BC VLSET-branch (like BO[1])
         self.bc_gate = Signal(SVP64BCGate)     # BC ALL or ANY gate
@@ -141,12 +141,12 @@ class SVP64RMModeDecode(Elaboratable):
 
         with m.If(is_bc):
             # Branch-Conditional is completely different
-            # svstep mode
-            with m.If(mode[SVP64MODE.BC_SVSTEP]):
+            # Counter-Test Mode.
+            with m.If(mode[SVP64MODE.BC_CTRTEST]):
                 with m.If(self.rm_in.ewsrc[0]):
-                    comb += self.bc_step.eq(SVP64BCStep.STEP_RC)
+                    comb += self.bc_ctrtest.eq(SVP64BCCTRMode.TEST_INV)
                 with m.Else():
-                    comb += self.bc_step.eq(SVP64BCStep.STEP)
+                    comb += self.bc_ctrtest.eq(SVP64BCCTRMode.TEST)
             # VLSET mode
             with m.If(mode[SVP64MODE.BC_VLSET]):
                 with m.If(mode[SVP64MODE.BC_VLI]):