bank/description: memprefix
authorSebastien Bourdeauducq <sebastien@milkymist.org>
Mon, 25 Feb 2013 22:14:15 +0000 (23:14 +0100)
committerSebastien Bourdeauducq <sebastien@milkymist.org>
Mon, 25 Feb 2013 22:14:15 +0000 (23:14 +0100)
migen/bank/description.py

index 44759b8151619a4f1e6ecd1aaf0d056b289c4214..610c6a7602a959d2e4b210f52d97598dd8e256af 100644 (file)
@@ -5,6 +5,11 @@ def regprefix(prefix, registers):
                register.name = prefix + register.name
        return registers
 
+def memprefix(prefix, memories):
+       for memory in memories:
+               memory.name_override = prefix + memory.name_override
+       return memories
+
 class RegisterRaw:
        def __init__(self, name, size=1):
                self.name = name