add crxor unit test to qemu
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Tue, 25 Aug 2020 10:52:24 +0000 (11:52 +0100)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Tue, 25 Aug 2020 10:56:43 +0000 (11:56 +0100)
src/soc/simulator/test_sim.py

index 680605b0c6a54a892874e779e2128930b2601a2a..522559b938d49140ec4e45a7808c2305652f155a 100644 (file)
@@ -244,6 +244,22 @@ class GeneralTestCases(FHDLTestCase):
         with Program(lst, bigendian) as program:
             self.run_tst_program(program, [1])
 
+    def test_crxor(self):
+        lst = ["addi 1, 0, 0x1004",
+               "addi 2, 0, 0x1008",
+               "addi 3, 0, 0x01ee",
+               "mtcrf 0b1111111, 3",
+               "crnand 3, 30, 4",
+               "mfcr 3",
+               ]
+        initial_regs = [0] * 32
+        initial_regs[1] = 0x1004
+        initial_regs[2] = 0x1008
+        initial_regs[3] = 0x01ee
+        with Program(lst, bigendian) as program:
+            self.run_tst_program(program, [3, 4])
+
+    @unittest.skip("disable")
     def test_isel_1(self):
         lst = ["addi 1, 0, 0x1004",
                "addi 2, 0, 0x1008",
@@ -258,6 +274,7 @@ class GeneralTestCases(FHDLTestCase):
         with Program(lst, bigendian) as program:
             self.run_tst_program(program, [3, 4])
 
+    @unittest.skip("disable")
     def test_isel_2(self):
         lst = ["addi 1, 0, 0x1004",
                "addi 2, 0, 0x1008",