From 56c2222c2b32dae3ef5b26d7dc999120ac942cad Mon Sep 17 00:00:00 2001 From: mrg Date: Tue, 10 Nov 2020 13:37:18 -0800 Subject: [PATCH] Temp comment Magic GDS filter code. --- compiler/verify/__init__.py | 18 ++++++------- compiler/verify/calibre.py | 3 ++- compiler/verify/magic.py | 54 ++++++++++++++++++------------------- 3 files changed, 38 insertions(+), 37 deletions(-) diff --git a/compiler/verify/__init__.py b/compiler/verify/__init__.py index 8b7a6233..136d6b45 100644 --- a/compiler/verify/__init__.py +++ b/compiler/verify/__init__.py @@ -29,15 +29,15 @@ if not OPTS.check_lvsdrc: OPTS.drc_exe = None OPTS.lvs_exe = None OPTS.pex_exe = None - if OPTS.tech_name == "sky130": - OPTS.magic_exe = None + # if OPTS.tech_name == "sky130": + # OPTS.magic_exe = None else: 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": - OPTS.magic_exe = get_tool("GDS", ["magic"]) + # if OPTS.tech_name == "sky130": + # OPTS.magic_exe = get_tool("GDS", ["magic"]) if not OPTS.drc_exe: from .none import run_drc, print_drc_stats, write_drc_script @@ -74,9 +74,9 @@ else: debug.warning("Did not find a supported PEX tool." + "Disable DRC/LVS with check_lvsdrc=False to ignore.", 2) -if OPTS.tech_name == "sky130": - if OPTS.magic_exe and "magic"==OPTS.magic_exe[0]: - from .magic import filter_gds - else: - debug.warning("Did not find Magic.") +# if OPTS.tech_name == "sky130": +# if OPTS.magic_exe and "magic"==OPTS.magic_exe[0]: +# from .magic import filter_gds +# else: +# debug.warning("Did not find Magic.") diff --git a/compiler/verify/calibre.py b/compiler/verify/calibre.py index 68a2af8a..d45cfe09 100644 --- a/compiler/verify/calibre.py +++ b/compiler/verify/calibre.py @@ -189,7 +189,8 @@ def run_drc(cell_name, gds_name, extract=False, final_verification=False): num_drc_runs += 1 # Filter the layouts through magic as a GDS filter for nsdm/psdm/nwell merging - if OPTS.tech_name == "sky130" and False: + # Disabled for now + if False and OPTS.tech_name == "sky130": shutil.copy(gds_name, OPTS.openram_temp + "temp.gds") from magic import filter_gds filter_gds(cell_name, OPTS.openram_temp + "temp.gds", OPTS.openram_temp + cell_name + ".gds") diff --git a/compiler/verify/magic.py b/compiler/verify/magic.py index 04d9a4ac..c2f13cc4 100644 --- a/compiler/verify/magic.py +++ b/compiler/verify/magic.py @@ -33,37 +33,37 @@ num_lvs_runs = 0 num_pex_runs = 0 -def filter_gds(cell_name, input_gds, output_gds): - """ Run the gds through magic for any layer processing """ - global OPTS +# def filter_gds(cell_name, input_gds, output_gds): +# """ Run the gds through magic for any layer processing """ +# global OPTS - # Copy .magicrc file into temp dir - magic_file = OPTS.openram_tech + "tech/.magicrc" - if os.path.exists(magic_file): - shutil.copy(magic_file, OPTS.openram_temp) - else: - debug.warning("Could not locate .magicrc file: {}".format(magic_file)) +# # Copy .magicrc file into temp dir +# magic_file = OPTS.openram_tech + "tech/.magicrc" +# if os.path.exists(magic_file): +# shutil.copy(magic_file, OPTS.openram_temp) +# else: +# debug.warning("Could not locate .magicrc file: {}".format(magic_file)) - run_file = OPTS.openram_temp + "run_filter.sh" - f = open(run_file, "w") - f.write("#!/bin/sh\n") - f.write("{} -dnull -noconsole << EOF\n".format(OPTS.magic_exe[1])) - f.write("gds polygon subcell true\n") - f.write("gds warning default\n") - f.write("gds read {}\n".format(input_gds)) - f.write("load {}\n".format(cell_name)) - f.write("cellname delete \\(UNNAMED\\)\n") - #f.write("writeall force\n") - f.write("select top cell\n") - f.write("gds write {}\n".format(output_gds)) - f.write("quit -noprompt\n") - f.write("EOF\n") +# run_file = OPTS.openram_temp + "run_filter.sh" +# f = open(run_file, "w") +# f.write("#!/bin/sh\n") +# f.write("{} -dnull -noconsole << EOF\n".format(OPTS.magic_exe[1])) +# f.write("gds polygon subcell true\n") +# f.write("gds warning default\n") +# f.write("gds read {}\n".format(input_gds)) +# f.write("load {}\n".format(cell_name)) +# f.write("cellname delete \\(UNNAMED\\)\n") +# #f.write("writeall force\n") +# f.write("select top cell\n") +# f.write("gds write {}\n".format(output_gds)) +# f.write("quit -noprompt\n") +# f.write("EOF\n") - f.close() - os.system("chmod u+x {}".format(run_file)) +# f.close() +# os.system("chmod u+x {}".format(run_file)) - (outfile, errfile, resultsfile) = run_script(cell_name, "filter") +# (outfile, errfile, resultsfile) = run_script(cell_name, "filter") def write_drc_script(cell_name, gds_name, extract, final_verification, output_path): @@ -71,7 +71,7 @@ def write_drc_script(cell_name, gds_name, extract, final_verification, output_pa global OPTS - # Copy .magicrc file into the directory + # Copy .magicrc file into the output directory magic_file = OPTS.openram_tech + "tech/.magicrc" if os.path.exists(magic_file): shutil.copy(magic_file, output_path)