From da51e08cf95b9de02c95953f5b56f5392aeeca29 Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Wed, 29 May 2019 11:13:35 +0100 Subject: [PATCH] whoops wrong mask for branch instruction decode --- src/experiment/score6600.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/experiment/score6600.py b/src/experiment/score6600.py index 9fcdfb07..04a815c0 100644 --- a/src/experiment/score6600.py +++ b/src/experiment/score6600.py @@ -612,7 +612,7 @@ def int_instr(dut, op, src1, src2, dest, branch_success, branch_fail): yield dut.int_dest_i.eq(dest) yield dut.int_src1_i.eq(src1) yield dut.int_src2_i.eq(src2) - if (op & 0x30) != 0: # branch + if (op & (0x3<<2)) != 0: # branch yield dut.br_insn_i.eq(1) yield dut.br_oper_i.eq(Const(op & 0x3, 2)) else: @@ -808,11 +808,7 @@ def scoreboard_sim(dut, alusim): # create some instructions (some random, some regression tests) instrs = [] if True: - instrs = create_random_ops(dut, 10, True, 3) - - if False: - instrs.append( (4, 3, 5, 1, (0, 0)) ) - instrs.append( (5, 2, 3, 4, (0, 0)) ) + instrs = create_random_ops(dut, 10, True, 4) if False: instrs.append((2, 3, 3, 0, (0, 0))) -- 2.30.2