X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fpinmux_generator.py;h=aabfa2de734752da61600f0d086915b3a1b572e3;hb=bc8356c411c88da85dec24815fa8447b9d3c4df4;hp=febc722132d1b19734993f85a373373e220b84c4;hpb=2c6752c064aff6cf72227d4887dd2e7d9b0ae2ab;p=pinmux.git diff --git a/src/pinmux_generator.py b/src/pinmux_generator.py index febc722..aabfa2d 100644 --- a/src/pinmux_generator.py +++ b/src/pinmux_generator.py @@ -22,7 +22,7 @@ import sys import json from spec import modules, specgen, dummytest from spec.ifaceprint import create_sv, temp_create_sv - +import jsoncreate def printhelp(): print ('''pinmux_generator.py [-o outputdir] [-v|--validate] [-h|--help] @@ -98,21 +98,20 @@ if __name__ == '__main__': specgen(of, output_dir, pinout, bankspec, ps.muxwidths, pin_spec, fixedpins, ps.fastbus) - if hasattr(module, "pinparse"): - pm, chip = module.pinparse(ps, pinspec) - litexmap = ps.pywrite(pyf, pm) - jchip = json.dumps(chip) - with open("%s/litex_pinpads.json" % pinspec, "w") as f: - f.write(jchip) - # octavius: please keep line-lengths to below 80 chars - # TODO: fix create_sv to allow different packages - # (and die images) - # Test with different package size, once working - # 'create_sv' will be improved - if pinspec == "ngi_router": - temp_create_sv("%s/%s.svg" % (pinspec, pinspec), chip) - else: - create_sv("%s/%s.svg" % (pinspec, pinspec), chip) + pm, chip = jsoncreate.pinparse(ps, pinspec) + litexmap = ps.pywrite(pyf, pm) + jchip = json.dumps(chip) + with open("%s/litex_pinpads.json" % pinspec, "w") as f: + f.write(jchip) + # octavius: please keep line-lengths to below 80 chars + # TODO: fix create_sv to allow different packages + # (and die images) + # Test with different package size, once working + # 'create_sv' will be improved + if pinspec == "ngi_router": + temp_create_sv("%s/%s.svg" % (pinspec, pinspec), chip) + else: + create_sv("%s/%s.svg" % (pinspec, pinspec), chip) else: if output_type == 'bsv': from bsv.pinmux_generator import pinmuxgen as gentypes