mirror of
https://github.com/enjoy-digital/litex.git
synced 2025-01-04 09:52:26 -05:00
bank/eventmanager: add SharedIRQ
This commit is contained in:
parent
be1c8551d2
commit
8f69d9b669
1 changed files with 5 additions and 0 deletions
|
@ -70,3 +70,8 @@ class EventManager(Module, AutoCSR):
|
||||||
if self.finalized:
|
if self.finalized:
|
||||||
raise FinalizeError
|
raise FinalizeError
|
||||||
self.submodules += value
|
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]))
|
||||||
|
|
Loading…
Reference in a new issue