From 809f17813341f4bbf71fb9bab5f01746ef9eb857 Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Mon, 22 Feb 2021 15:59:33 +0000 Subject: [PATCH] moving PC-setting (NIA) out of execute_fsm in TestIssuer --- src/soc/simple/issuer.py | 30 ++++++++++++++++++------------ src/soc/simple/test/test_issuer.py | 12 ++++++------ 2 files changed, 24 insertions(+), 18 deletions(-) diff --git a/src/soc/simple/issuer.py b/src/soc/simple/issuer.py index e0cf39a7..f6daa834 100644 --- a/src/soc/simple/issuer.py +++ b/src/soc/simple/issuer.py @@ -244,7 +244,7 @@ class TestIssuerInternal(Elaboratable): with m.If(exec_insn_ready_i): m.next = "IDLE" - def execute_fsm(self, m, core, nia, + def execute_fsm(self, m, core, insn_done, pc_changed, cur_state, fetch_insn_o, fetch_pc_ready_o, fetch_pc_valid_i, exec_insn_valid_o, exec_insn_ready_i): @@ -268,8 +268,6 @@ class TestIssuerInternal(Elaboratable): core_issue_i = core.issue_i # instruction is issued insn_type = core.e.do.insn_type # instruction MicroOp type - pc_changed = Signal() # note write to PC - with m.FSM(): # go fetch the instruction at the current PC @@ -297,7 +295,6 @@ class TestIssuerInternal(Elaboratable): with m.State("INSN_START"): comb += core_ivalid_i.eq(1) # instruction is valid comb += core_issue_i.eq(1) # and issued - sync += pc_changed.eq(0) m.next = "INSN_ACTIVE" # move to "wait completion" @@ -308,15 +305,11 @@ class TestIssuerInternal(Elaboratable): with m.If(self.state_nia.wen & (1<