fix bug in dedicated cell type detection
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Tue, 26 Jun 2018 14:15:57 +0000 (15:15 +0100)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Tue, 26 Jun 2018 14:15:57 +0000 (15:15 +0100)
src/bsv/actual_pinmux.py

index debd0152112dc7d5cc3de316a212aef1d66689ab..e37fc5888f0a548dfa2d4d9d70072cdc2077ab74 100644 (file)
@@ -178,14 +178,20 @@ def init(p, ifaces):
     # ============================================================ #
 
     # ==================  Logic for dedicated pins ========= #
+    p.pinmux += "\n      /*=========================================*/\n"
+    p.pinmux += "      // dedicated cells\n\n"
     for cell in p.dedicated_cells:
+        p.pinmux += "      // dedicated cell idx %s\n" % (cell[0])
         p.pinmux += "      %s_out=%s_io;\n" % (cn(cell[0]), cell[1])
-        temp = cell[1].translate(digits)
+        temp = transfn(cell[1])
         x = ifaces.getifacetype(temp)
+        #print cell, temp, x
         if x == "input":
-            pinmux = pinmux + \
+            p.pinmux += \
                 dedicated_wire.format(cell[0], "wr" + cell[1]) + "\n"
         elif x == "inout":
-            pinmux = pinmux + \
+            p.pinmux += \
                 dedicated_wire.format(cell[0], "wr" + cell[1] + "_in") + "\n"
+        else:
+            p.pinmux += "\n"
     # =======================================================#