sort out flexbus vector pincon
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Mon, 30 Jul 2018 07:47:11 +0000 (08:47 +0100)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Mon, 30 Jul 2018 07:47:11 +0000 (08:47 +0100)
src/bsv/peripheral_gen/base.py

index 72385cf2b5f5f26f5b3e33ae59b9dd8a23fd4145..2fdb7d26132598734801261b14cc4aa12c553843 100644 (file)
@@ -207,6 +207,8 @@ else"""
             sname = self.peripheral.iname().format(count)
             ps = "pinmux.peripheral_side.%s" % sname
         n = self.get_iname(count)
+        if typ == 'in':
+            n = "{0}.{1}".format(n, stype)
         ps_ = "{0}.{1}".format(ps, pname)
         ret += self._mk_actual_connection(typ, name, count, typ,
                                           pname, ps_, n, stype)
@@ -237,7 +239,6 @@ else"""
             else:
                 n2 = "{0}{1}".format(name, count)
                 sync = '{0}_{1}_sync'.format(n2, pname)
-                n = "{0}.{1}".format(n, fname)
                 ret.append("mkConnection({1}.put,\n\t\t\t{0});".format(
                             ps, sync))
                 ret.append("mkConnection({1},\n\t\t\t{0}.get);".format(