Somewhat working now?
authorMichael Nolan <mtnolan2640@gmail.com>
Wed, 13 May 2020 17:51:13 +0000 (13:51 -0400)
committerMichael Nolan <mtnolan2640@gmail.com>
Wed, 13 May 2020 17:51:13 +0000 (13:51 -0400)
src/soc/alu/test/test_pipe_caller.py
src/soc/shift_rot/main_stage.py

index bdc665745528522747df2792faee20e6884f9997..ad1ae63a9bcfb5dfc2f7e94951946cc2fb95e592 100644 (file)
@@ -144,6 +144,13 @@ class ALUTestCase(FHDLTestCase):
         initial_sprs[special_sprs['XER']] = xer
         self.run_tst_program(Program(lst), initial_regs, initial_sprs)
 
+    def test_cmp(self):
+        lst = ["cmp cr2, 1, 6, 7"]
+        initial_regs = [0] * 32
+        initial_regs[6] = random.randint(0, (1<<64)-1)
+        initial_regs[7] = random.randint(0, (1<<64)-1)
+        self.run_tst_program(Program(lst), initial_regs, {})
+
     def test_ilang(self):
         rec = CompALUOpSubset()
 
index aa2b79a59c6f1beba8dc7a94caf1d71fcb3dc9b5..e0b453b40164cb54409eb67c31831c1b870f3c9e 100644 (file)
@@ -57,6 +57,10 @@ class ShiftRotMainStage(PipeModBase):
                 comb += [rotator.right_shift.eq(1),
                         rotator.clear_left.eq(0),
                         rotator.clear_right.eq(0)]
+            with m.Case(InternalOp.OP_RLC):
+                comb += [rotator.right_shift.eq(0),
+                        rotator.clear_left.eq(1),
+                        rotator.clear_right.eq(1)]