mirror of https://github.com/VLSIDA/OpenRAM.git
Add DRC/LVS/PEX statistics in verbose=1 mode
This commit is contained in:
parent
f894ef47af
commit
58646ab8e6
|
|
@ -30,4 +30,10 @@ suite.addTests(map(load, modules))
|
||||||
|
|
||||||
test_runner = unittest.TextTestRunner(verbosity=2,stream=sys.stderr)
|
test_runner = unittest.TextTestRunner(verbosity=2,stream=sys.stderr)
|
||||||
test_result = test_runner.run(suite)
|
test_result = test_runner.run(suite)
|
||||||
|
|
||||||
|
import verify
|
||||||
|
verify.print_drc_stats()
|
||||||
|
verify.print_lvs_stats()
|
||||||
|
verify.print_pex_stats()
|
||||||
|
|
||||||
sys.exit(not test_result.wasSuccessful())
|
sys.exit(not test_result.wasSuccessful())
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@ import debug
|
||||||
from globals import OPTS,find_exe,get_tool
|
from globals import OPTS,find_exe,get_tool
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
debug.info(2,"Initializing verify...")
|
debug.info(1,"Initializing verify...")
|
||||||
|
|
||||||
if not OPTS.check_lvsdrc:
|
if not OPTS.check_lvsdrc:
|
||||||
debug.info(1,"LVS/DRC/PEX disabled.")
|
debug.info(1,"LVS/DRC/PEX disabled.")
|
||||||
|
|
@ -21,6 +21,7 @@ if not OPTS.check_lvsdrc:
|
||||||
OPTS.lvs_exe = None
|
OPTS.lvs_exe = None
|
||||||
OPTS.pex_exe = None
|
OPTS.pex_exe = None
|
||||||
else:
|
else:
|
||||||
|
debug.info(1, "Finding DRC/LVS/PEX tools.")
|
||||||
OPTS.drc_exe = get_tool("DRC",["calibre","assura","magic"])
|
OPTS.drc_exe = get_tool("DRC",["calibre","assura","magic"])
|
||||||
OPTS.lvs_exe = get_tool("LVS",["calibre","assura","netgen"])
|
OPTS.lvs_exe = get_tool("LVS",["calibre","assura","netgen"])
|
||||||
OPTS.pex_exe = get_tool("PEX",["calibre","magic"])
|
OPTS.pex_exe = get_tool("PEX",["calibre","magic"])
|
||||||
|
|
@ -31,22 +32,22 @@ if OPTS.check_lvsdrc and OPTS.tech_name == "freepdk45":
|
||||||
if OPTS.drc_exe == None:
|
if OPTS.drc_exe == None:
|
||||||
pass
|
pass
|
||||||
elif "calibre"==OPTS.drc_exe[0]:
|
elif "calibre"==OPTS.drc_exe[0]:
|
||||||
from .calibre import run_drc
|
from .calibre import run_drc,print_drc_stats
|
||||||
elif "assura"==OPTS.drc_exe[0]:
|
elif "assura"==OPTS.drc_exe[0]:
|
||||||
from .assura import run_drc
|
from .assura import run_drc,print_drc_stats
|
||||||
elif "magic"==OPTS.drc_exe[0]:
|
elif "magic"==OPTS.drc_exe[0]:
|
||||||
from .magic import run_drc
|
from .magic import run_drc,print_drc_stats
|
||||||
else:
|
else:
|
||||||
debug.warning("Did not find a supported DRC tool.")
|
debug.warning("Did not find a supported DRC tool.")
|
||||||
|
|
||||||
if OPTS.lvs_exe == None:
|
if OPTS.lvs_exe == None:
|
||||||
pass
|
pass
|
||||||
elif "calibre"==OPTS.lvs_exe[0]:
|
elif "calibre"==OPTS.lvs_exe[0]:
|
||||||
from .calibre import run_lvs
|
from .calibre import run_lvs,print_lvs_stats
|
||||||
elif "assura"==OPTS.lvs_exe[0]:
|
elif "assura"==OPTS.lvs_exe[0]:
|
||||||
from .assura import run_lvs
|
from .assura import run_lvs,print_lvs_stats
|
||||||
elif "netgen"==OPTS.lvs_exe[0]:
|
elif "netgen"==OPTS.lvs_exe[0]:
|
||||||
from .magic import run_lvs
|
from .magic import run_lvs,print_lvs_stats
|
||||||
else:
|
else:
|
||||||
debug.warning("Did not find a supported LVS tool.")
|
debug.warning("Did not find a supported LVS tool.")
|
||||||
|
|
||||||
|
|
@ -54,9 +55,9 @@ else:
|
||||||
if OPTS.pex_exe == None:
|
if OPTS.pex_exe == None:
|
||||||
pass
|
pass
|
||||||
elif "calibre"==OPTS.pex_exe[0]:
|
elif "calibre"==OPTS.pex_exe[0]:
|
||||||
from .calibre import run_pex
|
from .calibre import run_pex,print_pex_stats
|
||||||
elif "magic"==OPTS.pex_exe[0]:
|
elif "magic"==OPTS.pex_exe[0]:
|
||||||
from .magic import run_pex
|
from .magic import run_pex,print_pex_stats
|
||||||
else:
|
else:
|
||||||
debug.warning("Did not find a supported PEX tool.")
|
debug.warning("Did not find a supported PEX tool.")
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -25,10 +25,18 @@ import time
|
||||||
import debug
|
import debug
|
||||||
from globals import OPTS
|
from globals import OPTS
|
||||||
|
|
||||||
|
# Keep track of statistics
|
||||||
|
num_drc_runs = 0
|
||||||
|
num_lvs_runs = 0
|
||||||
|
num_pex_runs = 0
|
||||||
|
|
||||||
def run_drc(name, gds_name):
|
def run_drc(name, gds_name):
|
||||||
"""Run DRC check on a given top-level name which is
|
"""Run DRC check on a given top-level name which is
|
||||||
implemented in gds_name."""
|
implemented in gds_name."""
|
||||||
|
|
||||||
|
global num_drc_runs
|
||||||
|
num_drc_runs += 1
|
||||||
|
|
||||||
from tech import drc
|
from tech import drc
|
||||||
drc_rules = drc["drc_rules"]
|
drc_rules = drc["drc_rules"]
|
||||||
drc_runset = OPTS.openram_temp + name + ".rsf"
|
drc_runset = OPTS.openram_temp + name + ".rsf"
|
||||||
|
|
@ -88,6 +96,10 @@ def run_drc(name, gds_name):
|
||||||
def run_lvs(name, gds_name, sp_name):
|
def run_lvs(name, gds_name, sp_name):
|
||||||
"""Run LVS check on a given top-level name which is
|
"""Run LVS check on a given top-level name which is
|
||||||
implemented in gds_name and sp_name. """
|
implemented in gds_name and sp_name. """
|
||||||
|
|
||||||
|
global num_lvs_runs
|
||||||
|
num_lvs_runs += 1
|
||||||
|
|
||||||
from tech import drc
|
from tech import drc
|
||||||
lvs_rules = drc["lvs_rules"]
|
lvs_rules = drc["lvs_rules"]
|
||||||
lvs_runset = OPTS.openram_temp + name + ".rsf"
|
lvs_runset = OPTS.openram_temp + name + ".rsf"
|
||||||
|
|
@ -170,3 +182,13 @@ def run_pex(name, gds_name, sp_name, output=None):
|
||||||
"""Run pex on a given top-level name which is
|
"""Run pex on a given top-level name which is
|
||||||
implemented in gds_name and sp_name. """
|
implemented in gds_name and sp_name. """
|
||||||
debug.error("PEX extraction not implemented with Assura.",-1)
|
debug.error("PEX extraction not implemented with Assura.",-1)
|
||||||
|
|
||||||
|
global num_pex_runs
|
||||||
|
num_pex_runs += 1
|
||||||
|
|
||||||
|
def print_drc_stats():
|
||||||
|
debug.info(1,"DRC runs: {0}".format(num_drc_runs))
|
||||||
|
def print_lvs_stats():
|
||||||
|
debug.info(1,"LVS runs: {0}".format(num_lvs_runs))
|
||||||
|
def print_pex_stats():
|
||||||
|
debug.info(1,"PEX runs: {0}".format(num_pex_runs))
|
||||||
|
|
|
||||||
|
|
@ -65,11 +65,18 @@ import debug
|
||||||
from globals import OPTS
|
from globals import OPTS
|
||||||
import subprocess
|
import subprocess
|
||||||
|
|
||||||
|
# Keep track of statistics
|
||||||
|
num_drc_runs = 0
|
||||||
|
num_lvs_runs = 0
|
||||||
|
num_pex_runs = 0
|
||||||
|
|
||||||
def run_drc(cell_name, gds_name):
|
def run_drc(cell_name, gds_name):
|
||||||
"""Run DRC check on a given top-level name which is
|
"""Run DRC check on a given top-level name which is
|
||||||
implemented in gds_name."""
|
implemented in gds_name."""
|
||||||
|
|
||||||
|
global num_drc_runs
|
||||||
|
num_drc_runs += 1
|
||||||
|
|
||||||
# the runset file contains all the options to run calibre
|
# the runset file contains all the options to run calibre
|
||||||
from tech import drc
|
from tech import drc
|
||||||
drc_rules = drc["drc_rules"]
|
drc_rules = drc["drc_rules"]
|
||||||
|
|
@ -142,6 +149,9 @@ def run_lvs(cell_name, gds_name, sp_name, final_verification=False):
|
||||||
implemented in gds_name and sp_name. Final verification will
|
implemented in gds_name and sp_name. Final verification will
|
||||||
ensure that there are no remaining virtual conections. """
|
ensure that there are no remaining virtual conections. """
|
||||||
|
|
||||||
|
global num_lvs_runs
|
||||||
|
num_lvs_runs += 1
|
||||||
|
|
||||||
from tech import drc
|
from tech import drc
|
||||||
lvs_rules = drc["lvs_rules"]
|
lvs_rules = drc["lvs_rules"]
|
||||||
lvs_runset = {
|
lvs_runset = {
|
||||||
|
|
@ -258,6 +268,10 @@ def run_lvs(cell_name, gds_name, sp_name, final_verification=False):
|
||||||
def run_pex(cell_name, gds_name, sp_name, output=None):
|
def run_pex(cell_name, gds_name, sp_name, output=None):
|
||||||
"""Run pex on a given top-level name which is
|
"""Run pex on a given top-level name which is
|
||||||
implemented in gds_name and sp_name. """
|
implemented in gds_name and sp_name. """
|
||||||
|
|
||||||
|
global num_pex_runs
|
||||||
|
num_pex_runs += 1
|
||||||
|
|
||||||
from tech import drc
|
from tech import drc
|
||||||
if output == None:
|
if output == None:
|
||||||
output = name + ".pex.netlist"
|
output = name + ".pex.netlist"
|
||||||
|
|
@ -354,3 +368,10 @@ def correct_port(name, output_file_name, ref_file_name):
|
||||||
output_file.write(circuit_title)
|
output_file.write(circuit_title)
|
||||||
output_file.write(part2)
|
output_file.write(part2)
|
||||||
output_file.close()
|
output_file.close()
|
||||||
|
|
||||||
|
def print_drc_stats():
|
||||||
|
debug.info(1,"DRC runs: {0}".format(num_drc_runs))
|
||||||
|
def print_lvs_stats():
|
||||||
|
debug.info(1,"LVS runs: {0}".format(num_lvs_runs))
|
||||||
|
def print_pex_stats():
|
||||||
|
debug.info(1,"PEX runs: {0}".format(num_pex_runs))
|
||||||
|
|
|
||||||
|
|
@ -64,6 +64,11 @@ import debug
|
||||||
from globals import OPTS
|
from globals import OPTS
|
||||||
import subprocess
|
import subprocess
|
||||||
|
|
||||||
|
# Keep track of statistics
|
||||||
|
num_drc_runs = 0
|
||||||
|
num_lvs_runs = 0
|
||||||
|
num_pex_runs = 0
|
||||||
|
|
||||||
def write_magic_script(cell_name, gds_name, extract=False):
|
def write_magic_script(cell_name, gds_name, extract=False):
|
||||||
""" Write a magic script to perform DRC and optionally extraction. """
|
""" Write a magic script to perform DRC and optionally extraction. """
|
||||||
|
|
||||||
|
|
@ -148,6 +153,9 @@ def write_netgen_script(cell_name, sp_name):
|
||||||
def run_drc(cell_name, gds_name, extract=False):
|
def run_drc(cell_name, gds_name, extract=False):
|
||||||
"""Run DRC check on a cell which is implemented in gds_name."""
|
"""Run DRC check on a cell which is implemented in gds_name."""
|
||||||
|
|
||||||
|
global num_drc_runs
|
||||||
|
num_drc_runs += 1
|
||||||
|
|
||||||
write_magic_script(cell_name, gds_name, extract)
|
write_magic_script(cell_name, gds_name, extract)
|
||||||
|
|
||||||
# run drc
|
# run drc
|
||||||
|
|
@ -198,6 +206,9 @@ def run_lvs(cell_name, gds_name, sp_name, final_verification=False):
|
||||||
implemented in gds_name and sp_name. Final verification will
|
implemented in gds_name and sp_name. Final verification will
|
||||||
ensure that there are no remaining virtual conections. """
|
ensure that there are no remaining virtual conections. """
|
||||||
|
|
||||||
|
global num_lvs_runs
|
||||||
|
num_lvs_runs += 1
|
||||||
|
|
||||||
run_drc(cell_name, gds_name, extract=True)
|
run_drc(cell_name, gds_name, extract=True)
|
||||||
write_netgen_script(cell_name, sp_name)
|
write_netgen_script(cell_name, sp_name)
|
||||||
|
|
||||||
|
|
@ -270,6 +281,9 @@ def run_pex(name, gds_name, sp_name, output=None):
|
||||||
"""Run pex on a given top-level name which is
|
"""Run pex on a given top-level name which is
|
||||||
implemented in gds_name and sp_name. """
|
implemented in gds_name and sp_name. """
|
||||||
|
|
||||||
|
global num_pex_runs
|
||||||
|
num_pex_runs += 1
|
||||||
|
|
||||||
debug.warning("PEX using magic not implemented.")
|
debug.warning("PEX using magic not implemented.")
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
|
|
@ -337,3 +351,9 @@ def run_pex(name, gds_name, sp_name, output=None):
|
||||||
|
|
||||||
return out_errors
|
return out_errors
|
||||||
|
|
||||||
|
def print_drc_stats():
|
||||||
|
debug.info(1,"DRC runs: {0}".format(num_drc_runs))
|
||||||
|
def print_lvs_stats():
|
||||||
|
debug.info(1,"LVS runs: {0}".format(num_lvs_runs))
|
||||||
|
def print_pex_stats():
|
||||||
|
debug.info(1,"PEX runs: {0}".format(num_pex_runs))
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue