add pin renaming for vector connections
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Mon, 30 Jul 2018 07:20:28 +0000 (08:20 +0100)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Mon, 30 Jul 2018 07:20:28 +0000 (08:20 +0100)
src/bsv/peripheral_gen/base.py
src/bsv/peripheral_gen/flexbus.py

index fd3038478791830c4ca2556f25ee5f75dddb6dd3..ee837ab5f2aeffe931cf99f54cfda7d4f1e18ac4 100644 (file)
@@ -196,7 +196,9 @@ else"""
                     ret += cn
         return '\n'.join(ret)
 
-    def _mk_vpincon(self, name, count, ptyp, typ, pname):
+    def _mk_vpincon(self, name, count, ptyp, typ, pname, stype=None):
+        if stype is None:
+            stype = pname
         ret = []
         if ptyp == 'fast':
             sname = self.get_iname(count)
@@ -207,7 +209,7 @@ else"""
         n = self.get_iname(count)
         ps_ = "{0}.{1}".format(ps, pname)
         ret += self._mk_actual_connection(typ, name, count, typ,
-                                          pname, ps_, n, pname)
+                                          pname, ps_, n, stype)
         return '\n'.join(ret)
 
     def _mk_actual_connection(self, ctype, name, count, typ,
index ba05e1cd2056c7ff4321c472b43c35c42db6512e..1db196531ad52ac2b3300b77106b13829d94e951 100644 (file)
@@ -65,6 +65,7 @@ class flexbus(PBase):
             ('ad_in', 'm_din', 'in'),
             ('ad_out_en', 'm_OE32n', 'out'),
         ]:
-            ret.append(self._mk_vpincon(name, count, typ, ptype, pname))
+            ret.append(self._mk_vpincon(name, count, typ, ptype, pname,
+                                        stype))
 
         return '\n'.join(ret)