From 3637f219d0d1325dee7b9206919ff1d0f8fb867c Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Mon, 25 Jun 2018 23:24:26 +0100 Subject: [PATCH] pep8 cleanup --- src/bsv/actual_pinmux.py | 7 +++++-- src/bsv/pinmux_generator.py | 1 - 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/bsv/actual_pinmux.py b/src/bsv/actual_pinmux.py index 1975e48..bff3163 100644 --- a/src/bsv/actual_pinmux.py +++ b/src/bsv/actual_pinmux.py @@ -64,12 +64,14 @@ def fmt(ifaces, cell, idx, suffix=None): temp = transfn(cell) x = ifaces.getifacetype(temp) if x == 'input': - return '0' # inputs don't get passed through to the out mux + return '0' # inputs don't get passed through to the out mux if suffix == '_outen' and x == 'out': return '1' return "wr%s%s" % (cell, suffix or '') # XXX this needs to move into interface_decl.py + + def mkcomment(ifaces, cell, idx, outenmode=False): """ returns a comment string for the cell when muxed """ @@ -104,11 +106,12 @@ def mkmux(p, ifaces, cell, suffix, outenmode): cf = fmt(ifaces, cell, i, suffix) ret += fmtstr % (cn(cell[0]), i, cf, comment) comment = mkcomment(ifaces, cell, i + 1, outenmode) - ret += "\t\t\t" + fmt(ifaces, cell, i + 1, suffix) # last line + ret += "\t\t\t" + fmt(ifaces, cell, i + 1, suffix) # last line ret += ";%s\n" % comment return ret + def init(p, ifaces): """ generates the actual output pinmux for each io-cell. blank lines need to output "0" to the iopad, if there is no entry in diff --git a/src/bsv/pinmux_generator.py b/src/bsv/pinmux_generator.py index 400b08b..e086f35 100644 --- a/src/bsv/pinmux_generator.py +++ b/src/bsv/pinmux_generator.py @@ -219,7 +219,6 @@ def write_pmp(pmp, p, ifaces, iocells): ifaces.ifacedef(bsv_file) bsv_file.write("\n endinterface;") - bsv_file.write(footer) print("BSV file successfully generated: bsv_src/pinmux.bsv") # ====================================================================== -- 2.30.2