From: Luke Kenneth Casson Leighton Date: Fri, 26 Feb 2021 13:34:59 +0000 (+0000) Subject: move fetch_insn_o into issue_fsm TestIssuer X-Git-Tag: convert-csv-opcode-to-binary~155 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=245a9bbf3e3ed0e63251704614b059d91ac3cc97;p=soc.git move fetch_insn_o into issue_fsm TestIssuer --- diff --git a/src/soc/simple/issuer.py b/src/soc/simple/issuer.py index f77788ec..6d1bcf7d 100644 --- a/src/soc/simple/issuer.py +++ b/src/soc/simple/issuer.py @@ -149,8 +149,7 @@ class TestIssuerInternal(Elaboratable): def fetch_fsm(self, m, core, dbg, pc, pc_changed, sv_changed, insn_done, core_rst, cur_state, fetch_pc_ready_o, fetch_pc_valid_i, - fetch_insn_valid_o, fetch_insn_ready_i, - fetch_insn_o): + fetch_insn_valid_o, fetch_insn_ready_i): """fetch FSM this FSM performs fetch of raw instruction data, partial-decodes it 32-bit at a time to detect SVP64 prefixes, and will optionally @@ -161,6 +160,11 @@ class TestIssuerInternal(Elaboratable): pdecode2 = self.pdecode2 svp64 = self.svp64 + # latches copy of raw fetched instruction + fetch_insn_o = Signal(32, reset_less=True) + dec_opcode_i = pdecode2.dec.raw_opcode_in # raw opcode + sync += dec_opcode_i.eq(fetch_insn_o) # actual opcode + msr_read = Signal(reset=1) sv_read = Signal(reset=1) @@ -222,7 +226,7 @@ class TestIssuerInternal(Elaboratable): with m.If(~svp64.is_svp64_mode): # with no prefix, store the instruction # and hand it directly to the next FSM - sync += fetch_insn_o.eq(insn) + comb += fetch_insn_o.eq(insn) m.next = "INSN_READY" with m.Else(): # fetch the rest of the instruction from memory @@ -239,7 +243,7 @@ class TestIssuerInternal(Elaboratable): with m.Else(): # not busy: instruction fetched insn = get_insn(self.imem.f_instr_o, cur_state.pc+4) - sync += fetch_insn_o.eq(insn) + comb += fetch_insn_o.eq(insn) m.next = "INSN_READY" with m.State("INSN_READY"): @@ -259,7 +263,7 @@ class TestIssuerInternal(Elaboratable): comb += self.state_w_pc.wen.eq(1<