From ccfda16ab2bbf738ebcd432ce2dfd11b5d51f18e Mon Sep 17 00:00:00 2001 From: Hunter Nichols Date: Sun, 30 May 2021 22:19:56 -0700 Subject: [PATCH] Changed makefile to include okay files to indicate which configs have already been simulated for the existing models. --- compiler/Makefile | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/compiler/Makefile b/compiler/Makefile index 17415b07..5eecdbc7 100644 --- a/compiler/Makefile +++ b/compiler/Makefile @@ -64,12 +64,17 @@ usage: ${USAGE_TESTS} $(ALL_TESTS): python3 $@ -t ${TECH} + + OPENRAM_TECHS = $(subst :, ,$(OPENRAM_TECH)) TECH_DIR := $(word 1, $(foreach dir,$(OPENRAM_TECHS),$(wildcard $(dir)/$(TECH)))) CONFIG_DIR = $(OPENRAM_HOME)/model_configs MODEL_CONFIGS = $(wildcard $(CONFIG_DIR)/*.py) SIM_DIR = $(OPENRAM_HOME)/model_data/$(TECH) CSV_DIR = $(TECH_DIR)/sim_data +# Creates names of technology specific okay files for the configs +STAMPS=$(addprefix $(SIM_DIR)/, $(addsuffix .ok, $(notdir $(basename $(MODEL_CONFIGS))))) + OPTS = # Characterize and perform DRC/LVS OPTS += -c @@ -80,18 +85,20 @@ OPTS += -n # Spice OPTS += -s hspice -.PHONY: ${MODEL_CONFIGS} - .PHONY: model -model: $(MODEL_CONFIGS) +model: $(STAMPS) mkdir -p $(CSV_DIR) python3 $(OPENRAM_HOME)/model_data_util.py $(SIM_DIR) $(CSV_DIR) - -$(MODEL_CONFIGS): - $(eval bname=$(basename $(notdir $@))) + +%.ok: $(DIR)/$(addsuffix .py, $(notdir %)) + $(eval bname=$(basename $(notdir $<))) mkdir -p $(SIM_DIR)/$(bname) - -python3 $(OPENRAM_HOME)/openram.py $(OPTS) -p $(SIM_DIR)/$(bname) -o $(bname) -t $(TECH) $@ 2>&1 > /dev/null + -python3 $(OPENRAM_HOME)/openram.py $(OPTS) -p $(SIM_DIR)/$(bname) -o $(bname) -t $(TECH) $< 2>&1 > /dev/null + touch $@ + +clean_model: + rm -f -r $(SIM_DIR)/*.ok clean: find . -name \*.pyc -exec rm {} \;