From 0ce7c70868a0cb5f4dc37fe5687cb0d12450998e Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Fri, 31 Dec 2021 14:07:39 +0000 Subject: [PATCH] fix yosys version import --- nmigen/back/verilog.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/nmigen/back/verilog.py b/nmigen/back/verilog.py index 367488d..19a91e4 100644 --- a/nmigen/back/verilog.py +++ b/nmigen/back/verilog.py @@ -1,3 +1,4 @@ +from .._yosys import * from . import rtlil @@ -5,9 +6,9 @@ __all__ = ["YosysError", "convert", "convert_fragment"] def _convert_rtlil_text(rtlil_text, *, strip_internal_attrs=False, write_verilog_opts=()): - version, offset = _yosys_version() - if version < (0, 9): - raise YosysError("Yosys {}.{} is not supported".format(*version)) + # this version requirement needs to be synchronized with the one in setup.py! + yosys = find_yosys(lambda ver: ver >= (0, 9)) + yosys_version = yosys.version() attr_map = [] if strip_internal_attrs: -- 2.30.2