From f1e4b3a8bc48bcdfca867a0322096556e8317984 Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Fri, 2 Oct 2020 19:50:04 +0100 Subject: [PATCH] whoops, order of functions incorrect --- src/pinmux_generator.py | 5 +++-- src/spec/base.py | 6 ++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/pinmux_generator.py b/src/pinmux_generator.py index f59730f..94357b0 100644 --- a/src/pinmux_generator.py +++ b/src/pinmux_generator.py @@ -88,14 +88,15 @@ if __name__ == '__main__': with open(fname, "w") as of: with open(pyname, "w") as pyf: ps = module.pinspec() - pm = module.pinparse(ps, pinspec) - pinout, bankspec, pin_spec, fixedpins = ps.write(pyf, of, pm) + pinout, bankspec, pin_spec, fixedpins = ps.write(of) if testing: dummytest(ps, output_dir, output_type) else: specgen(of, output_dir, pinout, bankspec, ps.muxwidths, pin_spec, fixedpins, ps.fastbus) + pm = module.pinparse(ps, pinspec) + ps.pywrite(pyf, pm) else: if output_type == 'bsv': from bsv.pinmux_generator import pinmuxgen as gentypes diff --git a/src/spec/base.py b/src/spec/base.py index 372099c..c6f4ccb 100644 --- a/src/spec/base.py +++ b/src/spec/base.py @@ -37,9 +37,11 @@ class PinSpec(Pinouts): self.scenarios.append((name, needed, eint, pwm, descriptions)) - def write(self, pyf, of, pinmap): + def pywrite(self, pyf, pinmap): - fns = python_dict_fns(pyf, pinmap, self, self.function_names) + python_dict_fns(pyf, pinmap, self, self.function_names) + + def write(self, of): of.write("""# Pinouts (PinMux) auto-generated by [[pinouts.py]] -- 2.30.2