Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

back/vendor: s/ilang/rtlil as a result of YosysHQ/yosys#4704 #1542

Merged
merged 1 commit into from
Nov 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions amaranth/back/cxxrtl.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ def _convert_rtlil_text(rtlil_text, black_boxes, *, src_loc_at=0):
script = []
if black_boxes is not None:
for box_name, box_source in black_boxes.items():
script.append(f"read_ilang <<rtlil\n{box_source}\nrtlil")
script.append(f"read_ilang <<rtlil\n{rtlil_text}\nrtlil")
script.append(f"read_rtlil <<rtlil\n{box_source}\nrtlil")
script.append(f"read_rtlil <<rtlil\n{rtlil_text}\nrtlil")
script.append("write_cxxrtl")

return yosys.run(["-q", "-"], "\n".join(script), src_loc_at=1 + src_loc_at)
Expand Down
2 changes: 1 addition & 1 deletion amaranth/back/verilog.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
yosys = find_yosys(lambda ver: ver >= (0, 40))

script = []
script.append(f"read_ilang <<rtlil\n{rtlil_text}\nrtlil")
script.append(f"read_rtlil <<rtlil\n{rtlil_text}\nrtlil")

Check warning on line 15 in amaranth/back/verilog.py

View check run for this annotation

Codecov / codecov/patch

amaranth/back/verilog.py#L15

Added line #L15 was not covered by tests
script.append("proc -nomux -norom")
script.append("memory_collect")

