add domains and clocks to be able to create different VDD/VSS IO
[pinmux.git] / src / pinmux_generator.py
index 3da90f1966f821974aaa591e86dbf7604aa72a63..176660b34b1593e819fe999328db87361ee41332 100644 (file)
@@ -21,9 +21,6 @@ import os.path
 import sys
 from spec import modules, specgen, dummytest
 
-from bsv.pinmux_generator import pinmuxgen as bsvgen
-from myhdlgen.pinmux_generator import pinmuxgen as myhdlgen
-
 
 def printhelp():
     print ('''pinmux_generator.py [-o outputdir] [-v|--validate] [-h|--help]
@@ -89,15 +86,21 @@ if __name__ == '__main__':
             os.makedirs(d)
         with open(fname, "w") as of:
             ps = module.pinspec()
-            pinout, bankspec, pinspec, fixedpins = ps.write(of)
+            pinout, bankspec, pin_spec, fixedpins = ps.write(of)
             if testing:
                 dummytest(ps, output_dir, output_type)
             else:
-                specgen(of, output_dir, pinout, bankspec, pinspec, fixedpins)
+                specgen(of, output_dir, pinout,
+                        bankspec, ps.muxwidths, pin_spec, fixedpins, ps.fastbus)
+                module.pinparse(ps, pinspec)
     else:
-        gentypes = {'bsv': bsvgen, 'myhdl': myhdlgen}
-        if output_type not in gentypes:
+        if output_type == 'bsv':
+            from bsv.pinmux_generator import pinmuxgen as gentypes
+        elif output_type == 'myhdl':
+            from myhdlgen.pinmux_generator import pinmuxgen as gentypes
+        else:
             print ("ERROR: output type '%s' does not exist" % output_type)
             printhelp()
             sys.exit(0)
-        gentypes[output_type](output_dir, validate)
+
+        gentypes(output_dir, validate)