class PinSpec(Pinouts):
- def __init__(self, pinbanks, fixedpins, function_names):
- self.pinbanks = pinbanks
+ def __init__(self, pinbanks, fixedpins, function_names, fast=None):
+ self.fastbus = fast or {}
+ self.pinbanks = {}
+ self.muxwidths = {}
+ for bank, (sz, muxwidth) in pinbanks.items():
+ self.pinbanks[bank] = sz
+ self.muxwidths[bank] = muxwidth
self.fixedpins = fixedpins
self.function_names = function_names
bankspec = {}
self.offs = 0
- pkeys = sorted(pinbanks.keys())
+ pkeys = sorted(self.pinbanks.keys())
+ print self.pinbanks
for kn in pkeys:
bankspec[kn] = self.offs
- self.offs += pinbanks[kn]
+ self.offs += self.pinbanks[kn]
self.scenarios = []
self.scenarios.append((name, needed, eint, pwm, descriptions))
def write(self, of):
- of.write ("""# Pinouts (PinMux)
+ of.write("""# Pinouts (PinMux)
auto-generated by [[pinouts.py]]
[[!toc ]]
""")
- display(of, self)
-
- of.write ("\n# Pinouts (Fixed function)\n\n")
+ bk = sorted(self.pinbanks.keys())
+ for bank in bk:
+ of.write(
+ "\n## Bank %s (%d pins, width %d)\n\n" %
+ (bank, self.pinbanks[bank], self.muxwidths[bank]))
+ display(of, self, bank, muxwidth=self.muxwidths[bank])
+
+ of.write("\n# Pinouts (Fixed function)\n\n")
fixedpins = display_fixed(of, self.fixedpins, len(self))
- of.write ("""# Functions (PinMux)
+ of.write("""# Functions (PinMux)
auto-generated by [[pinouts.py]]
needed, eint, pwm,
descriptions)
-
- of.write ("""# Reference Datasheets
+ of.write("""# Reference Datasheets
datasheets and pinout links
* <http://datasheets.chipdb.org/AMD/8018x/80186/amd-80186.pdf>
""")
return self, self.bankspec, self.pinbanks, fixedpins
-