|
| 1 | +# settings.mk is not under source control. Put variables into this |
| 2 | +# file to avoid having to adding the to the make command line. |
| 3 | +-include settings.mk |
| 4 | + |
1 | 5 | # ============================================================================== |
2 | 6 | # Uncomment or add the design to run |
3 | 7 | # ============================================================================== |
@@ -184,10 +188,6 @@ ifneq ($(BLOCKS),) |
184 | 188 | endif |
185 | 189 | endif |
186 | 190 |
|
187 | | -export RTLMP_RPT_DIR ?= $(OBJECTS_DIR)/rtlmp |
188 | | -export RTLMP_RPT_FILE ?= partition.txt |
189 | | -export RTLMP_BLOCKAGE_FILE ?= $(OBJECTS_DIR)/rtlmp/partition.txt.blockage |
190 | | - |
191 | 191 | #------------------------------------------------------------------------------- |
192 | 192 | ifeq (,$(strip $(NUM_CORES))) |
193 | 193 | # Linux (utility program) |
@@ -223,15 +223,27 @@ endif |
223 | 223 | # Priority is given to |
224 | 224 | # 1 user explicit set with variable in Makefile or command line, for instance setting OPENROAD_EXE |
225 | 225 | # 2 ORFS compiled tools: openroad, yosys |
226 | | -export OPENROAD_EXE ?= $(abspath $(FLOW_HOME)/../tools/install/OpenROAD/bin/openroad) |
227 | | -export OPENSTA_EXE ?= $(abspath $(FLOW_HOME)/../tools/install/OpenROAD/bin/sta) |
| 226 | +ifneq (${IN_NIX_SHELL},) |
| 227 | + export OPENROAD_EXE := $(shell command -v openroad) |
| 228 | +else |
| 229 | + export OPENROAD_EXE ?= $(abspath $(FLOW_HOME)/../tools/install/OpenROAD/bin/openroad) |
| 230 | +endif |
| 231 | +ifneq (${IN_NIX_SHELL},) |
| 232 | + export OPENSTA_EXE := $(shell command -v sta) |
| 233 | +else |
| 234 | + export OPENSTA_EXE ?= $(abspath $(FLOW_HOME)/../tools/install/OpenROAD/bin/sta) |
| 235 | +endif |
228 | 236 |
|
229 | 237 | OPENROAD_ARGS = -no_init -threads $(NUM_CORES) $(OR_ARGS) |
230 | 238 | OPENROAD_CMD = $(OPENROAD_EXE) -exit $(OPENROAD_ARGS) |
231 | 239 | OPENROAD_NO_EXIT_CMD = $(OPENROAD_EXE) $(OPENROAD_ARGS) |
232 | 240 | OPENROAD_GUI_CMD = $(OPENROAD_EXE) -gui $(OR_ARGS) |
233 | 241 |
|
234 | | -YOSYS_EXE ?= $(abspath $(FLOW_HOME)/../tools/install/yosys/bin/yosys) |
| 242 | +ifneq (${IN_NIX_SHELL},) |
| 243 | + YOSYS_EXE := $(shell command -v yosys) |
| 244 | +else |
| 245 | + YOSYS_EXE ?= $(abspath $(FLOW_HOME)/../tools/install/yosys/bin/yosys) |
| 246 | +endif |
235 | 247 |
|
236 | 248 | # Use locally installed and built klayout if it exists, otherwise use klayout in path |
237 | 249 | KLAYOUT_DIR = $(abspath $(FLOW_HOME)/../tools/install/klayout/) |
@@ -436,8 +448,7 @@ yosys-dependencies: $(YOSYS_DEPENDENCIES) |
436 | 448 | .PHONY: do-yosys |
437 | 449 | do-yosys: $(DONT_USE_SC_LIB) |
438 | 450 | mkdir -p $(RESULTS_DIR) $(LOG_DIR) $(REPORTS_DIR) $(OBJECTS_DIR) |
439 | | - (export VERILOG_FILES=$(RESULTS_DIR)/1_synth.rtlil; \ |
440 | | - $(TIME_CMD) $(YOSYS_EXE) $(YOSYS_FLAGS) -c $(SYNTH_SCRIPT)) 2>&1 | tee $(abspath $(LOG_DIR)/1_1_yosys.log) |
| 451 | + ($(TIME_CMD) $(YOSYS_EXE) $(YOSYS_FLAGS) -c $(SYNTH_SCRIPT)) 2>&1 | tee $(abspath $(LOG_DIR)/1_1_yosys.log) |
441 | 452 |
|
442 | 453 | .PHONY: do-yosys-canonicalize |
443 | 454 | do-yosys-canonicalize: yosys-dependencies $(DONT_USE_SC_LIB) |
|
0 commit comments