From: Florent Kermarrec Date: Tue, 19 Jun 2018 09:15:29 +0000 (+0200) Subject: soc_core: remove assert on interrupt (added to catch design issues, but too restricti... X-Git-Tag: 24jan2021_ls180~1699 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=8edc659d7d23c7be6b1ff35e96871b524188f1b5;p=litex.git soc_core: remove assert on interrupt (added to catch design issues, but too restrictive for some usecases) --- diff --git a/litex/soc/integration/soc_core.py b/litex/soc/integration/soc_core.py index 4d2a026c..62cb9556 100644 --- a/litex/soc/integration/soc_core.py +++ b/litex/soc/integration/soc_core.py @@ -301,10 +301,10 @@ class SoCCore(Module): for interrupt, mod_name in sorted(self.interrupt_rmap.items()): if mod_name == "nmi": continue - assert hasattr(self, mod_name), "Missing module for interrupt %s" % mod_name - mod_impl = getattr(self, mod_name) - assert hasattr(mod_impl, 'ev'), "Submodule %s does not have EventManager (xx.ev) module" % mod_name - self.comb += self.cpu_or_bridge.interrupt[interrupt].eq(mod_impl.ev.irq) + if hasattr(self, mod_name): + mod_impl = getattr(self, mod_name) + assert hasattr(mod_impl, 'ev'), "Submodule %s does not have EventManager (xx.ev) module" % mod_name + self.comb += self.cpu_or_bridge.interrupt[interrupt].eq(mod_impl.ev.irq) def build(self, *args, **kwargs): return self.platform.build(self, *args, **kwargs)