fix name in mkConnection
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Fri, 3 Aug 2018 09:20:14 +0000 (10:20 +0100)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Fri, 3 Aug 2018 09:20:14 +0000 (10:20 +0100)
src/bsv/peripheral_gen/base.py

index e6f9a53f84219c9a8513f59dabdea874aa2ce87d..e07ba18f299e13df887d18880133fa47d88396f7 100644 (file)
@@ -458,11 +458,8 @@ Ifc_sync#({0}) {1}_sync <-mksyncconnection(
         if not isinstance(connections, list):
             connections = [connections]
         for (idx, con) in enumerate(connections):
-            if len(connections) == 1:
-                idx = ""
-            else:
-                idx = "_%d_" % idx
-            aname = self.axi_slave_name(idx, name, count, typ)
+            cfg = self.get_mmap_cfg_name(idx)
+            aname = self.axi_slave_name(cfg, name, count, typ)
             ret.append(self.__mk_connection(con, aname, count, fabricname))
         return '\n'.join(ret)