From e46ff50269962f1b794bd96604d28d6eda6411d0 Mon Sep 17 00:00:00 2001 From: Matt Guthaus Date: Wed, 11 Jan 2017 11:47:58 -0800 Subject: [PATCH] Modified default tech back to freepdk. Config file overrides command line. --- README | 7 +++--- ..._config.py => example_config_freepdk45.py} | 0 compiler/example_config_scn3me_subm.py | 23 +++++++++++++++++++ compiler/globals.py | 13 ++++++++--- 4 files changed, 37 insertions(+), 6 deletions(-) rename compiler/{example_config.py => example_config_freepdk45.py} (100%) create mode 100644 compiler/example_config_scn3me_subm.py diff --git a/README b/README index a0a14ee7..e484485f 100644 --- a/README +++ b/README @@ -91,9 +91,9 @@ Steps to run regression testing: 1) First, ensure your setup_scripts is correctly setup. 2) Navigate to the compiler directory: cd $OPENRAM_HOME 3) Use the command: - python tests/regress.py -t freepdk45 + python tests/regress.py 4) To run a specific test: - python tests/{unit test}.py -t freepdk45 + python tests/{unit test}.py The unit tests take the same arguments as openram.py itself. @@ -101,7 +101,8 @@ To increase the verbosity of the test, add one (or more) -v options: python tests/00_code_format_check_test.py -v -t freepdk45 To specify a particular technology use "-t " such as -"-t scn3me_subm". +"-t scn3me_subm". The default for a unit test is freepdk45 whereas +the default for openram.py is specified in the configuration file. A regression daemon script that can be used with cron is included: regress_daemon.py diff --git a/compiler/example_config.py b/compiler/example_config_freepdk45.py similarity index 100% rename from compiler/example_config.py rename to compiler/example_config_freepdk45.py diff --git a/compiler/example_config_scn3me_subm.py b/compiler/example_config_scn3me_subm.py new file mode 100644 index 00000000..d7618847 --- /dev/null +++ b/compiler/example_config_scn3me_subm.py @@ -0,0 +1,23 @@ +word_size = 1 +num_words = 16 +num_banks = 1 + +tech_name = "scn3me_subm" + +decoder = "hierarchical_decoder" +ms_flop = "ms_flop" +ms_flop_array = "ms_flop_array" +control_logic = "control_logic" +bitcell_array = "bitcell_array" +sense_amp = "sense_amp" +sense_amp_array = "sense_amp_array" +precharge_array = "precharge_array" +column_mux_array = "single_level_column_mux_array" +write_driver = "write_driver" +write_driver_array = "write_driver_array" +tri_gate = "tri_gate" +tri_gate_array = "tri_gate_array" +wordline_driver = "wordline_driver" +replica_bitcell = "replica_bitcell" +bitcell = "bitcell" +delay_chain = "logic_effort_dc" diff --git a/compiler/globals.py b/compiler/globals.py index 2d8a9667..f22fc112 100644 --- a/compiler/globals.py +++ b/compiler/globals.py @@ -62,6 +62,12 @@ def parse_args(): (options, args) = parser.parse_args(values=OPTS) + # If we don't specify a tech, assume freepdk45. + # This may be overridden when we read a config file though... + if OPTS.tech_name == "": + OPTS.tech_name = "freepdk45" + + return (options, args) @@ -244,9 +250,10 @@ def import_tech(): debug.info(2,"Importing technology: " + OPTS.tech_name) - if OPTS.tech_name == "": - OPTS.tech_name = OPTS.config.tech_name - + # Set the tech to the config file we read in instead of the command line value. + OPTS.tech_name = OPTS.config.tech_name + + # environment variable should point to the technology dir try: OPENRAM_TECH = os.path.abspath(os.environ.get("OPENRAM_TECH"))