for cell in p.muxed_cells:
p.pinmux += " %s_out=" % cn(cell[0])
i = 0
- while(i < len(cell) - 1):
+ while (i < len(cell) - 1):
p.pinmux += "wr%s" % cn(cell[0]) + \
"==" + str(i) + "?" + cell[i + 1] + "_io:\n\t\t\t"
- if(i + 2 == len(cell) - 1):
+ if i + 2 == len(cell) - 1:
p.pinmux += cell[i + 2] + "_io"
i = i + 2
else:
temp = cell[i + 1].translate(digits)
temp = temp.replace(' ', '')
x = dictionary.get(temp)
- if(x is None):
+ if x is None:
print(
"ERROR: The signal : " +
str(cell[i + 1]) +
" of pinmap.txt isn't present in the current dictionary.\
\nUpdate dictionary or fix-typo.")
exit(1)
- if(x == "input"):
+ if x == "input":
p.pinmux += \
mux_wire.format(cell[0], i, "wr" + cell[i + 1]) + "\n"
- elif(x == "inout"):
+ elif x == "inout":
p.pinmux += \
mux_wire.format(cell[0], i, "wr" + cell[i + 1] +
"_in") + "\n"
"_out=" + cell[1] + "_io;\n"
temp = cell[1].translate(digits)
x = dictionary.get(temp)
- if(x == "input"):
+ if x == "input":
pinmux = pinmux + \
dedicated_wire.format(cell[0], "wr" + cell[1]) + "\n"
- elif(x == "inout"):
+ elif x == "inout":
pinmux = pinmux + \
dedicated_wire.format(cell[0], "wr" + cell[1] + "_in") + "\n"
# =======================================================#