From 6a8960189546bef1887422964049b97d0dc15d98 Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Tue, 4 Aug 2020 16:04:43 +0100 Subject: [PATCH] allow instruction to run if initiated whilst "stopped" requested --- src/soc/simple/core.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/soc/simple/core.py b/src/soc/simple/core.py index 3b195d24..fb341b10 100644 --- a/src/soc/simple/core.py +++ b/src/soc/simple/core.py @@ -129,9 +129,6 @@ class NonProductionCore(Elaboratable): fu_bitdict = {} for i, funame in enumerate(fus.keys()): fu_bitdict[funame] = fu_enable[i] - # only run when allowed and when instruction is valid - can_run = Signal(reset_less=True) - comb += can_run.eq(self.ivalid_i & ~self.core_stopped_i) # enable the required Function Unit based on the opcode decode # note: this *only* works correctly for simple core when one and @@ -148,7 +145,7 @@ class NonProductionCore(Elaboratable): sync += counter.eq(counter - 1) comb += self.busy_o.eq(1) - with m.If(can_run): + with m.If(self.ivalid_i): # run only when valid with m.Switch(dec2.e.do.insn_type): # check for ATTN: halt if true with m.Case(MicrOp.OP_ATTN): -- 2.30.2