projects
/
nmigen.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0e18429
)
back.verilog: make Yosys version check compatible with Verific.
author
Teguh Hofstee
<5227572+hofstee@users.noreply.github.com>
Wed, 22 Apr 2020 12:23:14 +0000
(
05:23
-0700)
committer
GitHub
<noreply@github.com>
Wed, 22 Apr 2020 12:23:14 +0000
(12:23 +0000)
nmigen/back/verilog.py
patch
|
blob
|
history
diff --git
a/nmigen/back/verilog.py
b/nmigen/back/verilog.py
index eb98a34cf1dd42fa88d70ad832d81646526430a2..6e2185abcdbe8a0df63b12f23d60ed497ab22502 100644
(file)
--- 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