skip blank-string entries
[pinmux.git] / src / bsv / actual_pinmux.py
index 3412be1b8f93d189e5047af2ee96ee2c502cf124..65473e099acb2cb10e6fda2ff4bfce2e200a28af 100644 (file)
@@ -45,7 +45,7 @@ def init(p, ifaces):
     p.pinmux = ' '
     global dedicated_wire
     for cell in p.muxed_cells:
-        p.pinmux += "      // output muxer for cell idx %d\n" % cell[0]
+        p.pinmux += "      // output muxer for cell idx %s\n" % cell[0]
         p.pinmux += "      %s_out=" % cn(cell[0])
         for i in range(0, len(cell) - 2):
             p.pinmux += "wr%s" % cn(cell[0]) + \
@@ -61,6 +61,8 @@ def init(p, ifaces):
         # user-to-user. Plus this also reduces human-error as well :)
         for i in range(0, len(cell) - 1):
             cname = cell[i + 1]
+            if not cname: # skip blank entries, no need to test
+                continue
             temp = transfn(cname)
             x = ifaces.getifacetype(temp)
             #print (cname, temp, x)