fix compile errors
authorNeel <neelgala@gmail.com>
Sat, 21 Jul 2018 05:48:19 +0000 (11:18 +0530)
committerNeel <neelgala@gmail.com>
Sat, 21 Jul 2018 05:48:19 +0000 (11:18 +0530)
src/bsv/peripheral_gen.py

index 8b450251492d2dd5060d4ed3bf48130dfc5e63d7..393298b9a4817b13b6f000b42c3b54cf9837ba1f 100644 (file)
@@ -271,7 +271,7 @@ class qspi(PBase):
         ret.append("    // all ins done in one rule from 4-bitfield")
         ret.append("    rule con_%s%d_io_in;" % (name, count))
         ret.append("       {0}{1}.out.io_i({{".format(name, count))
-        for p in self.peripheral.pinspecs:
+        for i, p in enumerate(self.peripheral.pinspecs):
             typ = p['type']
             pname = p['name']
             if not pname.startswith('io'):
@@ -280,7 +280,8 @@ class qspi(PBase):
             n = name
             sname = self.peripheral.pname(pname).format(count)
             ps = "pinmux.peripheral_side.%s_in" % sname
-            ret.append("            {0},".format(ps))
+            comma = '' if i == 5 else ','
+            ret.append("            {0}{1}".format(ps, comma))
         ret.append("        });")
         ret.append("    endrule")
         return '\n'.join(ret)