self.dedicated_cells = []
self.pinnumbers = []
self.bankwidths = {}
+ self.banksize = {}
+ self.bankstart = {}
- fname = 'bankwidths.txt'
+ fname = 'pinspec.txt'
if pth:
fname = os.path.join(pth, fname)
with open(fname) as bankwidths:
for lineno, line in enumerate(bankwidths):
line1 = line[:-1].split('\t')
- self.bankwidths[line1[0]] = int(line1[1])
+ self.bankwidths[line1[0]] = int(line1[3])
+ self.banksize[line1[0]] = int(line1[2])
+ self.bankstart[line1[0]] = int(line1[1])
# == capture the number of IO cells required == #
fname = 'pinmap.txt'
dummytest(ps, output_dir, output_type)
else:
specgen(of, output_dir, pinout,
- bankspec, pinspec, fixedpins, ps.fastbus)
+ bankspec, ps.muxwidths, pinspec, fixedpins, ps.fastbus)
else:
if output_type == 'bsv':
from bsv.pinmux_generator import pinmuxgen as gentypes
from spec.interfaces import Pinouts
-def specgen(of, pth, pinouts, bankspec, pinbanks, fixedpins, fastbus):
+def specgen(of, pth, pinouts, bankspec, muxwidths, pinbanks, fixedpins,
+ fastbus):
""" 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, 'bankwidths.txt'), 'w') as f:
+ with open(os.path.join(pth, 'muxwidths.txt'), 'w') as f:
for k, v in pinouts.muxwidths.items():
f.write("%s\t%d\n" % (k, v))
with open(os.path.join(pth, 'interfaces.txt'), 'w') as f:
keys = sorted(bankspec.keys())
for bank in keys:
pinstart = bankspec[bank]
- of.write("* %s %d %d\n" % (bank, pinstart, pinbanks[bank]))
- g.write("%s\t%d\t%d\n" % (bank, pinstart, pinbanks[bank]))
+ wid = muxwidths[bank]
+ of.write("* %s %d %d %d\n" % (bank, pinstart, pinbanks[bank], wid))
+ g.write("%s\t%d\t%d\t%d\n" % (bank, pinstart, pinbanks[bank], wid))