Skip to content

Commit

Permalink
Merge branch 'sky130_regress' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
erendn committed Jan 21, 2024
2 parents 0423f10 + 0cf60a6 commit 306da8a
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 57 deletions.
5 changes: 4 additions & 1 deletion compiler/characterizer/functional.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,10 @@ def __init__(self, sram, spfile=None, corner=None, cycles=15, period=None, outpu
sram.sp_write(self.sp_file, trim=OPTS.trim_netlist)
# Copy sp file to temp dir
self.temp_spice = path.join(OPTS.openram_temp, "sram.sp")
shutil.copy(self.sp_file, self.temp_spice)
try:
shutil.copy(self.sp_file, self.temp_spice)
except shutil.SameFileError: # skip if the same
pass

if not corner:
corner = (OPTS.process_corners[0], OPTS.supply_voltages[0], OPTS.temperatures[0])
Expand Down
Empty file modified compiler/tests/04_rom_address_control_buf_test.py
100644 → 100755
Empty file.
Empty file modified compiler/tests/04_rom_precharge_test.py
100644 → 100755
Empty file.
78 changes: 22 additions & 56 deletions compiler/tests/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ include $(TOP_DIR)/openram.mk
.DEFAULT_GOAL := all

ARGS ?=
TEST_TECHS ?= scn4m_subm freepdk45
TECHS ?= scn4m_subm freepdk45 sky130

TEST_DIR = $(TOP_DIR)/compiler/tests
Expand All @@ -22,88 +21,43 @@ RESULTS_DIR = $(OPENRAM_DIR)/results
# or a specific tech:
# freepdk45/test.py
BROKEN_STAMPS = \
%/06_hierarchical_decoder_4096row_test.ok \
%/19_single_bank_16mux_1rw_1r_test.ok \
%/19_single_bank_16mux_test.ok \
%/20_sram_1bank_16mux_1rw_1r_test.ok \
%/20_sram_1bank_16mux_test.ok \
%/20_psram_1bank_2mux_1rw_1w_test.ok \
%/20_psram_1bank_2mux_1rw_1w_wmask_test.ok \
%/20_psram_1bank_2mux_1w_1r_test.ok \
%/20_psram_1bank_2mux_test.ok \
%/21_hspice_delay_test.ok \
%/21_hspice_setuphold_test.ok \
%/21_xyce_delay_test.ok \
%/22_psram_1bank_2mux_func_test.ok \
%/22_psram_1bank_4mux_func_test.ok \
%/22_psram_1bank_8mux_func_test.ok \
%/22_psram_1bank_nomux_func_test.ok \
%/22_sram_1bank_2mux_func_test.ok \
%/22_sram_1bank_2mux_global_func_test.ok \
%/22_sram_1bank_2mux_sparecols_func_test.ok \
%/22_sram_1bank_4mux_func_test.ok \
%/22_sram_1bank_8mux_func_test.ok \
%/22_sram_1bank_nomux_1rw_1r_func_test.ok \
%/22_sram_1bank_nomux_func_test.ok \
%/22_sram_1bank_nomux_sparecols_func_test.ok \
%/22_sram_1bank_wmask_1rw_1r_func_test.ok \
%/22_sram_wmask_func_test.ok \
%/26_hspice_pex_pinv_test.ok \
%/27_verilog_multibank_test.ok \
%/50_riscv_1k_1rw1r_func_test.ok \
%/50_riscv_1k_1rw_func_test.ok \
%/50_riscv_1rw1r_func_test.ok \
%/50_riscv_1rw1r_phys_test.ok \
%/50_riscv_1rw_func_test.ok \
%/50_riscv_1rw_phys_test.ok \
%/50_riscv_2k_1rw1r_func_test.ok \
%/50_riscv_2k_1rw_func_test.ok \
%/50_riscv_4k_1rw1r_func_test.ok \
%/50_riscv_4k_1rw_func_test.ok \
%/50_riscv_512b_1rw1r_func_test.ok \
%/50_riscv_512b_1rw_func_test.ok \
%/50_riscv_8k_1rw1r_func_test.ok \
%/50_riscv_8k_1rw_func_test.ok \
freepdk45/04_rom_address_control_buf_test.ok \
freepdk45/05_rom_array_test.ok \
freepdk45/06_rom_decoder_test.ok \
freepdk45/06_hierarchical_decoder_4096row_test.ok \
freepdk45/07_rom_column_mux_array_test.ok \
freepdk45/08_rom_decoder_buffer_array_test.ok \
freepdk45/08_rom_precharge_array_test.ok \
freepdk45/10_rom_wordline_driver_array_test.ok \
freepdk45/16_rom_control_logic_test.ok \
freepdk45/19_rom_bank_test.ok \
scn4m_subm/04_rom_address_control_buf_test.ok \
scn4m_subm/06_rom_decoder_test.ok \
scn4m_subm/07_rom_column_mux_array_test.ok \
scn4m_subm/06_hierarchical_decoder_4096row_test.ok \
scn4m_subm/08_rom_decoder_buffer_array_test.ok \
scn4m_subm/08_rom_precharge_array_test.ok \
scn4m_subm/10_rom_wordline_driver_array_test.ok \
scn4m_subm/14_rom_array_test.ok \
scn4m_subm/16_rom_control_logic_test.ok \
scn4m_subm/19_rom_bank_test.ok \
scn4m_subm/19_single_bank_global_bitline_test.ok \
scn4m_subm/50_riscv_1rw_phys_test.ok \
scn4m_subm/50_riscv_1rw1r_phys_test.ok \
sky130/01_library_test.ok \
sky130/03_wire_test.ok \
sky130/04_column_mux_pbitcell_test.ok \
sky130/04_dummy_pbitcell_test.ok \
sky130/04_pbitcell_test.ok \
sky130/04_pnand4_test.ok \
sky130/04_pand4_test.ok \
sky130/04_precharge_pbitcell_test.ok \
sky130/04_replica_pbitcell_test.ok \
sky130/04_dummy_pbitcell_1rw1r1w_test.ok \
sky130/04_dummy_pbitcell_1rw_test.ok \
sky130/04_replica_pbitcell_1rw1r1w_test.ok \
sky130/04_replica_pbitcell_1rw_test.ok \
sky130/05_pbitcell_array_test.ok \
sky130/05_bitcell_array_test.ok \
sky130/05_bitcell_array_1rw_1r_test.ok \
sky130/05_dummy_array_test.ok \
sky130/06_hierarchical_decoder_132row_test.ok \
sky130/06_hierarchical_decoder_512row_test.ok \
sky130/06_hierarchical_decoder_64row_test.ok \
sky130/06_hierarchical_decoder_pbitcell_test.ok \
sky130/07_column_mux_array_pbitcell_test.ok \
sky130/10_write_driver_array_spare_cols_test.ok \
sky130/10_write_driver_array_wmask_spare_cols_test.ok \
Expand All @@ -127,7 +81,6 @@ BROKEN_STAMPS = \
sky130/15_local_bitcell_array_leftrbl_1rw_test.ok \
sky130/15_local_bitcell_array_norbl_1rw_1r_test.ok \
sky130/15_local_bitcell_array_norbl_1rw_test.ok \
sky130/18_port_address_512rows_test.ok \
sky130/18_port_data_spare_cols_test.ok \
sky130/19_single_bank_2mux_test.ok \
sky130/19_single_bank_4mux_test.ok \
Expand All @@ -138,9 +91,13 @@ BROKEN_STAMPS = \
sky130/19_single_bank_nomux_norbl_test.ok \
sky130/19_single_bank_spare_cols_test.ok \
sky130/19_single_bank_wmask_test.ok \
sky130/19_pmulti_bank_test.ok \
sky130/19_psingle_bank_test.ok \
sky130/19_bank_select_pbitcell_test.ok \
sky130/20_psram_1bank_2mux_1rw_1w_test.ok \
sky130/20_psram_1bank_2mux_1rw_1w_wmask_test.ok \
sky130/20_psram_1bank_2mux_1w_1r_test.ok \
sky130/20_psram_1bank_2mux_test.ok \
sky130/20_sram_1bank_16mux_test.ok \
sky130/20_psram_1bank_4mux_1rw_1r_test.ok \
sky130/20_sram_1bank_2mux_1rw_1r_spare_cols_test.ok \
sky130/20_sram_1bank_2mux_1w_1r_spare_cols_test.ok \
Expand All @@ -164,10 +121,12 @@ BROKEN_STAMPS = \
sky130/22_psram_1bank_4mux_func_test.ok \
sky130/22_psram_1bank_8mux_func_test.ok \
sky130/22_psram_1bank_nomux_func_test.ok \
sky130/22_sram_1bank_2mux_global_func_test.ok \
sky130/22_sram_1bank_wmask_1rw_1r_func_test.ok \
sky130/22_sram_wmask_func_test.ok \
sky130/23_lib_sram_linear_regression_test.ok \
sky130/23_lib_sram_model_corners_test.ok \
sky130/23_lib_sram_model_test.ok \
sky130/23_lib_sram_prune_test.ok \
sky130/23_lib_sram_test.ok \
sky130/25_verilog_multibank_test.ok \
sky130/25_verilog_sram_test.ok \
Expand All @@ -176,21 +135,28 @@ BROKEN_STAMPS = \
sky130/30_openram_front_end_library_test.ok \
sky130/30_openram_front_end_test.ok \
sky130/30_openram_sram_char_test.ok \
sky130/30_openram_sram_func_test.ok \
sky130/50_riscv_1rw_phys_test.ok \
sky130/50_riscv_1rw1r_phys_test.ok \

gettech = $(word 1,$(subst /, ,$*))
getfile = $(word 2,$(subst /, ,$*))
TECH_TEST_STAMPS=$(foreach T, $(TECHS), $(addprefix $T/, $(TEST_STAMPS)))

# Filter out the tests after creating the tech stamps
# Filter out the broken tests after creating the tech stamps
WORKING_TECH_TEST_STAMPS=$(shell shuf -e -- $(filter-out $(BROKEN_STAMPS), $(TECH_TEST_STAMPS)))

# Filter out the working tests after creating the tech stamps
BROKEN_TECH_TEST_STAMPS=$(shell shuf -e -- $(filter $(BROKEN_STAMPS), $(TECH_TEST_STAMPS)))

# Run all technologies
all: clean $(WORKING_TECH_TEST_STAMPS)
@ls -1 $(TOP_DIR)/compiler/tests/results/*/*.bad 1> /dev/null 2>&1 && echo "FAILING TESTS" && ls -1 $(TOP_DIR)/compiler/tests/results/*/*.bad | sed -e "s#^.*results\/##" && exit 1 || exit 0
.PHONY: all

# Run broken stamps only
broken: clean $(BROKEN_TECH_TEST_STAMPS)
@ls -1 $(TOP_DIR)/compiler/tests/results/*/*.bad 1> /dev/null 2>&1 && echo "FAILING TESTS" && ls -1 $(TOP_DIR)/compiler/tests/results/*/*.bad | sed -e "s#^.*results\/##" && exit 1 || exit 0
.PHONY: broken

# Run a given technology
# e.g. make freepdk45
$(TECHS):
Expand Down

0 comments on commit 306da8a

Please sign in to comment.