Add parameters to give preference to DRC/LVS/PEX tools like we do for spice.

This commit is contained in:
Matt Guthaus 2018-08-28 13:41:26 -07:00
parent 309bfaea2a
commit e804f36bec
3 changed files with 29 additions and 16 deletions

View File

@ -142,13 +142,22 @@ def init_openram(config_file, is_unit_test=True):
def get_tool(tool_type, preferences):
def get_tool(tool_type, preferences, default_name=None):
"""
Find which tool we have from a list of preferences and return the
one selected and its full path.
one selected and its full path. If default is specified,
find that one only and error otherwise.
"""
debug.info(2,"Finding {} tool...".format(tool_type))
if default_name:
exe_name=find_exe(default_name)
if exe_name == None:
debug.error("{0} not found. Cannot find {1} tool.".format(default_name,tool_type),2)
else:
debug.info(1, "Using {0}: {1}".format(tool_type,exe_name))
return(default_name,exe_name)
else:
for name in preferences:
exe_name = find_exe(name)
if exe_name != None:

View File

@ -24,14 +24,18 @@ class options(optparse.Values):
check_lvsdrc = True
# Variable to select the variant of spice
spice_name = ""
# Should we print out the banner at startup
print_banner = True
# The spice executable being used which is derived from the user PATH.
spice_exe = ""
# Variable to select the variant of drc, lvs, pex
drc_name = ""
lvs_name = ""
pex_name = ""
# The DRC/LVS/PEX executable being used which is derived from the user PATH.
drc_exe = None
lvs_exe = None
pex_exe = None
# The spice executable being used which is derived from the user PATH.
spice_exe = ""
# Should we print out the banner at startup
print_banner = True
# Run with extracted parasitics
use_pex = False
# Remove noncritical memory cells for characterization speed-up

View File

@ -22,9 +22,9 @@ if not OPTS.check_lvsdrc:
OPTS.pex_exe = None
else:
debug.info(1, "Finding DRC/LVS/PEX tools.")
OPTS.drc_exe = get_tool("DRC",["calibre","assura","magic"])
OPTS.lvs_exe = get_tool("LVS",["calibre","assura","netgen"])
OPTS.pex_exe = get_tool("PEX",["calibre","magic"])
OPTS.drc_exe = get_tool("DRC", ["calibre","assura","magic"], OPTS.drc_name)
OPTS.lvs_exe = get_tool("LVS", ["calibre","assura","netgen"], OPTS.lvs_name)
OPTS.pex_exe = get_tool("PEX", ["calibre","magic"], OPTS.pex_name)
if OPTS.check_lvsdrc and OPTS.tech_name == "freepdk45":
debug.check(OPTS.drc_exe[0]!="magic","Magic does not support FreePDK45 for DRC.")