From 8afe3c5759d163b633d1c1f30523ac00e6e7513e Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Wed, 8 Dec 2021 16:06:27 +0000 Subject: [PATCH] add new PortInterfaceBase external_busy() option this allows e.g. instruction fault to stop LD/STs from being accepted --- src/soc/experiment/pimem.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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 -- 2.30.2