Skip to content

Commit

Permalink
back.verilog: require Yosys >=0.35.
Browse files Browse the repository at this point in the history
  • Loading branch information
whitequark committed Nov 21, 2023
1 parent f9da3c0 commit 009a1e9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
10 changes: 2 additions & 8 deletions amaranth/back/verilog.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import warnings

from .._toolchain.yosys import *
from ..hdl import ast, ir
from ..lib import wiring
Expand All @@ -11,15 +9,11 @@

def _convert_rtlil_text(rtlil_text, *, strip_internal_attrs=False, write_verilog_opts=()):
# this version requirement needs to be synchronized with the one in pyproject.toml!
yosys = find_yosys(lambda ver: ver >= (0, 10))
yosys_version = yosys.version()
yosys = find_yosys(lambda ver: ver >= (0, 35))

script = []
script.append(f"read_ilang <<rtlil\n{rtlil_text}\nrtlil")
if yosys_version >= (0, 17):
script.append("proc -nomux -norom")
else:
script.append("proc -nomux")
script.append("proc -nomux -norom")
script.append("memory_collect")

if strip_internal_attrs:
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ dependencies = [

[project.optional-dependencies]
# this version requirement needs to be synchronized with the one in amaranth.back.verilog!
builtin-yosys = ["amaranth-yosys>=0.10"]
builtin-yosys = ["amaranth-yosys>=0.35"]
remote-build = ["paramiko~=2.7"]

[project.scripts]
Expand Down

0 comments on commit 009a1e9

Please sign in to comment.