From: Luke Kenneth Casson Leighton Date: Fri, 20 Jul 2018 05:35:00 +0000 (+0100) Subject: add axi slave idx generator X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=124dcf2fddc10c94fbe8c63f7a807d5714cab779;p=pinmux.git add axi slave idx generator --- diff --git a/src/bsv/peripheral_gen.py b/src/bsv/peripheral_gen.py index 9800cf1..5e4a18b 100644 --- a/src/bsv/peripheral_gen.py +++ b/src/bsv/peripheral_gen.py @@ -20,6 +20,10 @@ class PBase(object): " `define%(bend)s 'h%(end)08X // %(comment)s" % locals(), offs) + def axi_slave_idx(self, idx, name, ifacenum): + name = name.upper() + return "typedef {0} {1}{2}_slave_num;".format(idx, name, ifacenum) + class uart(PBase): def importfn(self):