From dc1a6bcaf72d1098a9d733fad99f2aa8cc1685fb Mon Sep 17 00:00:00 2001 From: Teguh Hofstee <5227572+hofstee@users.noreply.github.com> Date: Wed, 22 Apr 2020 05:23:14 -0700 Subject: [PATCH] back.verilog: make Yosys version check compatible with Verific. --- nmigen/back/verilog.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nmigen/back/verilog.py b/nmigen/back/verilog.py index eb98a34..6e2185a 100644 --- a/nmigen/back/verilog.py +++ b/nmigen/back/verilog.py @@ -16,7 +16,8 @@ class YosysError(Exception): def _yosys_version(): yosys_path = require_tool("yosys") version = subprocess.check_output([yosys_path, "-V"], encoding="utf-8") - m = re.match(r"^Yosys ([\d.]+)(?:\+(\d+))?", version) + # If Yosys is built with Verific, then Verific license information is printed first. + m = re.search(r"^Yosys ([\d.]+)(?:\+(\d+))?", version, flags=re.M) tag, offset = m[1], m[2] or 0 return tuple(map(int, tag.split("."))), offset -- 2.30.2