add test_nop general test case
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Sun, 26 Jul 2020 13:16:15 +0000 (14:16 +0100)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Sun, 26 Jul 2020 13:16:15 +0000 (14:16 +0100)
src/soc/simulator/test_sim.py

index 30045ac6baa911b8f2de551ca314ee827bc61c2d..b506b4f75ff623a638a462ba2ac80724c9014161 100644 (file)
@@ -203,6 +203,15 @@ class GeneralTestCases(FHDLTestCase):
         with Program(lst, bigendian) as program:
             self.run_tst_program(program, [1, 2, 3, 4], initial_mem)
 
+    def test_nop(self):
+        lst = ["addi 1, 0, 0x1004",
+               "nop",
+               "addi 3, 0, 0x15eb",
+              ]
+        initial_regs = [0] * 32
+        with Program(lst, bigendian) as program:
+            self.run_tst_program(program, [1, 3])
+
     def test_loop(self):
         """in godbolt.org:
         register unsigned long i asm ("r12");