From 43191e7e799237b0ebf2ae115a0f74e023fb245d Mon Sep 17 00:00:00 2001 From: whitequark Date: Mon, 26 Aug 2019 09:35:37 +0000 Subject: [PATCH] back.verilog: bump Yosys version requirement to 0.9. Fixes #55. --- nmigen/back/verilog.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/nmigen/back/verilog.py b/nmigen/back/verilog.py index 85a7d44..2552df0 100644 --- a/nmigen/back/verilog.py +++ b/nmigen/back/verilog.py @@ -23,14 +23,14 @@ def _yosys_version(): raise YosysError("Could not find Yosys in PATH. Place `yosys` in PATH or specify " "path explicitly via the YOSYS environment variable") from e - m = re.match(r"^Yosys ([\d.]+)\+(\d+)", version) - tag, offset = m[1], m[2] + m = re.match(r"^Yosys ([\d.]+)(?:\+(\d+))?", version) + tag, offset = m[1], m[2] or 0 return tuple(map(int, tag.split("."))), offset def _convert_il_text(il_text, strip_src): version, offset = _yosys_version() - if version < (0, 8): + if version < (0, 9): raise YosysError("Yosys %d.%d is not suppored", *version) attr_map = [] @@ -42,7 +42,7 @@ def _convert_il_text(il_text, strip_src): read_ilang <