From: Cesar Strauss Date: Fri, 26 Feb 2021 10:47:03 +0000 (-0300) Subject: Implement a decode/issue FSM between fetch and execute X-Git-Tag: convert-csv-opcode-to-binary~157 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=3f2ed63ccdeefdaa601ecedea9c663a7e446f607;p=soc.git Implement a decode/issue FSM between fetch and execute The idea is for it to: * keep looping "fetch" while VL==0 on a vector instruction. * keep looping "execute" while SRCSTEP != VL-1. * unless PC/SVSTATE was modified by "execute", in that case do go back to "fetch". * update PC and SRCSTEP accordingly. --- diff --git a/src/soc/simple/issuer.py b/src/soc/simple/issuer.py index 5ec00ca4..b15298cb 100644 --- a/src/soc/simple/issuer.py +++ b/src/soc/simple/issuer.py @@ -149,7 +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, - exec_insn_valid_o, exec_insn_ready_i, + fetch_insn_valid_o, fetch_insn_ready_i, fetch_insn_o): """fetch FSM this FSM performs fetch of raw instruction data, partial-decodes @@ -244,8 +244,8 @@ class TestIssuerInternal(Elaboratable): with m.State("INSN_READY"): # hand over the instruction, to be decoded - comb += exec_insn_valid_o.eq(1) - with m.If(exec_insn_ready_i): + comb += fetch_insn_valid_o.eq(1) + with m.If(fetch_insn_ready_i): m.next = "IDLE" # code-morph: moving the actual PC-setting out of "execute" @@ -259,59 +259,100 @@ class TestIssuerInternal(Elaboratable): comb += self.state_w_pc.wen.eq(1<