in loadstore.py, when an exception is done or if the FSM
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Fri, 3 Dec 2021 17:38:26 +0000 (17:38 +0000)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Fri, 3 Dec 2021 17:38:26 +0000 (17:38 +0000)
is done, reset back to idle and indicate "not busy"

src/soc/fu/ldst/loadstore.py

index 47f341054fff8a5bb96db0147b9e440b33142958..f7fedc2c735ee4f56c34079a52f4ad4499786e5a 100644 (file)
@@ -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.