diff --git a/compiler/globals.py b/compiler/globals.py index 9ac87527..c56f475f 100644 --- a/compiler/globals.py +++ b/compiler/globals.py @@ -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 diff --git a/compiler/options.py b/compiler/options.py index 2bf46e1d..c6d1f53c 100644 --- a/compiler/options.py +++ b/compiler/options.py @@ -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 diff --git a/compiler/tests/00_code_format_check_test.py b/compiler/tests/00_code_format_check_test.py index 37d6fb8e..d94d72ec 100644 --- a/compiler/tests/00_code_format_check_test.py +++ b/compiler/tests/00_code_format_check_test.py @@ -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." diff --git a/compiler/tests/01_library_drc_test.py b/compiler/tests/01_library_drc_test.py index 5bb17e6d..f87b315c 100644 --- a/compiler/tests/01_library_drc_test.py +++ b/compiler/tests/01_library_drc_test.py @@ -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 diff --git a/compiler/tests/02_library_lvs_test.py b/compiler/tests/02_library_lvs_test.py index 4f87897e..b9da29a1 100644 --- a/compiler/tests/02_library_lvs_test.py +++ b/compiler/tests/02_library_lvs_test.py @@ -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)) diff --git a/compiler/tests/03_contact_test.py b/compiler/tests/03_contact_test.py index d9a1791c..eb59a32d 100644 --- a/compiler/tests/03_contact_test.py +++ b/compiler/tests/03_contact_test.py @@ -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 diff --git a/compiler/tests/03_path_test.py b/compiler/tests/03_path_test.py index 604ebeff..0739df5f 100644 --- a/compiler/tests/03_path_test.py +++ b/compiler/tests/03_path_test.py @@ -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 diff --git a/compiler/tests/03_ptx_1finger_nmos_test.py b/compiler/tests/03_ptx_1finger_nmos_test.py index fccbc41d..3e78a693 100644 --- a/compiler/tests/03_ptx_1finger_nmos_test.py +++ b/compiler/tests/03_ptx_1finger_nmos_test.py @@ -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 diff --git a/compiler/tests/03_ptx_1finger_pmos_test.py b/compiler/tests/03_ptx_1finger_pmos_test.py index 9351b7ca..06b0a9d9 100644 --- a/compiler/tests/03_ptx_1finger_pmos_test.py +++ b/compiler/tests/03_ptx_1finger_pmos_test.py @@ -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 diff --git a/compiler/tests/03_ptx_3finger_nmos_test.py b/compiler/tests/03_ptx_3finger_nmos_test.py index b0721908..323c1798 100644 --- a/compiler/tests/03_ptx_3finger_nmos_test.py +++ b/compiler/tests/03_ptx_3finger_nmos_test.py @@ -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 diff --git a/compiler/tests/03_ptx_3finger_pmos_test.py b/compiler/tests/03_ptx_3finger_pmos_test.py index da606907..53123aa8 100644 --- a/compiler/tests/03_ptx_3finger_pmos_test.py +++ b/compiler/tests/03_ptx_3finger_pmos_test.py @@ -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 diff --git a/compiler/tests/03_ptx_4finger_nmos_test.py b/compiler/tests/03_ptx_4finger_nmos_test.py index aeffd9a9..a64128b4 100644 --- a/compiler/tests/03_ptx_4finger_nmos_test.py +++ b/compiler/tests/03_ptx_4finger_nmos_test.py @@ -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 diff --git a/compiler/tests/03_ptx_4finger_pmos_test.py b/compiler/tests/03_ptx_4finger_pmos_test.py index 4cc80f08..43931cc3 100644 --- a/compiler/tests/03_ptx_4finger_pmos_test.py +++ b/compiler/tests/03_ptx_4finger_pmos_test.py @@ -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 diff --git a/compiler/tests/03_wire_test.py b/compiler/tests/03_wire_test.py index 0f71b47e..9ae02008 100644 --- a/compiler/tests/03_wire_test.py +++ b/compiler/tests/03_wire_test.py @@ -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 diff --git a/compiler/tests/04_pinv_10x_test.py b/compiler/tests/04_pinv_10x_test.py index 85ebfa8d..91f9e2a4 100644 --- a/compiler/tests/04_pinv_10x_test.py +++ b/compiler/tests/04_pinv_10x_test.py @@ -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 diff --git a/compiler/tests/04_pinv_1x_beta_test.py b/compiler/tests/04_pinv_1x_beta_test.py index 6bd03b9a..a9eb39d7 100644 --- a/compiler/tests/04_pinv_1x_beta_test.py +++ b/compiler/tests/04_pinv_1x_beta_test.py @@ -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 diff --git a/compiler/tests/04_pinv_1x_test.py b/compiler/tests/04_pinv_1x_test.py index fe937b4e..40428edf 100644 --- a/compiler/tests/04_pinv_1x_test.py +++ b/compiler/tests/04_pinv_1x_test.py @@ -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 diff --git a/compiler/tests/04_pinv_2x_test.py b/compiler/tests/04_pinv_2x_test.py index 25f9bb09..75e1f166 100644 --- a/compiler/tests/04_pinv_2x_test.py +++ b/compiler/tests/04_pinv_2x_test.py @@ -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 diff --git a/compiler/tests/04_pnand2_test.py b/compiler/tests/04_pnand2_test.py index 76fe6d03..3c182743 100644 --- a/compiler/tests/04_pnand2_test.py +++ b/compiler/tests/04_pnand2_test.py @@ -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 diff --git a/compiler/tests/04_pnand3_test.py b/compiler/tests/04_pnand3_test.py index ddaeb179..1ae19f85 100644 --- a/compiler/tests/04_pnand3_test.py +++ b/compiler/tests/04_pnand3_test.py @@ -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 diff --git a/compiler/tests/04_pnor2_test.py b/compiler/tests/04_pnor2_test.py index d080e4ae..e96c5ee9 100644 --- a/compiler/tests/04_pnor2_test.py +++ b/compiler/tests/04_pnor2_test.py @@ -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 diff --git a/compiler/tests/04_precharge_test.py b/compiler/tests/04_precharge_test.py index b1c5fd7f..65ac6a2a 100644 --- a/compiler/tests/04_precharge_test.py +++ b/compiler/tests/04_precharge_test.py @@ -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 diff --git a/compiler/tests/04_wordline_driver_test.py b/compiler/tests/04_wordline_driver_test.py index a772a1ae..a9459ef5 100644 --- a/compiler/tests/04_wordline_driver_test.py +++ b/compiler/tests/04_wordline_driver_test.py @@ -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 diff --git a/compiler/tests/05_bitcell_array_test.py b/compiler/tests/05_bitcell_array_test.py index 379a6e59..2c6a67c1 100644 --- a/compiler/tests/05_bitcell_array_test.py +++ b/compiler/tests/05_bitcell_array_test.py @@ -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 diff --git a/compiler/tests/06_hierarchical_decoder_test.py b/compiler/tests/06_hierarchical_decoder_test.py index 6a8f860f..498de3bb 100644 --- a/compiler/tests/06_hierarchical_decoder_test.py +++ b/compiler/tests/06_hierarchical_decoder_test.py @@ -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 diff --git a/compiler/tests/06_hierarchical_predecode2x4_test.py b/compiler/tests/06_hierarchical_predecode2x4_test.py index 7095da26..f9401bac 100644 --- a/compiler/tests/06_hierarchical_predecode2x4_test.py +++ b/compiler/tests/06_hierarchical_predecode2x4_test.py @@ -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 diff --git a/compiler/tests/06_hierarchical_predecode3x8_test.py b/compiler/tests/06_hierarchical_predecode3x8_test.py index 6fb9a5df..b2d7ddd1 100644 --- a/compiler/tests/06_hierarchical_predecode3x8_test.py +++ b/compiler/tests/06_hierarchical_predecode3x8_test.py @@ -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 diff --git a/compiler/tests/07_single_level_column_mux_array_test.py b/compiler/tests/07_single_level_column_mux_array_test.py index c03a5d28..cb5cd302 100644 --- a/compiler/tests/07_single_level_column_mux_array_test.py +++ b/compiler/tests/07_single_level_column_mux_array_test.py @@ -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 diff --git a/compiler/tests/08_precharge_array_test.py b/compiler/tests/08_precharge_array_test.py index b92bb880..5f169858 100644 --- a/compiler/tests/08_precharge_array_test.py +++ b/compiler/tests/08_precharge_array_test.py @@ -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 diff --git a/compiler/tests/09_sense_amp_array_test.py b/compiler/tests/09_sense_amp_array_test.py index 7d80efb6..57af1052 100644 --- a/compiler/tests/09_sense_amp_array_test.py +++ b/compiler/tests/09_sense_amp_array_test.py @@ -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 diff --git a/compiler/tests/10_write_driver_array_test.py b/compiler/tests/10_write_driver_array_test.py index dab8c2e2..d8591eed 100644 --- a/compiler/tests/10_write_driver_array_test.py +++ b/compiler/tests/10_write_driver_array_test.py @@ -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 diff --git a/compiler/tests/11_ms_flop_array_test.py b/compiler/tests/11_ms_flop_array_test.py index ce24f49a..dcdc48c5 100644 --- a/compiler/tests/11_ms_flop_array_test.py +++ b/compiler/tests/11_ms_flop_array_test.py @@ -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 diff --git a/compiler/tests/12_tri_gate_array_test.py b/compiler/tests/12_tri_gate_array_test.py index 534e1656..3ca7f475 100644 --- a/compiler/tests/12_tri_gate_array_test.py +++ b/compiler/tests/12_tri_gate_array_test.py @@ -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 diff --git a/compiler/tests/13_delay_chain_test.py b/compiler/tests/13_delay_chain_test.py index 888b4442..faf6529c 100644 --- a/compiler/tests/13_delay_chain_test.py +++ b/compiler/tests/13_delay_chain_test.py @@ -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 diff --git a/compiler/tests/14_replica_bitline_test.py b/compiler/tests/14_replica_bitline_test.py index a82d95b5..6ed487b8 100644 --- a/compiler/tests/14_replica_bitline_test.py +++ b/compiler/tests/14_replica_bitline_test.py @@ -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 diff --git a/compiler/tests/16_control_logic_test.py b/compiler/tests/16_control_logic_test.py index 0d23bef6..5f501b2b 100644 --- a/compiler/tests/16_control_logic_test.py +++ b/compiler/tests/16_control_logic_test.py @@ -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 diff --git a/compiler/tests/19_multi_bank_test.py b/compiler/tests/19_multi_bank_test.py index cf49b287..a829b319 100644 --- a/compiler/tests/19_multi_bank_test.py +++ b/compiler/tests/19_multi_bank_test.py @@ -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 diff --git a/compiler/tests/19_single_bank_test.py b/compiler/tests/19_single_bank_test.py index 4e5ba00f..b90c0b2a 100644 --- a/compiler/tests/19_single_bank_test.py +++ b/compiler/tests/19_single_bank_test.py @@ -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 diff --git a/compiler/tests/20_sram_1bank_test.py b/compiler/tests/20_sram_1bank_test.py index 7e19161d..f36046b8 100644 --- a/compiler/tests/20_sram_1bank_test.py +++ b/compiler/tests/20_sram_1bank_test.py @@ -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 diff --git a/compiler/tests/20_sram_2bank_test.py b/compiler/tests/20_sram_2bank_test.py index f29d2038..c35761ec 100644 --- a/compiler/tests/20_sram_2bank_test.py +++ b/compiler/tests/20_sram_2bank_test.py @@ -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 diff --git a/compiler/tests/20_sram_4bank_test.py b/compiler/tests/20_sram_4bank_test.py index 7539f10e..842c152f 100644 --- a/compiler/tests/20_sram_4bank_test.py +++ b/compiler/tests/20_sram_4bank_test.py @@ -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 diff --git a/compiler/tests/21_hspice_delay_test.py b/compiler/tests/21_hspice_delay_test.py index e2c9c8f7..157f6a12 100644 --- a/compiler/tests/21_hspice_delay_test.py +++ b/compiler/tests/21_hspice_delay_test.py @@ -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 diff --git a/compiler/tests/21_hspice_setuphold_test.py b/compiler/tests/21_hspice_setuphold_test.py index 762749a3..91638e32 100644 --- a/compiler/tests/21_hspice_setuphold_test.py +++ b/compiler/tests/21_hspice_setuphold_test.py @@ -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 diff --git a/compiler/tests/21_ngspice_delay_test.py b/compiler/tests/21_ngspice_delay_test.py index 759ea20b..98ab4073 100644 --- a/compiler/tests/21_ngspice_delay_test.py +++ b/compiler/tests/21_ngspice_delay_test.py @@ -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 diff --git a/compiler/tests/21_ngspice_setuphold_test.py b/compiler/tests/21_ngspice_setuphold_test.py index 7f02e2c6..2a848ffb 100644 --- a/compiler/tests/21_ngspice_setuphold_test.py +++ b/compiler/tests/21_ngspice_setuphold_test.py @@ -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 diff --git a/compiler/tests/22_pex_func_test_with_pinv.py b/compiler/tests/22_pex_func_test_with_pinv.py index 025f6fe1..b15bf3df 100644 --- a/compiler/tests/22_pex_func_test_with_pinv.py +++ b/compiler/tests/22_pex_func_test_with_pinv.py @@ -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) diff --git a/compiler/tests/22_sram_func_test.py b/compiler/tests/22_sram_func_test.py index 6ec0c546..da7d09c1 100644 --- a/compiler/tests/22_sram_func_test.py +++ b/compiler/tests/22_sram_func_test.py @@ -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 diff --git a/compiler/tests/23_lib_sram_model_test.py b/compiler/tests/23_lib_sram_model_test.py index c730e848..cbdbe8fc 100644 --- a/compiler/tests/23_lib_sram_model_test.py +++ b/compiler/tests/23_lib_sram_model_test.py @@ -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 diff --git a/compiler/tests/23_lib_sram_prune_test.py b/compiler/tests/23_lib_sram_prune_test.py index d8be88a4..ea22252f 100644 --- a/compiler/tests/23_lib_sram_prune_test.py +++ b/compiler/tests/23_lib_sram_prune_test.py @@ -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 diff --git a/compiler/tests/23_lib_sram_test.py b/compiler/tests/23_lib_sram_test.py index 73cd33b1..b1aae5d1 100644 --- a/compiler/tests/23_lib_sram_test.py +++ b/compiler/tests/23_lib_sram_test.py @@ -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 diff --git a/compiler/tests/24_lef_sram_test.py b/compiler/tests/24_lef_sram_test.py index 6d59a484..b5400877 100644 --- a/compiler/tests/24_lef_sram_test.py +++ b/compiler/tests/24_lef_sram_test.py @@ -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): diff --git a/compiler/tests/25_verilog_sram_test.py b/compiler/tests/25_verilog_sram_test.py index d073d9f0..e6844984 100644 --- a/compiler/tests/25_verilog_sram_test.py +++ b/compiler/tests/25_verilog_sram_test.py @@ -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): diff --git a/compiler/tests/30_openram_test.py b/compiler/tests/30_openram_test.py index 027fcf87..c756d3fc 100644 --- a/compiler/tests/30_openram_test.py +++ b/compiler/tests/30_openram_test.py @@ -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): diff --git a/compiler/verify/__init__.py b/compiler/verify/__init__.py index 7eb38277..15f6565d 100644 --- a/compiler/verify/__init__.py +++ b/compiler/verify/__init__.py @@ -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: diff --git a/compiler/verify/magic.py b/compiler/verify/magic.py index 327b3e22..7fa35943 100644 --- a/compiler/verify/magic.py +++ b/compiler/verify/magic.py @@ -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