fix peripheral name
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Tue, 24 Jul 2018 11:06:37 +0000 (12:06 +0100)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Tue, 24 Jul 2018 11:06:37 +0000 (12:06 +0100)
src/bsv/peripheral_gen/nspi.py

index d9999597b3c189c7b1c3666d79fb23359bd68e6f..46ff961b878bc3d74e2e55511dd3127fb0340e2a 100644 (file)
@@ -38,8 +38,9 @@ class nspi(PBase):
         # special-case for gpio in, store in a temporary vector
         plen = len(self.peripheral.pinspecs)
         template = "      mkConnection({0}.{1},\n\t\t\t{2}.{1});"
+        sname = self.peripheral.iname().format(count)
         name = self.get_iname(count)
-        ps = "pinmux.peripheral_side.%s" % name
+        ps = "pinmux.peripheral_side.%s" % sname
         n = "{0}.out".format(name)
         for ptype in ['io_out', 'io_out_en', 'io_in']:
             ret.append(template.format(ps, ptype, n))