2019-04-26 21:21:50 +02:00
|
|
|
# See LICENSE for licensing information.
|
|
|
|
|
#
|
2019-06-14 17:43:41 +02:00
|
|
|
# Copyright (c) 2016-2019 Regents of the University of California and The Board
|
|
|
|
|
# of Regents for the Oklahoma Agricultural and Mechanical College
|
|
|
|
|
# (acting for and on behalf of Oklahoma State University)
|
|
|
|
|
# All rights reserved.
|
2019-04-26 21:21:50 +02:00
|
|
|
#
|
2017-11-14 23:59:14 +01:00
|
|
|
"""
|
2020-11-03 15:29:17 +01:00
|
|
|
This is a module that will import the correct DRC/LVS/PEX
|
2017-11-14 23:59:14 +01:00
|
|
|
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!
|
|
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
import debug
|
2019-11-29 21:01:33 +01:00
|
|
|
from globals import OPTS
|
|
|
|
|
from globals import get_tool
|
|
|
|
|
from tech import drc_name
|
|
|
|
|
from tech import lvs_name
|
|
|
|
|
from tech import pex_name
|
2017-11-14 23:59:14 +01:00
|
|
|
|
2020-06-15 22:58:26 +02:00
|
|
|
debug.info(1, "Initializing verify...")
|
2017-11-16 02:02:53 +01:00
|
|
|
|
|
|
|
|
if not OPTS.check_lvsdrc:
|
2020-06-15 22:58:26 +02:00
|
|
|
debug.info(1, "LVS/DRC/PEX disabled.")
|
2018-01-12 23:39:42 +01:00
|
|
|
OPTS.drc_exe = None
|
|
|
|
|
OPTS.lvs_exe = None
|
|
|
|
|
OPTS.pex_exe = None
|
2020-07-13 23:59:31 +02:00
|
|
|
if OPTS.tech_name == "sky130":
|
|
|
|
|
OPTS.magic_exe = None
|
2017-11-16 02:02:53 +01:00
|
|
|
else:
|
2020-06-15 22:58:26 +02:00
|
|
|
debug.info(1, "Finding DRC/LVS/PEX tools.")
|
|
|
|
|
OPTS.drc_exe = get_tool("DRC", ["calibre", "assura", "magic"], drc_name)
|
|
|
|
|
OPTS.lvs_exe = get_tool("LVS", ["calibre", "assura", "netgen"], lvs_name)
|
|
|
|
|
OPTS.pex_exe = get_tool("PEX", ["calibre", "magic"], pex_name)
|
|
|
|
|
if OPTS.tech_name == "sky130":
|
2020-07-13 23:59:31 +02:00
|
|
|
OPTS.magic_exe = get_tool("GDS", ["magic"])
|
2017-11-16 02:02:53 +01:00
|
|
|
|
2020-06-15 22:58:26 +02:00
|
|
|
if not OPTS.drc_exe:
|
2020-11-09 22:59:46 +01:00
|
|
|
from .none import run_drc, print_drc_stats, write_drc_script
|
2018-01-12 23:50:35 +01:00
|
|
|
elif "calibre"==OPTS.drc_exe[0]:
|
2020-11-09 20:12:31 +01:00
|
|
|
from .calibre import run_drc, print_drc_stats, write_drc_script
|
2018-01-12 23:50:35 +01:00
|
|
|
elif "assura"==OPTS.drc_exe[0]:
|
2020-11-09 20:12:31 +01:00
|
|
|
from .assura import run_drc, print_drc_stats, write_drc_script
|
2018-01-12 23:50:35 +01:00
|
|
|
elif "magic"==OPTS.drc_exe[0]:
|
2020-11-09 20:12:31 +01:00
|
|
|
from .magic import run_drc, print_drc_stats, write_drc_script
|
2017-11-14 23:59:14 +01:00
|
|
|
else:
|
2020-11-04 00:47:04 +01:00
|
|
|
debug.error("Did not find a supported DRC tool."
|
|
|
|
|
+ "Disable DRC/LVS with check_lvsdrc=False to ignore.", 2)
|
2017-11-14 23:59:14 +01:00
|
|
|
|
2020-06-15 22:58:26 +02:00
|
|
|
if not OPTS.lvs_exe:
|
2020-11-09 20:12:31 +01:00
|
|
|
from .none import run_lvs, print_lvs_stats, write_lvs_script
|
2018-01-12 23:50:35 +01:00
|
|
|
elif "calibre"==OPTS.lvs_exe[0]:
|
2020-11-09 20:12:31 +01:00
|
|
|
from .calibre import run_lvs, print_lvs_stats, write_lvs_script
|
2018-01-12 23:50:35 +01:00
|
|
|
elif "assura"==OPTS.lvs_exe[0]:
|
2020-11-09 20:12:31 +01:00
|
|
|
from .assura import run_lvs, print_lvs_stats, write_lvs_script
|
2018-01-12 23:50:35 +01:00
|
|
|
elif "netgen"==OPTS.lvs_exe[0]:
|
2020-11-09 20:12:31 +01:00
|
|
|
from .magic import run_lvs, print_lvs_stats, write_lvs_script
|
2017-11-14 23:59:14 +01:00
|
|
|
else:
|
2020-11-04 00:47:04 +01:00
|
|
|
debug.warning("Did not find a supported LVS tool."
|
|
|
|
|
+ "Disable DRC/LVS with check_lvsdrc=False to ignore.", 2)
|
2017-11-14 23:59:14 +01:00
|
|
|
|
|
|
|
|
|
2020-06-15 22:58:26 +02:00
|
|
|
if not OPTS.pex_exe:
|
2020-11-09 20:12:31 +01:00
|
|
|
from .none import run_pex, print_pex_stats
|
2018-01-12 23:50:35 +01:00
|
|
|
elif "calibre"==OPTS.pex_exe[0]:
|
2020-11-09 20:12:31 +01:00
|
|
|
from .calibre import run_pex, print_pex_stats
|
2018-01-12 23:50:35 +01:00
|
|
|
elif "magic"==OPTS.pex_exe[0]:
|
2020-11-09 20:12:31 +01:00
|
|
|
from .magic import run_pex, print_pex_stats
|
2017-11-14 23:59:14 +01:00
|
|
|
else:
|
2020-11-04 00:47:04 +01:00
|
|
|
debug.warning("Did not find a supported PEX tool."
|
|
|
|
|
+ "Disable DRC/LVS with check_lvsdrc=False to ignore.", 2)
|
2020-06-15 22:58:26 +02:00
|
|
|
|
|
|
|
|
if OPTS.tech_name == "sky130":
|
2020-07-13 23:59:31 +02:00
|
|
|
if OPTS.magic_exe and "magic"==OPTS.magic_exe[0]:
|
2020-06-15 22:58:26 +02:00
|
|
|
from .magic import filter_gds
|
|
|
|
|
else:
|
|
|
|
|
debug.warning("Did not find Magic.")
|
2020-11-03 15:29:17 +01:00
|
|
|
|