[vlsi] Add USE_SRAM_COMPILER Makefile flag to use memory compiler defined in tech library
@@ -25,9 +25,15 @@ tech_dir ?= $(if $(filter $(tech_name),asap7 nangate45),\
SMEMS_COMP ?= $(tech_dir)/sram-compiler.json
SMEMS_CACHE ?= $(tech_dir)/sram-cache.json
SMEMS_HAMMER ?= $(build_dir)/$(long_name).mems.hammer.json
-MACROCOMPILER_MODE ?= $(if $(filter $(tech_name),asap7),\
- --mode synflops,\
- -l $(SMEMS_CACHE) -hir $(SMEMS_HAMMER) --mode strict)
+
+ifeq ($(tech_name),asap7)
+ MACROCOMPILER_MODE ?= --mode synflops
+else ifdef USE_SRAM_COMPILER
+ MACROCOMPILER_MODE ?= -l $(SMEMS_COMP) --use-compiler -hir $(SMEMS_HAMMER) --mode strict
+else
+ MACROCOMPILER_MODE ?= -l $(SMEMS_CACHE) -hir $(SMEMS_HAMMER) --mode strict
+endif
+
ENV_YML ?= $(vlsi_dir)/env.yml
INPUT_CONFS ?= $(if $(filter $(tech_name),nangate45),\
example-nangate45.yml,\
