bring "core stopped" signal out through DMI interface
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Sun, 23 Aug 2020 19:49:13 +0000 (20:49 +0100)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Sun, 23 Aug 2020 19:49:13 +0000 (20:49 +0100)
src/soc/simple/issuer.py

index ad4fd0a9112680cffbe08d3aecdf94dd8e928f81..cf516099aa40f11f6d6c1ea8fa1bb69749ea8e10 100644 (file)
@@ -156,9 +156,9 @@ class TestIssuer(Elaboratable):
 
         # connect up debug signals
         # TODO comb += core.icache_rst_i.eq(dbg.icache_rst_o)
-        comb += core.core_stopped_i.eq(dbg.core_stop_o)
         comb += dbg.terminate_i.eq(core.core_terminate_o)
         comb += dbg.state.pc.eq(pc)
+        #comb += dbg.state.pc.eq(cur_state.pc)
         comb += dbg.state.msr.eq(cur_state.msr)
 
         # temporaries
@@ -195,6 +195,9 @@ class TestIssuer(Elaboratable):
                     comb += self.state_r_msr.ren.eq(1<<StateRegs.MSR)
 
                     m.next = "INSN_READ" # move to "wait for bus" phase
+                with m.Else():
+                    comb += core.core_stopped_i.eq(1)
+                    comb += dbg.core_stopped_i.eq(1)
 
             # dummy pause to find out why simulation is not keeping up
             with m.State("INSN_READ"):