From: Luke Kenneth Casson Leighton Date: Mon, 25 Jun 2018 08:56:11 +0000 (+0100) Subject: do full cell mux range otherwise spurious outputs occur X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b7261abcb50126621d8a9db8daf745b54076b063;p=pinmux.git do full cell mux range otherwise spurious outputs occur --- diff --git a/src/bsv/actual_pinmux.py b/src/bsv/actual_pinmux.py index 78b9ba3..eef01b0 100644 --- a/src/bsv/actual_pinmux.py +++ b/src/bsv/actual_pinmux.py @@ -44,17 +44,22 @@ def transfn(temp): temp[0] = temp[0] .replace(' ', '') return '_'.join(temp) -def fmt(cell): +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 the pinmap.txt file indicate that there's nothing to choose from. however the user may still set the muxer to that value, and rather than throw an exception we choose to output... zero. """ + idx += 1 + if idx < len(cell): + cell = cell[idx] + else: + cell = '' return "%s_io" % cell if cell else '0' -def mkcomment(p, cell): +def mkcomment(p, cell, idx): """ returns a comment string for the cell when muxed """ return "" @@ -72,6 +77,12 @@ def init(p, ifaces): d last line doesn't need selector-logic, obviously. + + note that it's *important* that all muxer options be covered + (hence going up to 1<