def specgen(of, pth, pinouts, bankspec, muxwidths, pinbanks, fixedpins,
- fastbus):
+ configs):
""" generates a specification of pinouts (tsv files)
for reading in by pinmux.
#print pinouts.ganged.items()
if not os.path.exists(pth):
os.makedirs(pth)
+ with open(os.path.join(pth, 'configs.txt'), 'w') as f:
+ for (name, d) in configs.items():
+ d = d.items()
+ d.sort()
+ vals = []
+ for (k, v) in d:
+ vals.append("%s=%s" % (k, repr(v)))
+ line = [name.lower(), '\t'.join(vals)]
+ line = '\t'.join(line)
+ f.write("%s\n" % line)
+
with open(os.path.join(pth, 'interfaces.txt'), 'w') as f:
for k in pinouts.fnspec.keys():
s = pinouts.fnspec[k]
line = [k.lower(), str(len(s))]
- for b in fastbus:
- if b.startswith(k.lower()):
- line.append(b)
line = '\t'.join(line)
f.write("%s\n" % line)
s0 = s[list(s.keys())[0]] # hack, take first
}
ps = PinSpec(pinbanks, fixedpins, function_names,
- ['lcd', 'jtag', 'fb', 'sdr'])
+ {'lcd': {'bus': 'fastbus'},
+ 'jtag': {'bus': 'fastbus'},
+ 'fb': {'bus': 'fastbus'},
+ 'sdr': {'bus': 'fastbus'}
+ })
# Bank A, 0-27
ps.gpio("", ('A', 0), 0, 0, 28)