Expand Down
6 changes: 3 additions & 3 deletions amaranth/vendor/_altera.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ class AlteraPlatform(TemplatedPlatform):
* ``verbose``: enables logging of informational messages to standard error.
* ``read_verilog_opts``: adds options for ``read_verilog`` Yosys command.
* ``synth_opts``: adds options for ``synth_intel_alm`` Yosys command.
* ``script_after_read``: inserts commands after ``read_ilang`` in Yosys script.
* ``script_after_read``: inserts commands after ``read_rtlil`` in Yosys script.
* ``script_after_synth``: inserts commands after ``synth_intel_alm`` in Yosys script.
* ``yosys_opts``: adds extra options for ``yosys``.
* ``nextpnr_opts``: adds extra options for ``nextpnr-mistral``.
Expand Down Expand Up @@ -373,9 +373,9 @@ class AlteraPlatform(TemplatedPlatform):
read_verilog -sv {{get_override("read_verilog_opts")|options}} {{file}}
{% endfor %}
{% for file in platform.iter_files(".il") -%}
read_ilang {{file}}
read_rtlil {{file}}
{% endfor %}
read_ilang {{name}}.il
read_rtlil {{name}}.il
{{get_override("script_after_read")|default("# (script_after_read placeholder)")}}
synth_intel_alm {{get_override("synth_opts")|options}} -top {{name}}
{{get_override("script_after_synth")|default("# (script_after_synth placeholder)")}}
Expand Down
4 changes: 2 additions & 2 deletions amaranth/vendor/_gowin.py
Original file line number Diff line number Diff line change
Expand Up @@ -383,9 +383,9 @@ def _osc_div(self):
read_verilog -sv {{get_override("read_verilog_opts")|options}} {{file}}
{% endfor %}
{% for file in platform.iter_files(".il") -%}
read_ilang {{file}}
read_rtlil {{file}}
{% endfor %}
read_ilang {{name}}.il
read_rtlil {{name}}.il
{{get_override("script_after_read")|default("# (script_after_read placeholder)")}}
synth_gowin {{get_override("synth_opts")|options}} -top {{name}} -json {{name}}.syn.json
{{get_override("script_after_synth")|default("# (script_after_synth placeholder)")}}
Expand Down
12 changes: 6 additions & 6 deletions amaranth/vendor/_lattice.py
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ class LatticePlatform(TemplatedPlatform):
* ``verbose``: enables logging of informational messages to standard error.
* ``read_verilog_opts``: adds options for ``read_verilog`` Yosys command.
* ``synth_opts``: adds options for ``synth_<family>`` Yosys command.
* ``script_after_read``: inserts commands after ``read_ilang`` in Yosys script.
* ``script_after_read``: inserts commands after ``read_rtlil`` in Yosys script.
* ``script_after_synth``: inserts commands after ``synth_<family>`` in Yosys script.
* ``yosys_opts``: adds extra options for ``yosys``.
* ``nextpnr_opts``: adds extra options for ``nextpnr-<family>``.
Expand Down Expand Up @@ -348,7 +348,7 @@ class LatticePlatform(TemplatedPlatform):
* ``verbose``: enables logging of informational messages to standard error.
* ``read_verilog_opts``: adds options for ``read_verilog`` Yosys command.
* ``synth_opts``: adds options for ``synth_nexus`` Yosys command.
* ``script_after_read``: inserts commands after ``read_ilang`` in Yosys script.
* ``script_after_read``: inserts commands after ``read_rtlil`` in Yosys script.
* ``script_after_synth``: inserts commands after ``synth_nexus`` in Yosys script.
* ``yosys_opts``: adds extra options for ``yosys``.
* ``nextpnr_opts``: adds extra options for ``nextpnr-nexus``.
Expand Down Expand Up @@ -474,9 +474,9 @@ class LatticePlatform(TemplatedPlatform):
read_verilog -sv {{get_override("read_verilog_opts")|options}} {{file}}
{% endfor %}
{% for file in platform.iter_files(".il") -%}
read_ilang {{file}}
read_rtlil {{file}}
{% endfor %}
read_ilang {{name}}.il
read_rtlil {{name}}.il
{{get_override("script_after_read")|default("# (script_after_read placeholder)")}}
{% if platform.family == "ecp5" %}
synth_ecp5 {{get_override("synth_opts")|options}} -top {{name}}
Expand Down Expand Up @@ -566,9 +566,9 @@ class LatticePlatform(TemplatedPlatform):
read_verilog -sv {{get_override("read_verilog_opts")|options}} {{file}}
{% endfor %}
{% for file in platform.iter_files(".il") -%}
read_ilang {{file}}
read_rtlil {{file}}
{% endfor %}
read_ilang {{name}}.il
read_rtlil {{name}}.il
delete w:$verilog_initial_trigger
{{get_override("script_after_read")|default("# (script_after_read placeholder)")}}
synth_nexus {{get_override("synth_opts")|options}} -top {{name}}
Expand Down
6 changes: 3 additions & 3 deletions amaranth/vendor/_siliconblue.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class SiliconBluePlatform(TemplatedPlatform):
* ``verbose``: enables logging of informational messages to standard error.
* ``read_verilog_opts``: adds options for ``read_verilog`` Yosys command.
* ``synth_opts``: adds options for ``synth_ice40`` Yosys command.
* ``script_after_read``: inserts commands after ``read_ilang`` in Yosys script.
* ``script_after_read``: inserts commands after ``read_rtlil`` in Yosys script.
* ``script_after_synth``: inserts commands after ``synth_ice40`` in Yosys script.
* ``yosys_opts``: adds extra options for ``yosys``.
* ``nextpnr_opts``: adds extra options for ``nextpnr-ice40``.
Expand Down Expand Up @@ -122,9 +122,9 @@ class SiliconBluePlatform(TemplatedPlatform):
read_verilog -sv {{get_override("read_verilog_opts")|options}} {{file}}
{% endfor %}
{% for file in platform.iter_files(".il") -%}
read_ilang {{file}}
read_rtlil {{file}}
{% endfor %}
read_ilang {{name}}.il
read_rtlil {{name}}.il
{{get_override("script_after_read")|default("# (script_after_read placeholder)")}}
synth_ice40 {{get_override("synth_opts")|options}} -top {{name}}
{{get_override("script_after_synth")|default("# (script_after_synth placeholder)")}}
Expand Down
2 changes: 1 addition & 1 deletion tests/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ def assertFormal(self, spec, ports=None, mode="bmc", depth=1):
smtbmc

[script]
read_ilang top.il
read_rtlil top.il
prep
{script}

Expand Down
Loading