From aa77942acbd1a9a9eed635758560728444875cd3 Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Mon, 25 Jun 2018 10:17:44 +0100 Subject: [PATCH] pep8 cleanup --- src/bsv/actual_pinmux.py | 15 +++++++++------ src/bsv/interface_decl.py | 4 ++-- src/spec/base.py | 7 ++++--- 3 files changed, 15 insertions(+), 11 deletions(-) diff --git a/src/bsv/actual_pinmux.py b/src/bsv/actual_pinmux.py index eef01b0..259a2ee 100644 --- a/src/bsv/actual_pinmux.py +++ b/src/bsv/actual_pinmux.py @@ -28,7 +28,7 @@ def get_cell_bit_width(p): max_num_cells = 0 for cell in p.muxed_cells: max_num_cells = max(len(cell) - 1, max_num_cells) - return int(math.log(max_num_cells+1, 2)) + return int(math.log(max_num_cells + 1, 2)) def cn(idx): # idx is an integer @@ -44,6 +44,7 @@ def transfn(temp): temp[0] = temp[0] .replace(' ', '') return '_'.join(temp) + def fmt(cell, idx): """ blank entries need to output a 0 to the pin (it could just as well be a 1 but we choose 0). reason: blank entries in @@ -64,6 +65,7 @@ def mkcomment(p, cell, idx): """ return "" + 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 @@ -87,15 +89,16 @@ def init(p, ifaces): p.cell_bitwidth = get_cell_bit_width(p) p.pinmux = ' ' global dedicated_wire - fmtstr = "\t\t\twr%s == %d ? %s :%s\n" # mux-selector format + fmtstr = "\t\t\twr%s == %d ? %s :%s\n" # mux-selector format for cell in p.muxed_cells: p.pinmux += " // output muxer for cell idx %s\n" % cell[0] p.pinmux += " %s_out=\n" % cn(cell[0]) - for i in range(0, (1<