[[!toc ]]
""")
- display(of, self)
+ bk = self.pinbanks.keys()
+ bk.sort()
+ for bank in bk:
+ of.write("\n## Bank %s (%d pins)\n\n" % (bank, self.pinbanks[bank]))
+ display(of, self, bank)
of.write("\n# Pinouts (Fixed function)\n\n")
fixedpins = display_fixed(of, self.fixedpins, len(self))
from copy import deepcopy
-def display(of, pins):
+def display(of, pins, banksel=None):
of.write("""\
| Pin | Mux0 | Mux1 | Mux2 | Mux3 |
| --- | ----------- | ----------- | ----------- | ----------- |
pinidx = sorted(pins.keys())
for pin in pinidx:
pdata = pins.get(pin)
+ if banksel:
+ skip = False
+ for mux in range(4):
+ if mux not in pdata:
+ continue
+ name, bank = pdata[mux]
+ if banksel != bank:
+ skip = True
+ if skip:
+ continue
res = '| %3d |' % pin
for mux in range(4):
if mux not in pdata: