2017-11-14 23:59:14 +01:00
|
|
|
"""
|
|
|
|
|
This is a module that will import the correct DRC/LVS/PEX
|
|
|
|
|
module based on what tools are found. It is a layer of indirection
|
|
|
|
|
to enable multiple verification tool support.
|
|
|
|
|
|
|
|
|
|
Each DRC/LVS/PEX tool should implement the functions run_drc, run_lvs, and
|
|
|
|
|
run_pex, repsectively. If there is an error, they should abort and report the errors.
|
|
|
|
|
If not, OpenRAM will continue as if nothing happened!
|
|
|
|
|
"""
|
|
|
|
|
|
2017-11-16 02:02:53 +01:00
|
|
|
import os
|
2017-11-14 23:59:14 +01:00
|
|
|
import debug
|
2017-11-16 02:02:53 +01:00
|
|
|
from globals import OPTS,find_exe,get_tool
|
2017-11-14 23:59:14 +01:00
|
|
|
|
2017-11-16 02:02:53 +01:00
|
|
|
debug.info(2,"Initializing verify...")
|
|
|
|
|
|
|
|
|
|
if not OPTS.check_lvsdrc:
|
|
|
|
|
debug.info(1,"LVS/DRC/PEX disabled.")
|
|
|
|
|
drc_exe = None
|
|
|
|
|
lvs_exe = None
|
|
|
|
|
pex_exe = None
|
|
|
|
|
else:
|
|
|
|
|
drc_exe = get_tool("DRC",["calibre","assura","magic"])
|
|
|
|
|
lvs_exe = get_tool("LVS",["calibre","assura","netgen"])
|
|
|
|
|
pex_exe = get_tool("PEX",["calibre","magic"])
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if drc_exe == None:
|
2017-11-15 00:31:58 +01:00
|
|
|
pass
|
2017-11-16 02:02:53 +01:00
|
|
|
elif "calibre" in drc_exe:
|
2017-11-14 23:59:14 +01:00
|
|
|
from calibre import run_drc
|
2017-11-16 02:02:53 +01:00
|
|
|
elif "assura" in drc_exe:
|
2017-11-15 21:07:10 +01:00
|
|
|
from assura import run_drc
|
2017-11-16 02:02:53 +01:00
|
|
|
elif "magic" in drc_exe:
|
2017-11-14 23:59:14 +01:00
|
|
|
from magic import run_drc
|
|
|
|
|
else:
|
|
|
|
|
debug.warning("Did not find a supported DRC tool.")
|
|
|
|
|
|
2017-11-16 02:02:53 +01:00
|
|
|
if lvs_exe == None:
|
2017-11-15 00:31:58 +01:00
|
|
|
pass
|
2017-11-16 02:02:53 +01:00
|
|
|
elif "calibre" in lvs_exe:
|
2017-11-14 23:59:14 +01:00
|
|
|
from calibre import run_lvs
|
2017-11-16 02:02:53 +01:00
|
|
|
elif "assura" in lvs_exe:
|
2017-11-15 21:07:10 +01:00
|
|
|
from assura import run_lvs
|
2017-11-16 02:02:53 +01:00
|
|
|
elif "netgen" in lvs_exe:
|
2017-11-14 23:59:14 +01:00
|
|
|
from magic import run_lvs
|
|
|
|
|
else:
|
|
|
|
|
debug.warning("Did not find a supported LVS tool.")
|
|
|
|
|
|
|
|
|
|
|
2017-11-16 02:02:53 +01:00
|
|
|
if pex_exe == None:
|
2017-11-15 00:31:58 +01:00
|
|
|
pass
|
2017-11-16 02:02:53 +01:00
|
|
|
elif "calibre" in pex_exe:
|
2017-11-14 23:59:14 +01:00
|
|
|
from calibre import run_pex
|
2017-11-16 02:02:53 +01:00
|
|
|
elif "magic" in pex_exe:
|
2017-11-14 23:59:14 +01:00
|
|
|
from magic import run_pex
|
|
|
|
|
else:
|
|
|
|
|
debug.warning("Did not find a supported PEX tool.")
|
|
|
|
|
|