whoops, order of functions incorrect
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Fri, 2 Oct 2020 18:50:04 +0000 (19:50 +0100)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Fri, 2 Oct 2020 18:50:04 +0000 (19:50 +0100)
src/pinmux_generator.py
src/spec/base.py

index f59730f3636d9ffb0406f04e31e16a68fd733c02..94357b0b6701cc9d675118fd9d1e7b90ab59d6c4 100644 (file)
@@ -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
index 372099c49d5b952cd072afb2037b8a97f2be31d3..c6f4ccb32e4c007c24fd62c3f5aef3388f20b8b6 100644 (file)
@@ -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]]