From: Luke Kenneth Casson Leighton Date: Fri, 30 Mar 2018 06:42:36 +0000 (+0100) Subject: autopep8 whitespace cleanup X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=579d3e0304cbac0532cc407993abd7c6a6403fbc;p=pinmux.git autopep8 whitespace cleanup --- diff --git a/src/bsv/interface_decl.py b/src/bsv/interface_decl.py index a639c52..1e883c8 100644 --- a/src/bsv/interface_decl.py +++ b/src/bsv/interface_decl.py @@ -224,7 +224,7 @@ class Interfaces(UserDict): name = ln[0] count = int(ln[1]) spec = self.read_spec(pth, name) - self.ifaceadd(name, count, Interface(name, spec, count==1)) + self.ifaceadd(name, count, Interface(name, spec, count == 1)) def getifacetype(self, fname): # finds the interface type, e.g sd_d0 returns "inout" @@ -288,10 +288,10 @@ mux_interface = MuxInterface('cell', [{'name': 'mux', 'ready': False, 'enabled': False, 'bitspec': '{1}', 'action': True}]) -io_interface = IOInterface('io', - [{'name': 'cell', 'enabled': False, 'bitspec': 'GenericIOType'}, - {'name': 'inputval', 'action': True, 'io': True}, - ]) +io_interface = IOInterface( + 'io', + [{'name': 'cell', 'enabled': False, 'bitspec': 'GenericIOType'}, + {'name': 'inputval', 'action': True, 'io': True}, ]) # == Peripheral Interface definitions == # # these are the interface of the peripherals to the pin mux diff --git a/src/bsv/pinmux_generator.py b/src/bsv/pinmux_generator.py index 1a9b86b..b2b3998 100644 --- a/src/bsv/pinmux_generator.py +++ b/src/bsv/pinmux_generator.py @@ -128,7 +128,7 @@ def pinmuxgen(pth=None, verify=True): ''') for cell in p.muxed_cells: bsv_file.write(mux_interface.wirefmt( - cell[0], 'Bit#('+str(int(math.log(len(cell) - 1, 2)))+')')) + cell[0], 'Bit#(' + str(int(math.log(len(cell) - 1, 2))) + ')')) ifaces.wirefmt(bsv_file) diff --git a/src/migen/safeinmux.py b/src/migen/safeinmux.py index 3e304e7..70f5b8b 100644 --- a/src/migen/safeinmux.py +++ b/src/migen/safeinmux.py @@ -5,9 +5,11 @@ from migen.fhdl.structure import Mux, Signal, Array, Constant, If, Case from migen.fhdl import verilog from migen.sim.core import run_simulation + def orop(x1, x2): return x1 | x2 + class SafeInputMux(Module): def __init__(self, inwidth): wlog = int(log(inwidth, 2)) @@ -16,13 +18,13 @@ class SafeInputMux(Module): self.inputs.append(Signal(1, name_override="input_{}".format(i))) self.output = Signal(name_override="output") self.selector = Signal(max=inwidth + 1) - self.io = set(self.inputs) | set([self.output, self.selector]) + self.io = set(self.inputs) | set([self.output, self.selector]) sel_r = Signal(max=inwidth + 1) - sel25 = Signal(max=1<