|
| 1 | +""" |
| 2 | +This type of setup script should be placed in the setup_scripts directory in |
| 3 | +the trunk |
| 4 | +""" |
| 5 | + |
| 6 | +import os |
| 7 | + |
| 8 | +TECHNOLOGY = "ihp_sg13g2" |
| 9 | + |
| 10 | +os.environ["MGC_TMPDIR"] = "/tmp" |
| 11 | + |
| 12 | +########################### |
| 13 | +# OpenRAM Paths |
| 14 | + |
| 15 | +if "PDK_ROOT" in os.environ: |
| 16 | + open_pdks = os.path.join(os.environ["PDK_ROOT"], "ihp-sg13g2", "libs.tech") |
| 17 | +else: |
| 18 | + raise SystemError("Unable to find the IHP SG13G2 PDK. Set PDK_ROOT.") |
| 19 | + |
| 20 | +# The ngspice models work with Xyce too now |
| 21 | +spice_model_dir = os.path.join(open_pdks, "ngspice", "models") |
| 22 | +ihp_lib_ngspice = os.path.join(open_pdks, "ngspice", ".spiceinit") |
| 23 | +if not os.path.exists(ihp_lib_ngspice): |
| 24 | + raise SystemError("Did not find {} under {}".format(ihp_lib_ngspice, open_pdks)) |
| 25 | +os.environ["SPICE_MODEL_DIR"] = spice_model_dir |
| 26 | + |
| 27 | +open_pdks = os.path.abspath(open_pdks) |
| 28 | +ihp_magicrc = os.path.join(open_pdks, 'magic', "ihp-sg13g2.magicrc") |
| 29 | +if not os.path.exists(ihp_magicrc): |
| 30 | + raise SystemError("Did not find {} under {}".format(ihp_magicrc, open_pdks)) |
| 31 | +os.environ["OPENRAM_MAGICRC"] = ihp_magicrc |
| 32 | +ihp_netgenrc = os.path.join(open_pdks, 'netgen', "ihp-sg13g2_setup.tcl") |
| 33 | +if not os.path.exists(ihp_netgenrc): |
| 34 | + raise SystemError("Did not find {} under {}".format(ihp_netgenrc, open_pdks)) |
| 35 | +os.environ["OPENRAM_NETGENRC"] = ihp_netgenrc |
| 36 | + |
| 37 | +try: |
| 38 | + DRCLVS_HOME = os.path.abspath(os.environ.get("DRCLVS_HOME")) |
| 39 | +except: |
| 40 | + DRCLVS_HOME= "not-found" |
| 41 | +os.environ["DRCLVS_HOME"] = DRCLVS_HOME |
0 commit comments