fix peripheral name
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Tue, 24 Jul 2018 10:32:04 +0000 (11:32 +0100)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Tue, 24 Jul 2018 10:32:04 +0000 (11:32 +0100)
src/bsv/peripheral_gen/rgbttl.py

index 3ba08c6749da946044627880daa99f0f8846f21e..e9a83255aa45f2d2d10295bed8a240baaf2c26cf 100644 (file)
@@ -24,10 +24,11 @@ class rgbttl(PBase):
     def mk_pincon(self, name, count):
         ret = [PBase.mk_pincon(self, name, count)]
         # special-case for gpio in, store in a temporary vector
+        sname = self.peripheral.iname().format(count)
         plen = len(self.peripheral.pinspecs)
         template = "      mkConnection({0}.{1},\n\t\t\t{2}.{1});"
         name = self.get_iname(count)
-        ps = "pinmux.peripheral_side.%s" % name
+        ps = "pinmux.peripheral_side.%s" % sname
         n = "{0}".format(name)
         for ptype in ['data_out']:
             ret.append(template.format(ps, ptype, n))