From f30f1ed0eff6b3e7f0e88541581d20f57b2e2e88 Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Fri, 23 Mar 2018 04:51:49 +0000 Subject: [PATCH] not a fan of brackets on if statements... :) --- src/actual_pinmux.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/actual_pinmux.py b/src/actual_pinmux.py index e564f67..bdfcc2e 100644 --- a/src/actual_pinmux.py +++ b/src/actual_pinmux.py @@ -50,10 +50,10 @@ def init(p): 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: @@ -70,17 +70,17 @@ def init(p): 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" @@ -92,10 +92,10 @@ def init(p): "_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" # =======================================================# -- 2.30.2