From dc09fcb833af181e0d7c8139ff068e48e7890c23 Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Fri, 3 Dec 2021 17:38:26 +0000 Subject: [PATCH] in loadstore.py, when an exception is done or if the FSM is done, reset back to idle and indicate "not busy" --- src/soc/fu/ldst/loadstore.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/soc/fu/ldst/loadstore.py b/src/soc/fu/ldst/loadstore.py index 47f34105..f7fedc2c 100644 --- a/src/soc/fu/ldst/loadstore.py +++ b/src/soc/fu/ldst/loadstore.py @@ -278,6 +278,11 @@ class LoadStore1(PortInterfaceBase): sync += Display("alignment error: store addr in DAR %x", self.addr) comb += self.pi.dar_o.eq(self.addr) + # when done or exception, return to idle state + with m.If(self.done | exception): + sync += self.state.eq(State.IDLE) + comb += self.busy.eq(0) + # happened, alignment, instr_fault, invalid. # note that all of these flow through - eventually to the TRAP # pipeline, via PowerDecoder2. -- 2.30.2