From: Luke Kenneth Casson Leighton Date: Thu, 29 Mar 2018 13:20:28 +0000 (+0100) Subject: write out pinspec to pinspec.txt X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c32ca0071d9ef044b487f59ce92d781160af5728;p=pinmux.git write out pinspec to pinspec.txt --- 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]))