projects
/
pinmux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
remove write_ptp, add bitwidths.txt file
[pinmux.git]
/
src
/
spec
/
gen.py
diff --git
a/src/spec/gen.py
b/src/spec/gen.py
index 2c1335f6d0d89a11504794c774ff1562a5dec55d..8a54e9353505b5473ceb76fd9d2d316bba7f9087 100644
(file)
--- a/
src/spec/gen.py
+++ b/
src/spec/gen.py
@@
-3,7
+3,7
@@
import os.path
from spec.interfaces import Pinouts
from spec.interfaces import Pinouts
-def specgen(of, pth, pinouts, bankspec, pinbanks, fixedpins):
+def specgen(of, pth, pinouts, bankspec, pinbanks, fixedpins
, fastbus
):
""" generates a specification of pinouts (tsv files)
for reading in by pinmux.
""" generates a specification of pinouts (tsv files)
for reading in by pinmux.
@@
-28,10
+28,18
@@
def specgen(of, pth, pinouts, bankspec, pinbanks, fixedpins):
#print pinouts.ganged.items()
if not os.path.exists(pth):
os.makedirs(pth)
#print pinouts.ganged.items()
if not os.path.exists(pth):
os.makedirs(pth)
+ with open(os.path.join(pth, 'bankwidths.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:
for k in pinouts.fnspec.keys():
s = pinouts.fnspec[k]
with open(os.path.join(pth, 'interfaces.txt'), 'w') as f:
for k in pinouts.fnspec.keys():
s = pinouts.fnspec[k]
- f.write("%s\t%d\n" % (k.lower(), len(s)))
+ 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
gangedgroup = pinouts.ganged[k]
with open(os.path.join(pth, '%s.txt' % k.lower()), 'w') as g:
s0 = s[list(s.keys())[0]] # hack, take first
gangedgroup = pinouts.ganged[k]
with open(os.path.join(pth, '%s.txt' % k.lower()), 'w') as g: