From: Luke Kenneth Casson Leighton Date: Fri, 20 Jul 2018 05:11:44 +0000 (+0100) Subject: add `define generator X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b01d163aae107c1e7c753cf0fcad5515f63e3a4b;p=pinmux.git add `define generator --- diff --git a/src/bsv/peripheral_gen.py b/src/bsv/peripheral_gen.py index 270bc80..90f7b43 100644 --- a/src/bsv/peripheral_gen.py +++ b/src/bsv/peripheral_gen.py @@ -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)