From: Luke Kenneth Casson Leighton Date: Wed, 8 Dec 2021 16:06:27 +0000 (+0000) Subject: add new PortInterfaceBase external_busy() option X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=8afe3c5759d163b633d1c1f30523ac00e6e7513e;p=soc.git add new PortInterfaceBase external_busy() option this allows e.g. instruction fault to stop LD/STs from being accepted --- diff --git a/src/soc/experiment/pimem.py b/src/soc/experiment/pimem.py index 03be6bca..44eaeebe 100644 --- a/src/soc/experiment/pimem.py +++ b/src/soc/experiment/pimem.py @@ -321,7 +321,14 @@ class PortInterfaceBase(Elaboratable): comb += busy_l.r.eq(1) # busy latch outputs to interface - comb += pi.busy_o.eq(busy_l.q) + if hasattr(self, "external_busy"): + # when there is an extra (external) busy, include that here. + # this is used e.g. in LoadStore1 when an instruction fault + # is being processed (instr_fault) and stops Load/Store requests + # from being made until it's done + comb += pi.busy_o.eq(busy_l.q | self.external_busy(m)) + else: + comb += pi.busy_o.eq(busy_l.q) return m