From 8f69d9b669db18bd544ba968440d9e31e5412c27 Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Mon, 6 Jan 2014 22:13:06 +0100 Subject: [PATCH] bank/eventmanager: add SharedIRQ --- migen/bank/eventmanager.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/migen/bank/eventmanager.py b/migen/bank/eventmanager.py index 8cd47a7e..99d0a4e6 100644 --- a/migen/bank/eventmanager.py +++ b/migen/bank/eventmanager.py @@ -70,3 +70,8 @@ class EventManager(Module, AutoCSR): if self.finalized: raise FinalizeError self.submodules += value + +class SharedIRQ(Module): + def __init__(self, *event_managers): + self.irq = Signal() + self.comb += self.irq.eq(optree("|", [ev.irq for ev in event_managers])) -- 2.30.2