actorlib/spi/DMAController: export length/storage/trigger
authorSebastien Bourdeauducq <sebastien@milkymist.org>
Sat, 13 Jul 2013 15:13:15 +0000 (17:13 +0200)
committerSebastien Bourdeauducq <sebastien@milkymist.org>
Sat, 13 Jul 2013 15:13:15 +0000 (17:13 +0200)
migen/actorlib/spi.py

index 1f9eeb3c7bda9367ed4effd0c94fb9aee1181acf..8815f92d4865ea1bc6fcde3aed4851f8a201c5d1 100644 (file)
@@ -146,6 +146,11 @@ class _DMAController(Module):
                self.generator = SingleGenerator(layout, mode)
                self.r_busy = CSRStatus()
 
+               self.length = self.generator.r_length.storage
+               self.base = self.generator.r_base.storage
+               if hasattr(self.generator, "trigger"):
+                       self.trigger = self.generator.trigger
+
        def get_csrs(self):
                return self.generator.get_csrs() + [self.r_busy]