mirror of https://github.com/VLSIDA/OpenRAM.git
Remove tools from tech file and have search order preference like spice.
This commit is contained in:
parent
3e0f39cd8e
commit
257cd62d25
|
|
@ -115,11 +115,13 @@ def init_openram(config_file):
|
|||
|
||||
set_spice()
|
||||
|
||||
set_drc()
|
||||
|
||||
set_lvs()
|
||||
|
||||
set_pex()
|
||||
global OPTS
|
||||
OPTS.drc_exe = get_tool("DRC",["calibre","magic"])
|
||||
OPTS.lvs_exe = get_tool("LVS",["calibre","netgen"])
|
||||
OPTS.pex_exe = get_tool("PEX",["calibre","magic"])
|
||||
#set_drc()
|
||||
#set_lvs()
|
||||
#set_pex()
|
||||
|
||||
|
||||
def read_config(config_file):
|
||||
|
|
@ -168,59 +170,25 @@ def find_exe(check_exe):
|
|||
return exe
|
||||
return None
|
||||
|
||||
|
||||
def set_drc():
|
||||
debug.info(2,"Finding DRC tool...")
|
||||
def get_tool(tool_type, preferences):
|
||||
"""
|
||||
Find which tool we have from a list of preferences and return the full path.
|
||||
"""
|
||||
debug.info(2,"Finding {} tool...".format(tool_type))
|
||||
global OPTS
|
||||
|
||||
if not OPTS.check_lvsdrc:
|
||||
debug.info(1,"LVS/DRC/PEX disabled.")
|
||||
return
|
||||
else:
|
||||
import tech
|
||||
if tech.drc_version != "":
|
||||
OPTS.drc_exe=find_exe(tech.drc_version)
|
||||
if OPTS.drc_exe==None:
|
||||
debug.warning("{0} not found. Unable to perform DRC.".format(tech.drc_version))
|
||||
OPTS.check_lvsdrc = False
|
||||
for name in preferences:
|
||||
exe_name = find_exe(name)
|
||||
if exe_name!=None:
|
||||
debug.info(1, "Using {0}: {1}".format(tool_type,exe_name))
|
||||
return(exe_name)
|
||||
else:
|
||||
debug.info(1, "Using DRC: " + OPTS.drc_exe)
|
||||
|
||||
|
||||
def set_lvs():
|
||||
debug.info(2,"Finding LVS tool...")
|
||||
global OPTS
|
||||
|
||||
if not OPTS.check_lvsdrc:
|
||||
debug.info(1,"LVS/DRC/PEX disabled.")
|
||||
return
|
||||
else:
|
||||
import tech
|
||||
if tech.lvs_version != "":
|
||||
OPTS.lvs_exe=find_exe(tech.lvs_version)
|
||||
if OPTS.lvs_exe==None:
|
||||
debug.warning("{0} not found. Unable to perform LVS.".format(tech.lvs_version))
|
||||
OPTS.check_lvsdrc = False
|
||||
else:
|
||||
debug.info(1, "Using LVS: " + OPTS.lvs_exe)
|
||||
|
||||
def set_pex():
|
||||
debug.info(2,"Finding PEX tool...")
|
||||
global OPTS
|
||||
|
||||
if not OPTS.check_lvsdrc:
|
||||
debug.info(1,"LVS/DRC/PEX disabled.")
|
||||
return
|
||||
else:
|
||||
import tech
|
||||
if tech.pex_version != "":
|
||||
OPTS.pex_exe=find_exe(tech.pex_version)
|
||||
if OPTS.pex_exe==None:
|
||||
debug.warning("{0} not found. Unable to perform PEX.".format(tech.pex_version))
|
||||
OPTS.check_lvsdrc = False
|
||||
else:
|
||||
debug.info(1, "Using PEX: " + OPTS.pex_exe)
|
||||
|
||||
debug.info(1, "Could not find {0}, trying next {1} tool.".format(name,tool_type))
|
||||
|
||||
def end_openram():
|
||||
""" Clean up openram for a proper exit """
|
||||
cleanup_paths()
|
||||
|
|
|
|||
|
|
@ -16,8 +16,6 @@ import re
|
|||
import importlib
|
||||
import globals
|
||||
|
||||
global OPTS
|
||||
|
||||
(OPTS, args) = globals.parse_args()
|
||||
|
||||
def print_time(name, now_time, last_time=None):
|
||||
|
|
|
|||
|
|
@ -10,25 +10,27 @@ If not, OpenRAM will continue as if nothing happened!
|
|||
|
||||
import debug
|
||||
import tech
|
||||
from globals import OPTS
|
||||
|
||||
if tech.drc_version=="calibre":
|
||||
|
||||
if "calibre" in OPTS.drc_exe:
|
||||
from calibre import run_drc
|
||||
elif tech.drc_version=="magic":
|
||||
elif "magic" in OPTS.drc_exe:
|
||||
from magic import run_drc
|
||||
else:
|
||||
debug.warning("Did not find a supported DRC tool.")
|
||||
|
||||
if tech.lvs_version=="calibre":
|
||||
if "calibre" in OPTS.lvs_exe:
|
||||
from calibre import run_lvs
|
||||
elif tech.lvs_version=="netgen":
|
||||
elif "netgen" in OPTS.lvs_exe:
|
||||
from magic import run_lvs
|
||||
else:
|
||||
debug.warning("Did not find a supported LVS tool.")
|
||||
|
||||
|
||||
if tech.pex_version=="calibre":
|
||||
if "calibre" in OPTS.pex_exe:
|
||||
from calibre import run_pex
|
||||
elif tech.pex_version=="magic":
|
||||
elif "magic" in OPTS.pex_exe:
|
||||
from magic import run_pex
|
||||
else:
|
||||
debug.warning("Did not find a supported PEX tool.")
|
||||
|
|
|
|||
|
|
@ -17,10 +17,6 @@ GDS["unit"] = (0.0005,1e-9)
|
|||
# default label zoom
|
||||
GDS["zoom"] = 0.05
|
||||
|
||||
drc_version = "calibre"
|
||||
lvs_version = "calibre"
|
||||
pex_version = "calibre"
|
||||
|
||||
###################################################
|
||||
##GDS Layer Map
|
||||
###################################################
|
||||
|
|
|
|||
|
|
@ -17,10 +17,6 @@ GDS["unit"]=(0.001,1e-6)
|
|||
# default label zoom
|
||||
GDS["zoom"] = 0.5
|
||||
|
||||
drc_version = "magic"
|
||||
lvs_version = "netgen"
|
||||
pex_version = "magic"
|
||||
|
||||
|
||||
###################################################
|
||||
##GDS Layer Map
|
||||
|
|
|
|||
Loading…
Reference in New Issue