bank/description: regprefix
authorSebastien Bourdeauducq <sebastien@milkymist.org>
Mon, 15 Oct 2012 19:21:59 +0000 (21:21 +0200)
committerSebastien Bourdeauducq <sebastien@milkymist.org>
Mon, 15 Oct 2012 19:21:59 +0000 (21:21 +0200)
migen/bank/description.py

index a83d87d63562cb0263eb99a2851cddd874e08155..a7f43925628487407b23550389ee220d19748670 100644 (file)
@@ -1,5 +1,10 @@
 from migen.fhdl.structure import *
 
+def regprefix(prefix, registers):
+       for register in registers:
+               register.name = prefix + register.name
+       return registers
+
 class RegisterRaw:
        def __init__(self, name, size=1):
                self.name = name