From b01d163aae107c1e7c753cf0fcad5515f63e3a4b Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Fri, 20 Jul 2018 06:11:44 +0100 Subject: [PATCH] add `define generator --- src/bsv/peripheral_gen.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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) -- 2.30.2