From 1963ba834a7df26451f59142cea9f5eeee8dbf44 Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Sun, 2 Jun 2019 14:24:10 +0100 Subject: [PATCH] add op is immediate to instruction q --- src/scoreboard/instruction_q.py | 1 + src/scoreboard/test_iq.py | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/scoreboard/instruction_q.py b/src/scoreboard/instruction_q.py index a2bdf8db..1f582b74 100644 --- a/src/scoreboard/instruction_q.py +++ b/src/scoreboard/instruction_q.py @@ -11,6 +11,7 @@ class Instruction(RecordObject): def __init__(self, name, wid, opwid): RecordObject.__init__(self, name=name) self.oper_i = Signal(opwid, reset_less=True) + self.opim_i = Signal(1, reset_less=True) # src2 is an immediate self.dest_i = Signal(wid, reset_less=True) self.src1_i = Signal(wid, reset_less=True) self.src2_i = Signal(wid, reset_less=True) diff --git a/src/scoreboard/test_iq.py b/src/scoreboard/test_iq.py index 06e1511e..5a059831 100644 --- a/src/scoreboard/test_iq.py +++ b/src/scoreboard/test_iq.py @@ -92,10 +92,12 @@ def mk_insns(n_insns, wid, opwid): res = [] for i in range(n_insns): op1 = randint(0, (1<