add `define generator
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Fri, 20 Jul 2018 05:11:44 +0000 (06:11 +0100)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Fri, 20 Jul 2018 05:11:44 +0000 (06:11 +0100)
src/bsv/peripheral_gen.py

index 270bc80222b427c66acee2adf416536dfbc00915..90f7b43237bbefc4bca4497ac27a321975494773 100644 (file)
@@ -1,12 +1,12 @@
 class PBase(object):
     pass
 
-    def axi_reg_def(self, start, name, idx):
+    def axi_reg_def(self, start, name, ifacenum):
         name = name.upper()
         offs = self.num_axi_regs32()*4
         end = start + offs - 1
-        return ("    `define%(name)s%(idx)dBase  'h%(start)08x'\n" \
-                "    `define%(name)s%(idx)dEnd   'h%(end)08x'\n" % locals(),
+        return ("    `define%(name)s%(ifacenum)dBase 'h%(start)08x'\n" \
+                "    `define%(name)s%(ifacenum)dEnd  'h%(end)08x'\n" % locals(),
                 offs)