Fix broken test_ba
authorMichael Nolan <mtnolan2640@gmail.com>
Fri, 15 May 2020 18:25:17 +0000 (14:25 -0400)
committerMichael Nolan <mtnolan2640@gmail.com>
Fri, 15 May 2020 18:25:17 +0000 (14:25 -0400)
src/soc/branch/test/test_pipe_caller.py

index 4f68c56b8682b5a58f06ddfe71e7d0d662f6db7e..e55a3fbf13034f247d115309a4780a4fb5e43409 100644 (file)
@@ -121,7 +121,7 @@ class TestRunner(FHDLTestCase):
                 instructions = list(zip(gen, program.assembly.splitlines()))
 
                 index = (simulator.pc.CIA.value - initial_cia)//4
-                while index < len(instructions):
+                while index < len(instructions) and index >= 0:
                     print(index)
                     ins, code = instructions[index]