soc_core: remove assert on interrupt (added to catch design issues, but too restrictive for some usecases)

This commit is contained in:
Florent Kermarrec 2018-06-19 11:15:29 +02:00
parent 2c13b701f5
commit 8edc659d7d
1 changed files with 4 additions and 4 deletions

View File

@ -301,10 +301,10 @@ class SoCCore(Module):
for interrupt, mod_name in sorted(self.interrupt_rmap.items()): for interrupt, mod_name in sorted(self.interrupt_rmap.items()):
if mod_name == "nmi": if mod_name == "nmi":
continue continue
assert hasattr(self, mod_name), "Missing module for interrupt %s" % mod_name if hasattr(self, mod_name):
mod_impl = getattr(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 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) self.comb += self.cpu_or_bridge.interrupt[interrupt].eq(mod_impl.ev.irq)
def build(self, *args, **kwargs): def build(self, *args, **kwargs):
return self.platform.build(self, *args, **kwargs) return self.platform.build(self, *args, **kwargs)