Update unit tests to load verify after config file. Start magic DRC.

This commit is contained in:
Matt Guthaus 2018-01-12 10:24:49 -08:00
parent e0a6b59773
commit 7a172873a3
55 changed files with 131 additions and 284 deletions

View File

@ -102,6 +102,7 @@ def init_openram(config_file):
import_tech()
def get_tool(tool_type, preferences):
"""
Find which tool we have from a list of preferences and return the

View File

@ -13,7 +13,6 @@ class options(optparse.Values):
tech_name = ""
# This is the temp directory where all intermediate results are stored.
openram_temp = "/tmp/openram_{0}_{1}_temp/".format(getpass.getuser(),os.getpid())
#openram_temp = "/tmp/openram_temp/"
# This is the verbosity level to control debug information. 0 is none, 1
# is minimal, etc.
debug_level = 0

View File

@ -2,15 +2,10 @@
import unittest
from testutils import header
import sys,os
import sys,os,re
sys.path.append(os.path.join(sys.path[0],".."))
import globals
import debug
import verify
import re
#@unittest.skip("SKIPPING 00_format check test")
class code_format_test(unittest.TestCase):
"Run a test to check for tabs instead of spaces in the all source files."

View File

@ -3,22 +3,17 @@
import unittest
from testutils import header
import sys,os
import sys,os,re
sys.path.append(os.path.join(sys.path[0],".."))
import globals
from globals import OPTS
import debug
import verify
import re
OPTS = globals.OPTS
#@unittest.skip("SKIPPING 01_library_drc_test")
class library_drc_test(unittest.TestCase):
def runTest(self):
globals.init_openram("config_20_{0}".format(OPTS.tech_name))
import verify
(gds_dir, gds_files) = setup_files()
drc_errors = 0

View File

@ -3,23 +3,17 @@
import unittest
from testutils import header
import sys,os
import sys,os,re
sys.path.append(os.path.join(sys.path[0],".."))
import globals
from globals import OPTS
import debug
import verify
import re
OPTS = globals.OPTS
#@unittest.skip("SKIPPING 02_lvs_test")
class library_lvs_test(unittest.TestCase):
def runTest(self):
globals.init_openram("config_20_{0}".format(OPTS.tech_name))
import verify
(gds_dir, sp_dir, allnames) = setup_files()
lvs_errors = 0
debug.info(1, "Performing LVS on: " + ", ".join(allnames))

View File

@ -6,18 +6,15 @@ from testutils import header
import sys,os
sys.path.append(os.path.join(sys.path[0],".."))
import globals
from globals import OPTS
import debug
import verify
OPTS = globals.OPTS
#@unittest.skip("SKIPPING 03_contact_test")
class contact_test(unittest.TestCase):
def runTest(self):
globals.init_openram("config_20_{0}".format(OPTS.tech_name))
global verify
import verify
OPTS.check_lvsdrc = False
import contact

View File

@ -6,18 +6,15 @@ from testutils import header
import sys,os
sys.path.append(os.path.join(sys.path[0],".."))
import globals
from globals import OPTS
import debug
import verify
OPTS = globals.OPTS
#@unittest.skip("SKIPPING 03_path_test")
class path_test(unittest.TestCase):
def runTest(self):
globals.init_openram("config_20_{0}".format(OPTS.tech_name))
global verify
import verify
OPTS.check_lvsdrc = False
import path

View File

@ -6,19 +6,15 @@ from testutils import header
import sys,os
sys.path.append(os.path.join(sys.path[0],".."))
import globals
from globals import OPTS
import debug
import verify
OPTS = globals.OPTS
#@unittest.skip("SKIPPING 03_ptx_test")
class ptx_test(unittest.TestCase):
def runTest(self):
globals.init_openram("config_20_{0}".format(OPTS.tech_name))
# we will manually run lvs/drc
global verify
import verify
OPTS.check_lvsdrc = False
import ptx

View File

@ -6,19 +6,15 @@ from testutils import header
import sys,os
sys.path.append(os.path.join(sys.path[0],".."))
import globals
from globals import OPTS
import debug
import verify
OPTS = globals.OPTS
#@unittest.skip("SKIPPING 03_ptx_test")
class ptx_test(unittest.TestCase):
def runTest(self):
globals.init_openram("config_20_{0}".format(OPTS.tech_name))
# we will manually run lvs/drc
global verify
import verify
OPTS.check_lvsdrc = False
import ptx

View File

@ -6,19 +6,15 @@ from testutils import header
import sys,os
sys.path.append(os.path.join(sys.path[0],".."))
import globals
from globals import OPTS
import debug
import verify
OPTS = globals.OPTS
#@unittest.skip("SKIPPING 03_ptx_test")
class ptx_test(unittest.TestCase):
def runTest(self):
globals.init_openram("config_20_{0}".format(OPTS.tech_name))
# we will manually run lvs/drc
global verify
import verify
OPTS.check_lvsdrc = False
import ptx

View File

@ -6,19 +6,15 @@ from testutils import header
import sys,os
sys.path.append(os.path.join(sys.path[0],".."))
import globals
from globals import OPTS
import debug
import verify
OPTS = globals.OPTS
#@unittest.skip("SKIPPING 03_ptx_test")
class ptx_test(unittest.TestCase):
def runTest(self):
globals.init_openram("config_20_{0}".format(OPTS.tech_name))
# we will manually run lvs/drc
global verify
import verify
OPTS.check_lvsdrc = False
import ptx

View File

@ -6,19 +6,15 @@ from testutils import header
import sys,os
sys.path.append(os.path.join(sys.path[0],".."))
import globals
from globals import OPTS
import debug
import verify
OPTS = globals.OPTS
#@unittest.skip("SKIPPING 03_ptx_test")
class ptx_test(unittest.TestCase):
def runTest(self):
globals.init_openram("config_20_{0}".format(OPTS.tech_name))
# we will manually run lvs/drc
global verify
import verify
OPTS.check_lvsdrc = False
import ptx

View File

@ -6,19 +6,15 @@ from testutils import header
import sys,os
sys.path.append(os.path.join(sys.path[0],".."))
import globals
from globals import OPTS
import debug
import verify
OPTS = globals.OPTS
#@unittest.skip("SKIPPING 03_ptx_test")
class ptx_test(unittest.TestCase):
def runTest(self):
globals.init_openram("config_20_{0}".format(OPTS.tech_name))
# we will manually run lvs/drc
global verify
import verify
OPTS.check_lvsdrc = False
import ptx

View File

@ -6,18 +6,15 @@ from testutils import header
import sys,os
sys.path.append(os.path.join(sys.path[0],".."))
import globals
from globals import OPTS
import debug
import verify
OPTS = globals.OPTS
#@unittest.skip("SKIPPING 03_wire_test")
class wire_test(unittest.TestCase):
def runTest(self):
globals.init_openram("config_20_{0}".format(OPTS.tech_name))
global verify
import verify
OPTS.check_lvsdrc = False
import wire

View File

@ -8,18 +8,15 @@ from testutils import header
import sys,os
sys.path.append(os.path.join(sys.path[0],".."))
import globals
from globals import OPTS
import debug
import verify
OPTS = globals.OPTS
#@unittest.skip("SKIPPING 04_pinv_test")
class pinv_test(unittest.TestCase):
def runTest(self):
globals.init_openram("config_20_{0}".format(OPTS.tech_name))
global verify
import verify
OPTS.check_lvsdrc = False
import pinv

View File

@ -8,18 +8,15 @@ from testutils import header
import sys,os
sys.path.append(os.path.join(sys.path[0],".."))
import globals
from globals import OPTS
import debug
import verify
OPTS = globals.OPTS
#@unittest.skip("SKIPPING 04_pinv_test")
class pinv_test(unittest.TestCase):
def runTest(self):
globals.init_openram("config_20_{0}".format(OPTS.tech_name))
global verify
import verify
OPTS.check_lvsdrc = False
import pinv

View File

@ -1,26 +1,23 @@
#!/usr/bin/env python2.7
"""
Run regresion tests on a parameterized inverter
Run regression tests on a parameterized inverter
"""
import unittest
from testutils import header
import sys,os
sys.path.append(os.path.join(sys.path[0],".."))
import globals
from globals import OPTS
import debug
import verify
OPTS = globals.OPTS
#@unittest.skip("SKIPPING 04_pinv_test")
class pinv_test(unittest.TestCase):
def runTest(self):
globals.init_openram("config_20_{0}".format(OPTS.tech_name))
global verify
import verify
OPTS.check_lvsdrc = False
import pinv
import tech

View File

@ -8,18 +8,15 @@ from testutils import header
import sys,os
sys.path.append(os.path.join(sys.path[0],".."))
import globals
from globals import OPTS
import debug
import verify
OPTS = globals.OPTS
#@unittest.skip("SKIPPING 04_pinv_test")
class pinv_test(unittest.TestCase):
def runTest(self):
globals.init_openram("config_20_{0}".format(OPTS.tech_name))
global verify
import verify
OPTS.check_lvsdrc = False
import pinv

View File

@ -10,20 +10,15 @@ from testutils import header
import sys,os
sys.path.append(os.path.join(sys.path[0],".."))
import globals
from globals import OPTS
import debug
import verify
import sys
OPTS = globals.OPTS
#@unittest.skip("SKIPPING 04_pnand2_test")
class pnand2_test(unittest.TestCase):
def runTest(self):
globals.init_openram("config_20_{0}".format(OPTS.tech_name))
# we will manually run lvs/drc
global verify
import verify
OPTS.check_lvsdrc = False
import pnand2

View File

@ -10,17 +10,15 @@ from testutils import header
import sys,os
sys.path.append(os.path.join(sys.path[0],".."))
import globals
from globals import OPTS
import debug
import verify
OPTS = globals.OPTS
#@unittest.skip("SKIPPING 04_pnand3_test")
class pnand3_test(unittest.TestCase):
def runTest(self):
globals.init_openram("config_20_{0}".format(OPTS.tech_name))
# we will manually run lvs/drc
global verify
import verify
OPTS.check_lvsdrc = False
import pnand3

View File

@ -10,20 +10,15 @@ from testutils import header
import sys,os
sys.path.append(os.path.join(sys.path[0],".."))
import globals
from globals import OPTS
import debug
import verify
import sys
OPTS = globals.OPTS
#@unittest.skip("SKIPPING 04_pnor2_test")
class pnor2_test(unittest.TestCase):
def runTest(self):
globals.init_openram("config_20_{0}".format(OPTS.tech_name))
# we will manually run lvs/drc
global verify
import verify
OPTS.check_lvsdrc = False
import pnor2

View File

@ -8,17 +8,15 @@ from testutils import header
import sys,os
sys.path.append(os.path.join(sys.path[0],".."))
import globals
from globals import OPTS
import debug
import verify
import sys
OPTS = globals.OPTS
class precharge_test(unittest.TestCase):
def runTest(self):
globals.init_openram("config_20_{0}".format(OPTS.tech_name))
# we will manually run lvs/drc
global verify
import verify
OPTS.check_lvsdrc = False
import precharge

View File

@ -8,20 +8,17 @@ from testutils import header
import sys,os
sys.path.append(os.path.join(sys.path[0],".."))
import globals
from globals import OPTS
import debug
import verify
import sys
OPTS = globals.OPTS
#@unittest.skip("SKIPPING 04_driver_test")
class wordline_driver_test(unittest.TestCase):
def runTest(self):
globals.init_openram("config_20_{0}".format(OPTS.tech_name))
# we will manually run lvs/drc
global verify
import verify
OPTS.check_lvsdrc = False
import wordline_driver

View File

@ -8,19 +8,17 @@ from testutils import header
import sys,os
sys.path.append(os.path.join(sys.path[0],".."))
import globals
from globals import OPTS
import debug
import verify
OPTS = globals.OPTS
#@unittest.skip("SKIPPING 05_array_test")
class array_test(unittest.TestCase):
def runTest(self):
globals.init_openram("config_20_{0}".format(OPTS.tech_name))
# we will manually run lvs/drc
global verify
import verify
OPTS.check_lvsdrc = False
import bitcell_array

View File

@ -8,16 +8,15 @@ from testutils import header
import sys,os
sys.path.append(os.path.join(sys.path[0],".."))
import globals
from globals import OPTS
import debug
import verify
OPTS = globals.OPTS
class hierarchical_decoder_test(unittest.TestCase):
def runTest(self):
globals.init_openram("config_20_{0}".format(OPTS.tech_name))
global verify
import verify
OPTS.check_lvsdrc = False
import hierarchical_decoder

View File

@ -8,17 +8,15 @@ from testutils import header
import sys,os
sys.path.append(os.path.join(sys.path[0],".."))
import globals
from globals import OPTS
import debug
import verify
OPTS = globals.OPTS
class hierarchical_predecode2x4_test(unittest.TestCase):
def runTest(self):
globals.init_openram("config_20_{0}".format(OPTS.tech_name))
# we will manually run lvs/drc
global verify
import verify
OPTS.check_lvsdrc = False
import hierarchical_predecode2x4 as pre

View File

@ -8,17 +8,15 @@ from testutils import header
import sys,os
sys.path.append(os.path.join(sys.path[0],".."))
import globals
from globals import OPTS
import debug
import verify
OPTS = globals.OPTS
class hierarchical_predecode3x8_test(unittest.TestCase):
def runTest(self):
globals.init_openram("config_20_{0}".format(OPTS.tech_name))
# we will manually run lvs/drc
global verify
import verify
OPTS.check_lvsdrc = False
import hierarchical_predecode3x8 as pre

View File

@ -10,14 +10,13 @@ sys.path.append(os.path.join(sys.path[0],".."))
import globals
from globals import OPTS
import debug
import verify
class single_level_column_mux_test(unittest.TestCase):
def runTest(self):
globals.init_openram("config_20_{0}".format(OPTS.tech_name))
# we will manually run lvs/drc
global verify
import verify
OPTS.check_lvsdrc = False
import single_level_column_mux_array

View File

@ -10,16 +10,13 @@ sys.path.append(os.path.join(sys.path[0],".."))
import globals
from globals import OPTS
import debug
import verify
#@unittest.skip("SKIPPING 08_precharge_test")
class precharge_test(unittest.TestCase):
def runTest(self):
globals.init_openram("config_20_{0}".format(OPTS.tech_name))
global verify
import verify
OPTS.check_lvsdrc = False
import precharge_array

View File

@ -10,15 +10,13 @@ sys.path.append(os.path.join(sys.path[0],".."))
import globals
from globals import OPTS
import debug
import verify
#@unittest.skip("SKIPPING 09_sense_amp_test")
class sense_amp_test(unittest.TestCase):
def runTest(self):
globals.init_openram("config_20_{0}".format(OPTS.tech_name))
global verify
import verify
OPTS.check_lvsdrc = False
import sense_amp_array

View File

@ -10,15 +10,13 @@ sys.path.append(os.path.join(sys.path[0],".."))
import globals
from globals import OPTS
import debug
import verify
#@unittest.skip("SKIPPING 10_write_driver_test")
class write_driver_test(unittest.TestCase):
def runTest(self):
globals.init_openram("config_20_{0}".format(OPTS.tech_name))
global verify
import verify
OPTS.check_lvsdrc = False
import write_driver_array

View File

@ -10,16 +10,13 @@ sys.path.append(os.path.join(sys.path[0],".."))
import globals
from globals import OPTS
import debug
import verify
import importlib
#@unittest.skip("SKIPPING 20_sram_test")
class dff_array_test(unittest.TestCase):
def runTest(self):
globals.init_openram("config_20_{0}".format(OPTS.tech_name))
global verify
import verify
OPTS.check_lvsdrc = False
import ms_flop_array

View File

@ -10,14 +10,13 @@ sys.path.append(os.path.join(sys.path[0],".."))
import globals
from globals import OPTS
import debug
import verify
class tri_gate_array_test(unittest.TestCase):
def runTest(self):
globals.init_openram("config_20_{0}".format(OPTS.tech_name))
# we will manually run lvs/drc
global verify
import verify
OPTS.check_lvsdrc = False
import tri_gate_array

View File

@ -10,14 +10,13 @@ sys.path.append(os.path.join(sys.path[0],".."))
import globals
from globals import OPTS
import debug
import verify
#@unittest.skip("SKIPPING 14_delay_chain_test")
class delay_chain_test(unittest.TestCase):
def runTest(self):
globals.init_openram("config_20_{0}".format(OPTS.tech_name))
# we will manually run lvs/drc
global verify
import verify
OPTS.check_lvsdrc = False
import delay_chain

View File

@ -10,17 +10,13 @@ sys.path.append(os.path.join(sys.path[0],".."))
import globals
from globals import OPTS
import debug
import verify
import importlib
#@unittest.skip("SKIPPING 14_delay_chain_test")
class replica_bitline_test(unittest.TestCase):
def runTest(self):
globals.init_openram("config_20_{0}".format(OPTS.tech_name))
# we will manually run lvs/drc
global verify
import verify
OPTS.check_lvsdrc = False
import replica_bitline

View File

@ -10,13 +10,13 @@ sys.path.append(os.path.join(sys.path[0],".."))
import globals
from globals import OPTS
import debug
import verify
class control_logic_test(unittest.TestCase):
def runTest(self):
globals.init_openram("config_20_{0}".format(OPTS.tech_name))
# we will manually run lvs/drc
global verify
import verify
OPTS.check_lvsdrc = False
import control_logic

View File

@ -10,13 +10,13 @@ sys.path.append(os.path.join(sys.path[0],".."))
import globals
from globals import OPTS
import debug
import verify
class multi_bank_test(unittest.TestCase):
def runTest(self):
globals.init_openram("config_20_{0}".format(OPTS.tech_name))
# we will manually run lvs/drc
global verify
import verify
OPTS.check_lvsdrc = False
import bank

View File

@ -10,16 +10,13 @@ sys.path.append(os.path.join(sys.path[0],".."))
import globals
from globals import OPTS
import debug
import verify
#@unittest.skip("SKIPPING 20_sram_test")
class single_bank_test(unittest.TestCase):
def runTest(self):
globals.init_openram("config_20_{0}".format(OPTS.tech_name))
# we will manually run lvs/drc
global verify
import verify
OPTS.check_lvsdrc = False
import bank

View File

@ -10,16 +10,13 @@ sys.path.append(os.path.join(sys.path[0],".."))
import globals
from globals import OPTS
import debug
import verify
#@unittest.skip("SKIPPING 20_sram_test")
class sram_1bank_test(unittest.TestCase):
def runTest(self):
globals.init_openram("config_20_{0}".format(OPTS.tech_name))
# we will manually run lvs/drc
global verify
import verify
OPTS.check_lvsdrc = False
import sram

View File

@ -10,16 +10,13 @@ sys.path.append(os.path.join(sys.path[0],".."))
import globals
from globals import OPTS
import debug
import verify
#@unittest.skip("SKIPPING 20_sram_test")
class sram_2bank_test(unittest.TestCase):
def runTest(self):
globals.init_openram("config_20_{0}".format(OPTS.tech_name))
# we will manually run lvs/drc
global verify
import verify
OPTS.check_lvsdrc = False
import sram

View File

@ -10,16 +10,13 @@ sys.path.append(os.path.join(sys.path[0],".."))
import globals
from globals import OPTS
import debug
import verify
#@unittest.skip("SKIPPING 20_sram_test")
class sram_4bank_test(unittest.TestCase):
def runTest(self):
globals.init_openram("config_20_{0}".format(OPTS.tech_name))
# we will manually run lvs/drc
global verify
import verify
OPTS.check_lvsdrc = False
import sram

View File

@ -10,16 +10,11 @@ sys.path.append(os.path.join(sys.path[0],".."))
import globals
from globals import OPTS
import debug
import verify
#@unittest.skip("SKIPPING 21_timing_sram_test")
class timing_sram_test(unittest.TestCase):
def runTest(self):
globals.init_openram("config_20_{0}".format(OPTS.tech_name))
# we will manually run lvs/drc
OPTS.check_lvsdrc = False
OPTS.spice_name="hspice"
OPTS.analytical_delay = False

View File

@ -10,17 +10,11 @@ sys.path.append(os.path.join(sys.path[0],".."))
import globals
from globals import OPTS
import debug
import verify
#@unittest.skip("SKIPPING 21_timing_sram_test")
class timing_setup_test(unittest.TestCase):
def runTest(self):
globals.init_openram("config_20_{0}".format(OPTS.tech_name))
# we will manually run lvs/drc
OPTS.check_lvsdrc = False
OPTS.spice_name="hspice"
OPTS.analytical_delay = False

View File

@ -10,14 +10,11 @@ sys.path.append(os.path.join(sys.path[0],".."))
import globals
from globals import OPTS
import debug
import verify
#@unittest.skip("SKIPPING 21_ngspice_delay_test")
class timing_sram_test(unittest.TestCase):
def runTest(self):
globals.init_openram("config_20_{0}".format(OPTS.tech_name))
# we will manually run lvs/drc
OPTS.check_lvsdrc = False
OPTS.spice_name="ngspice"
OPTS.analytical_delay = False

View File

@ -10,17 +10,11 @@ sys.path.append(os.path.join(sys.path[0],".."))
import globals
from globals import OPTS
import debug
import verify
#@unittest.skip("SKIPPING 21_timing_sram_test")
class timing_setup_test(unittest.TestCase):
def runTest(self):
globals.init_openram("config_20_{0}".format(OPTS.tech_name))
# we will manually run lvs/drc
OPTS.check_lvsdrc = False
OPTS.spice_name="ngspice"
OPTS.analytical_delay = False

View File

@ -10,14 +10,14 @@ sys.path.append(os.path.join(sys.path[0],".."))
import globals
from globals import OPTS
import debug
import verify
@unittest.skip("SKIPPING 22_sram_func_test")
class sram_func_test(unittest.TestCase):
def runTest(self):
globals.init_openram("config_20_{0}".format(OPTS.tech_name))
global verify
import verify
self.func_test(bank_num=1)
self.func_test(bank_num=2)

View File

@ -10,17 +10,11 @@ sys.path.append(os.path.join(sys.path[0],".."))
import globals
from globals import OPTS
import debug
import verify
#@unittest.skip("SKIPPING 21_timing_sram_test")
class sram_func_test(unittest.TestCase):
def runTest(self):
globals.init_openram("config_20_{0}".format(OPTS.tech_name))
# we will manually run lvs/drc
OPTS.check_lvsdrc = False
OPTS.spice_name="hspice"
OPTS.analytical_delay = False

View File

@ -10,13 +10,11 @@ sys.path.append(os.path.join(sys.path[0],".."))
import globals
from globals import OPTS
import debug
import verify
class lib_test(unittest.TestCase):
def runTest(self):
globals.init_openram("config_20_{0}".format(OPTS.tech_name))
# we will manually run lvs/drc
OPTS.check_lvsdrc = False
import sram

View File

@ -10,13 +10,11 @@ sys.path.append(os.path.join(sys.path[0],".."))
import globals
from globals import OPTS
import debug
import verify
class lib_test(unittest.TestCase):
def runTest(self):
globals.init_openram("config_20_{0}".format(OPTS.tech_name))
# we will manually run lvs/drc
OPTS.check_lvsdrc = False
OPTS.spice_name="hspice"
OPTS.analytical_delay = False

View File

@ -10,13 +10,11 @@ sys.path.append(os.path.join(sys.path[0],".."))
import globals
from globals import OPTS
import debug
import verify
class lib_test(unittest.TestCase):
def runTest(self):
globals.init_openram("config_20_{0}".format(OPTS.tech_name))
# we will manually run lvs/drc
OPTS.check_lvsdrc = False
OPTS.analytical_delay = False
OPTS.trim_netlist = False

View File

@ -10,8 +10,6 @@ sys.path.append(os.path.join(sys.path[0],".."))
import globals
from globals import OPTS
import debug
import verify
class lef_test(unittest.TestCase):

View File

@ -10,8 +10,6 @@ sys.path.append(os.path.join(sys.path[0],".."))
import globals
from globals import OPTS
import debug
import verify
class verilog_test(unittest.TestCase):

View File

@ -7,14 +7,11 @@ check that these files are right.
import unittest
from testutils import header
import sys,os
import sys,os,re,shutil
sys.path.append(os.path.join(sys.path[0],".."))
import globals
from globals import OPTS
import debug
import os
import re
import shutil
class openram_test(unittest.TestCase):

View File

@ -12,7 +12,6 @@ import os
import debug
from globals import OPTS,find_exe,get_tool
debug.info(2,"Initializing verify...")
if not OPTS.check_lvsdrc:

View File

@ -64,45 +64,46 @@ def run_drc(name, gds_name):
"""Run DRC check on a given top-level name which is
implemented in gds_name."""
debug.warning("DRC using magic not implemented.")
return 1
# the runset file contains all the options to run drc
from tech import drc
drc_rules = drc["drc_rules"]
drc_runset = {
'drcRulesFile': drc_rules,
'drcRunDir': OPTS.openram_temp,
'drcLayoutPaths': gds_name,
'drcLayoutPrimary': name,
'drcLayoutSystem': 'GDSII',
'drcResultsformat': 'ASCII',
'drcResultsFile': OPTS.openram_temp + name + ".drc.results",
'drcSummaryFile': OPTS.openram_temp + name + ".drc.summary",
'cmnFDILayerMapFile': drc["layer_map"],
'cmnFDIUseLayerMap': 1
}
# write the runset file
f = open(OPTS.openram_temp + "drc_runset", "w")
for k in sorted(drc_runset.iterkeys()):
f.write("*{0}: {1}\n".format(k, drc_runset[k]))
top_cell_name = re.sub(r'\.gds$', "", gds_name)
run_file = OPTS.openram_temp + "run_drc.sh"
f = open(run_file, "w")
f.write("#!/bin/sh\n")
f.write("{} -dnull -noconsole << EOF\n".format(OPTS.drc_exe))
f.write("tech load SCN3ME_SUBM.30\n")
f.write("gds rescale false\n")
f.write("gds polygon subcell true\n")
f.write("gds warning default\n")
f.write("gds read {}\n".format(gds_name))
f.write("load {}\n".format(top_cell_name))
f.write("drc count\n")
f.write("drc why\n")
f.write("quit -noprompt\n")
f.write("EOF\n")
f.close()
os.system("chmod u+x {}".format(run_file))
# run drc
cwd = os.getcwd()
os.chdir(OPTS.openram_temp)
errfile = "{0}{1}.drc.err".format(OPTS.openram_temp, name)
outfile = "{0}{1}.drc.out".format(OPTS.openram_temp, name)
cmd = "{0} -gui -drc {1}drc_runset -batch 2> {2} 1> {3}".format(OPTS.drc_exe,
OPTS.openram_temp,
errfile,
outfile)
cmd = "{0}run_drc.sh 2> {1} 1> {2}".format(OPTS.openram_temp,
errfile,
outfile)
debug.info(1, cmd)
os.system(cmd)
os.chdir(cwd)
debug.warning("DRC using magic not implemented.")
return 1
# check the result for these lines in the summary:
# TOTAL Original Layer Geometries: 106 (157)
# TOTAL DRC RuleChecks Executed: 156