From a0f1327f5eddb6ea59bc102fc196bd90dc47c06b Mon Sep 17 00:00:00 2001 From: mrg Date: Sun, 6 Mar 2022 11:26:18 -0800 Subject: [PATCH] Add odd rows to 23_lib tests --- compiler/tests/23_lib_sram_linear_regression_test.py | 11 ++++++++++- compiler/tests/23_lib_sram_model_corners_test.py | 11 ++++++++++- compiler/tests/23_lib_sram_model_test.py | 11 ++++++++++- compiler/tests/23_lib_sram_prune_test.py | 11 ++++++++++- compiler/tests/23_lib_sram_test.py | 11 ++++++++++- 5 files changed, 50 insertions(+), 5 deletions(-) diff --git a/compiler/tests/23_lib_sram_linear_regression_test.py b/compiler/tests/23_lib_sram_linear_regression_test.py index bdca8fdd..620b8f0e 100755 --- a/compiler/tests/23_lib_sram_linear_regression_test.py +++ b/compiler/tests/23_lib_sram_linear_regression_test.py @@ -24,12 +24,21 @@ class lib_sram_linear_regression_test(openram_test): OPTS.netlist_only = True OPTS.model_name = "linear_regression" + if OPTS.tech_name == "sky130": + num_spare_rows = 1 + num_spare_cols = 1 + else: + num_spare_rows = 0 + num_spare_cols = 0 + from characterizer import lib from sram import sram from sram_config import sram_config c = sram_config(word_size=2, num_words=16, - num_banks=1) + num_banks=1, + num_spare_cols=num_spare_cols, + num_spare_rows=num_spare_rows) c.words_per_row=1 c.recompute_sizes() debug.info(1, "Testing analytical timing for sample 2 bit, 16 words SRAM with 1 bank") diff --git a/compiler/tests/23_lib_sram_model_corners_test.py b/compiler/tests/23_lib_sram_model_corners_test.py index 3f989b61..1de09c2b 100755 --- a/compiler/tests/23_lib_sram_model_corners_test.py +++ b/compiler/tests/23_lib_sram_model_corners_test.py @@ -23,12 +23,21 @@ class lib_model_corners_lib_test(openram_test): OPTS.nominal_corner_only = False OPTS.netlist_only = True + if OPTS.tech_name == "sky130": + num_spare_rows = 1 + num_spare_cols = 1 + else: + num_spare_rows = 0 + num_spare_cols = 0 + from characterizer import lib from sram import sram from sram_config import sram_config c = sram_config(word_size=2, num_words=16, - num_banks=1) + num_banks=1, + num_spare_cols=num_spare_cols, + num_spare_rows=num_spare_rows) c.words_per_row=1 c.recompute_sizes() debug.info(1, "Testing analytical timing for sample 2 bit, 16 words SRAM with 1 bank") diff --git a/compiler/tests/23_lib_sram_model_test.py b/compiler/tests/23_lib_sram_model_test.py index e729a9bd..e421235e 100755 --- a/compiler/tests/23_lib_sram_model_test.py +++ b/compiler/tests/23_lib_sram_model_test.py @@ -23,12 +23,21 @@ class lib_sram_model_test(openram_test): OPTS.nominal_corner_only = False OPTS.netlist_only = True + if OPTS.tech_name == "sky130": + num_spare_rows = 1 + num_spare_cols = 1 + else: + num_spare_rows = 0 + num_spare_cols = 0 + from characterizer import lib from sram import sram from sram_config import sram_config c = sram_config(word_size=2, num_words=16, - num_banks=1) + num_banks=1, + num_spare_cols=num_spare_cols, + num_spare_rows=num_spare_rows) c.words_per_row=1 c.recompute_sizes() debug.info(1, "Testing analytical timing for sample 2 bit, 16 words SRAM with 1 bank") diff --git a/compiler/tests/23_lib_sram_prune_test.py b/compiler/tests/23_lib_sram_prune_test.py index b4efd1dd..ae9093f5 100755 --- a/compiler/tests/23_lib_sram_prune_test.py +++ b/compiler/tests/23_lib_sram_prune_test.py @@ -32,11 +32,20 @@ class lib_sram_prune_test(openram_test): if not OPTS.spice_exe: debug.error("Could not find {} simulator.".format(OPTS.spice_name),-1) + if OPTS.tech_name == "sky130": + num_spare_rows = 1 + num_spare_cols = 1 + else: + num_spare_rows = 0 + num_spare_cols = 0 + from sram import sram from sram_config import sram_config c = sram_config(word_size=2, num_words=16, - num_banks=1) + num_banks=1, + num_spare_cols=num_spare_cols, + num_spare_rows=num_spare_rows) c.words_per_row=1 c.recompute_sizes() debug.info(1, "Testing pruned timing for sample 2 bit, 16 words SRAM with 1 bank") diff --git a/compiler/tests/23_lib_sram_test.py b/compiler/tests/23_lib_sram_test.py index a894b328..cf9cf801 100755 --- a/compiler/tests/23_lib_sram_test.py +++ b/compiler/tests/23_lib_sram_test.py @@ -30,11 +30,20 @@ class lib_test(openram_test): if not OPTS.spice_exe: debug.error("Could not find {} simulator.".format(OPTS.spice_name),-1) + if OPTS.tech_name == "sky130": + num_spare_rows = 1 + num_spare_cols = 1 + else: + num_spare_rows = 0 + num_spare_cols = 0 + from sram import sram from sram_config import sram_config c = sram_config(word_size=2, num_words=16, - num_banks=1) + num_banks=1, + num_spare_cols=num_spare_cols, + num_spare_rows=num_spare_rows) c.words_per_row=1 c.recompute_sizes() debug.info(1, "Testing timing for sample 2 bit, 16 words SRAM with 1 bank")