From c32ca0071d9ef044b487f59ce92d781160af5728 Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Thu, 29 Mar 2018 14:20:28 +0100 Subject: [PATCH] write out pinspec to pinspec.txt --- src/spec/gen.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/spec/gen.py b/src/spec/gen.py index 0707cf2..cb7957f 100644 --- a/src/spec/gen.py +++ b/src/spec/gen.py @@ -60,6 +60,8 @@ def specgen(pth, pinouts, bankspec, pinbanks, fixedpins): g.write('\t'.join(p) + '\n') # lists bankspec, shows where the pin-numbers *start* - print ("# Pin Bank starting points and lengths\n") - for bank, pinstart in bankspec.items(): - print ("* %s %d %d" % (bank, pinstart, pinbanks[bank])) + print ("# Pin Bank starting points and lengths\n") + with open(os.path.join(pth, 'pinspec.txt'), 'w') as g: + for bank, pinstart in bankspec.items(): + print ("* %s %d %d" % (bank, pinstart, pinbanks[bank])) + g.write("%s\t%d\t%d\n" % (bank, pinstart, pinbanks[bank])) -- 2.30.2