mirror of
https://github.com/enjoy-digital/litex.git
synced 2025-01-04 09:52:26 -05:00
actorlib/spi: remove EventManager from DMAController
This commit is contained in:
parent
0bac463780
commit
c1e12c3346
1 changed files with 2 additions and 12 deletions
|
@ -110,7 +110,7 @@ class Collector(Module, AutoCSR):
|
||||||
]
|
]
|
||||||
|
|
||||||
class _DMAController(Module):
|
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
|
self.alignment_bits = bits_for(bus_dw//8) - 1
|
||||||
layout = [
|
layout = [
|
||||||
("length", bus_aw + self.alignment_bits, length_reset, self.alignment_bits),
|
("length", bus_aw + self.alignment_bits, length_reset, self.alignment_bits),
|
||||||
|
@ -124,18 +124,8 @@ class _DMAController(Module):
|
||||||
if hasattr(self.generator, "trigger"):
|
if hasattr(self.generator, "trigger"):
|
||||||
self.trigger = 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):
|
def get_csrs(self):
|
||||||
csrs = self.generator.get_csrs() + [self.r_busy]
|
return self.generator.get_csrs() + [self.r_busy]
|
||||||
if self.generate_irq:
|
|
||||||
csrs += self.ev.get_csrs()
|
|
||||||
return csrs
|
|
||||||
|
|
||||||
class DMAReadController(_DMAController):
|
class DMAReadController(_DMAController):
|
||||||
def __init__(self, bus_accessor, *args, **kwargs):
|
def __init__(self, bus_accessor, *args, **kwargs):
|
||||||
|
|
Loading…
Reference in a new issue