From 124dcf2fddc10c94fbe8c63f7a807d5714cab779 Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Fri, 20 Jul 2018 06:35:00 +0100 Subject: [PATCH] add axi slave idx generator --- src/bsv/peripheral_gen.py | 4 ++++ 1 file changed, 4 insertions(+) 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): -- 2.30.2