back.verilog: make Yosys version check compatible with Verific.
This commit is contained in:
parent
0e18429fb7
commit
875579ea50
|
@ -16,7 +16,8 @@ class YosysError(Exception):
|
||||||
def _yosys_version():
|
def _yosys_version():
|
||||||
yosys_path = require_tool("yosys")
|
yosys_path = require_tool("yosys")
|
||||||
version = subprocess.check_output([yosys_path, "-V"], encoding="utf-8")
|
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
|
tag, offset = m[1], m[2] or 0
|
||||||
return tuple(map(int, tag.split("."))), offset
|
return tuple(map(int, tag.split("."))), offset
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue