actorlib/spi: remove EventManager from DMAController
authorFlorent Kermarrec <florent@enjoy-digital.fr>
Sat, 6 Sep 2014 07:06:24 +0000 (09:06 +0200)
committerSebastien Bourdeauducq <sb@m-labs.hk>
Mon, 8 Sep 2014 03:34:21 +0000 (11:34 +0800)
migen/actorlib/spi.py

index 35e4b21f49746c788b5f16bd36758844f2973a5a..c1c5019c059fd9c391d3cacbe368dfbda65125fb 100644 (file)
@@ -110,7 +110,7 @@ class Collector(Module, AutoCSR):
                ]
 
 class _DMAController(Module):
-       def __init__(self, bus_accessor, bus_aw, bus_dw, mode, base_reset=0, length_reset=0, generate_irq=False):
+       def __init__(self, bus_accessor, bus_aw, bus_dw, mode, base_reset=0, length_reset=0):
                self.alignment_bits = bits_for(bus_dw//8) - 1
                layout = [
                        ("length", bus_aw + self.alignment_bits, length_reset, self.alignment_bits),
@@ -124,18 +124,8 @@ class _DMAController(Module):
                if hasattr(self.generator, "trigger"):
                        self.trigger = self.generator.trigger
 
-               self.generate_irq = generate_irq
-               if generate_irq:
-                       self.submodules.ev = EventManager()
-                       self.ev.done = EventSourceProcess()
-                       self.ev.finalize()
-                       self.comb += self.ev.done.trigger.eq(self.r_busy.status)
-
        def get_csrs(self):
-               csrs = self.generator.get_csrs() + [self.r_busy]
-               if self.generate_irq:
-                       csrs += self.ev.get_csrs()
-               return csrs
+               return self.generator.get_csrs() + [self.r_busy]
 
 class DMAReadController(_DMAController):
        def __init__(self, bus_accessor, *args, **kwargs):