testcase for addis
authorTobias Platen <tplaten@posteo.de>
Mon, 20 Apr 2020 15:04:33 +0000 (17:04 +0200)
committerTobias Platen <tplaten@posteo.de>
Mon, 20 Apr 2020 15:04:33 +0000 (17:04 +0200)
src/soc/simulator/test_sim.py

index c170397e27fdde64cc62341e477cd4fe32c22101..f356dd768105c98f56814581b09956a9e17b9928 100644 (file)
@@ -108,6 +108,13 @@ class DecoderTestCase(FHDLTestCase):
         with Program(lst) as program:
             self.run_tst_program(program, [1, 2, 3])
 
+    def test_addis(self):
+        lst = ["addi 1, 0, 0x0FFF",
+               "addis 1, 1, 0x0F"
+               ]
+        with Program(lst) as program:
+            self.run_tst_program(program, [1])
+
     def run_tst_program(self, prog, reglist):
         simulator = InternalOpSimulator()
         self.run_tst(prog, simulator)