Skip to content

Commit 9a5de46

Browse files
committed
makefile: yosys 0.13 or newer required
use yosys that ships with OpenROAD if yosys is too old. It is highly likely than e.g. Ubuntu has a too old Yosys installed, so this avoids a common pitfall & confusion when relying on ORFS to find the tools in the path, i.e. when not using ". env.sh" Signed-off-by: Øyvind Harboe <[email protected]>
1 parent 3f9740e commit 9a5de46

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

flow/Makefile

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,8 +279,15 @@ OPENROAD_NO_EXIT_CMD = $(OPENROAD_EXE) $(OPENROAD_ARGS)
279279
OPENROAD_GUI_CMD = $(OPENROAD_EXE) -gui $(OR_ARGS)
280280

281281
YOSYS_CMD ?= $(shell command -v yosys)
282-
ifeq ($(YOSYS_CMD),)
282+
YOSYS_VER := $(shell $(YOSYS_CMD) -V | sed -n 's/^Yosys \([0-9]*\.[0-9]*\).*/\1/p')
283+
284+
# Semantic Versioning Comparison
285+
VERSION_GTEQ := $(shell echo -e "$(YOSYS_VER)\n0.13" | sort -V | head -n1)
286+
ifeq ($(VERSION_GTEQ),0.13)
287+
$(info Using Yosys $(YOSYS_VER) found in path, it is newer or equal to 0.13)
288+
else
283289
YOSYS_CMD = $(abspath $(FLOW_HOME)/../tools/install/yosys/bin/yosys)
290+
$(info Using $(YOSYS_CMD) instead of $(YOSYS_VER) found in path, minimum Yosys 0.13)
284291
endif
285292

286293
KLAYOUT_CMD ?= $(shell command -v klayout)

0 commit comments

Comments
 (0)