From c25b3c27d5a0ef4bf6c82646090e568240b6149f Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Thu, 29 Mar 2018 14:18:51 +0100 Subject: [PATCH] add pinbank starting points and sizes --- src/pinmux_generator.py | 4 ++-- src/spec/gen.py | 7 ++++++- src/spec/m_class.py | 2 +- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/src/pinmux_generator.py b/src/pinmux_generator.py index 7d2ddad..05ebf2d 100644 --- a/src/pinmux_generator.py +++ b/src/pinmux_generator.py @@ -77,8 +77,8 @@ if __name__ == '__main__': printhelp() sys.exit(1) module = modules[pinspec] - pinout, bankspec, fixedpins = module.pinspec() - specgen(output_dir, pinout, bankspec, fixedpins) + pinout, bankspec, pinspec, fixedpins = module.pinspec() + specgen(output_dir, pinout, bankspec, pinspec, fixedpins) else: gentypes = {'bsv': bsvgen} if output_type not in gentypes: diff --git a/src/spec/gen.py b/src/spec/gen.py index 36b815e..0707cf2 100644 --- a/src/spec/gen.py +++ b/src/spec/gen.py @@ -3,7 +3,7 @@ import os.path from spec.interfaces import Pinouts -def specgen(pth, pinouts, bankspec, fixedpins): +def specgen(pth, pinouts, bankspec, pinbanks, fixedpins): """ generates a specification of pinouts (tsv files) for reading in by pinmux """ @@ -58,3 +58,8 @@ def specgen(pth, pinouts, bankspec, fixedpins): p = map(str, p) p = map(str.lower, p) 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])) diff --git a/src/spec/m_class.py b/src/spec/m_class.py index be8ccb1..d472704 100644 --- a/src/spec/m_class.py +++ b/src/spec/m_class.py @@ -689,4 +689,4 @@ datasheets and pinout links * ULPI OTG PHY, TI TUSB1210 """) - return pinouts, bankspec, fixedpins + return pinouts, bankspec, pinbanks, fixedpins -- 2.30.2