from copy import deepcopy
-def display(of, pins, banksel=None):
+def display(of, pins, banksel=None, muxwidth=4):
of.write("""\
| Pin | Mux0 | Mux1 | Mux2 | Mux3 |
| --- | ----------- | ----------- | ----------- | ----------- |
pdata = pins.get(pin)
if banksel:
skip = False
- for mux in range(4):
+ for mux in range(muxwidth):
if mux not in pdata:
continue
name, bank = pdata[mux]
if skip:
continue
res = '| %3d |' % pin
- for mux in range(4):
+ for mux in range(muxwidth):
if mux not in pdata:
res += " |"
continue
current_fn = None
for fname in fnidx:
fnbase = find_fn(fname, fn_names)
+ assert fnbase in function_names, "fn %s not in descriptions %s" % \
+ (fname, str(function_names.keys()))
#print "name", fname, fnbase
if fnbase != current_fn:
if current_fn is not None:
continue
for k in pins.fnspec.keys():
if fname.startswith(k):
- fk = pins.fnspec[k].keys()
+ fk = list(pins.fnspec[k].keys())
fn = pins.fnspec[k]
- fn = fn[list(fn.keys())[0]]
+ fn = fn[fk[0]]
#print fname, fn, dir(fn)
if count == 100000:
count = len(fn.pingroup)
of.write("* %s %d %s%d/%d\n" % (fname, pin_, bank, pin, mux))
if removedcount != count:
- print ("not all found", name, removedcount, count, title, found, \
- fns[fname])
+ print ("not all found", name, removedcount, count, title, found,
+ fns[fname])
print ("pins found", pinfound)
# fnidx.sort(fnsort)