OpenRAM/compiler/Makefile

72 lines
1.5 KiB
Makefile
Raw Normal View History

2018-12-05 21:58:10 +01:00
TECH = scn4m_subm
CUR_DIR = $(shell pwd)
TEST_DIR = ${CUR_DIR}/tests
2018-12-05 21:58:10 +01:00
MAKEFLAGS += -j 1
# Library test
2018-12-05 21:58:10 +01:00
LIBRARY_TESTS = $(shell find ${TEST_DIR} -name 0[1-2]*_test.py)
# Technology and DRC tests (along with ptx)
2018-12-05 21:58:10 +01:00
TECH_TESTS = $(shell find ${TEST_DIR} -name 03*_test.py)
# Parameterized cells
2018-12-05 21:58:10 +01:00
CELL_TESTS = $(shell find ${TEST_DIR} -name 04*_test.py)
# Dynamically generated modules and arrays
2018-12-05 21:58:10 +01:00
MODULE_TESTS = $(shell find ${TEST_DIR} -name 0[5-9]*_test.py)\
$(shell find ${TEST_DIR} -name 1*_test.py)
# Top-level SRAM configurations
2018-12-05 21:58:10 +01:00
TOP_TESTS = $(shell find ${TEST_DIR} -name 20*_test.py)
# All simulation tests.
2018-12-05 21:58:10 +01:00
CHAR_TESTS = $(shell find ${TEST_DIR} -name 2[1-2]*_test.py)
# Keep the model lib test here since it is fast
# and doesn't need simulation.
2018-12-05 21:58:10 +01:00
USAGE_TESTS = $(shell find ${TEST_DIR} -name 2[3-9]*_test.py)\
$(shell find ${TEST_DIR} -name 30*_test.py)
2018-12-05 21:58:10 +01:00
ALL_TESTS = \
${LIBRARY_TESTS} \
${TECH_TESTS} \
2018-12-05 21:58:10 +01:00
${CELL_TESTS} \
${MODULE_TESTS} \
${TOP_TESTS} \
${CHAR_TESTS} \
${USAGE_TESTS}
2018-12-05 21:58:10 +01:00
.PHONY: ${ALL_TESTS}
2018-12-05 21:58:10 +01:00
all: ${ALL_TESTS}
# Library tests
lib: ${LIBRARY_TESTS}
# Transistor and wire tests
tech: ${TECH_TESTS}
# Dynamically generated cells
2018-12-05 21:58:10 +01:00
cell: ${CELL_TESTS}
# Dynamically generated modules
2018-12-05 21:58:10 +01:00
module: ${MODULE_TESTS}
# Top level SRAM tests
top: ${TOP_TESTS}
# Timing and characterization tests
char: ${CHAR_TESTS}
# Usage and file generation
usage: ${USAGE_TESTS}
2018-12-05 21:58:10 +01:00
$(ALL_TESTS):
python3 $@ -t ${TECH}
clean:
find . -name \*.pyc -exec rm {} \;
find . -name \*~ -exec rm {} \;