@@ -188,10 +188,6 @@ ifneq ($(BLOCKS),)
188188 endif
189189endif
190190
191- export RTLMP_RPT_DIR ?= $(OBJECTS_DIR ) /rtlmp
192- export RTLMP_RPT_FILE ?= partition.txt
193- export RTLMP_BLOCKAGE_FILE ?= $(OBJECTS_DIR ) /rtlmp/partition.txt.blockage
194-
195191# -------------------------------------------------------------------------------
196192ifeq (,$(strip $(NUM_CORES ) ) )
197193 # Linux (utility program)
@@ -227,15 +223,27 @@ endif
227223# Priority is given to
228224# 1 user explicit set with variable in Makefile or command line, for instance setting OPENROAD_EXE
229225# 2 ORFS compiled tools: openroad, yosys
230- export OPENROAD_EXE ?= $(abspath $(FLOW_HOME ) /../tools/install/OpenROAD/bin/openroad)
231- 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
232236
233237OPENROAD_ARGS = -no_init -threads $(NUM_CORES ) $(OR_ARGS )
234238OPENROAD_CMD = $(OPENROAD_EXE ) -exit $(OPENROAD_ARGS )
235239OPENROAD_NO_EXIT_CMD = $(OPENROAD_EXE ) $(OPENROAD_ARGS )
236240OPENROAD_GUI_CMD = $(OPENROAD_EXE ) -gui $(OR_ARGS )
237241
238- 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
239247
240248# Use locally installed and built klayout if it exists, otherwise use klayout in path
241249KLAYOUT_DIR = $(abspath $(FLOW_HOME ) /../tools/install/klayout/)
@@ -440,8 +448,7 @@ yosys-dependencies: $(YOSYS_DEPENDENCIES)
440448.PHONY : do-yosys
441449do-yosys : $(DONT_USE_SC_LIB )
442450 mkdir -p $(RESULTS_DIR ) $(LOG_DIR ) $(REPORTS_DIR ) $(OBJECTS_DIR )
443- (export VERILOG_FILES=$( RESULTS_DIR) /1_synth.rtlil; \
444- $(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)
445452
446453.PHONY : do-yosys-canonicalize
447454do-yosys-canonicalize : yosys-dependencies $(DONT_USE_SC_LIB )
@@ -485,12 +492,6 @@ floorplan: $(RESULTS_DIR)/2_floorplan.odb \
485492
486493# ==============================================================================
487494
488- ifneq ($(FOOTPRINT ) ,)
489- IS_CHIP = 1
490- else ifneq ($(FOOTPRINT_TCL),)
491- IS_CHIP = 1
492- endif
493-
494495UNSET_VARS = for var in $(UNSET_VARIABLES_NAMES ) ; do unset $$var; done
495496
496497# FILE_MAKEFILE is needed when ORFS is invoked with
0 commit comments