Skip to content

Commit 8ccc083

Browse files
committed
vendor: remove unused/untested/unintelligible _lattice_nexus build code. NFC
1 parent 1cc36c2 commit 8ccc083

File tree

1 file changed

+5
-27
lines changed

1 file changed

+5
-27
lines changed

amaranth/vendor/_lattice_nexus.py

Lines changed: 5 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ class LatticeNexusPlatform(TemplatedPlatform):
1515
* ``nextpnr-nexus``
1616
* ``prjoxide``
1717
18-
FIXME The environment is populated by running the script specified in the environment variable
18+
The environment is populated by running the script specified in the environment variable
1919
``AMARANTH_ENV_OXIDE``, if present.
2020
2121
Available overrides:
@@ -27,7 +27,7 @@ class LatticeNexusPlatform(TemplatedPlatform):
2727
* ``yosys_opts``: adds extra options for ``yosys``.
2828
* ``nextpnr_opts``: adds extra options for ``nextpnr-nexus``.
2929
* ``prjoxide_opts``: adds extra options for ``prjoxide``.
30-
* ``add_preferences``: inserts commands at the end of the LPF file.
30+
* ``add_preferences``: inserts commands at the end of the PDC file.
3131
3232
Build products:
3333
* ``{{name}}.rpt``: Yosys log.
@@ -40,9 +40,7 @@ class LatticeNexusPlatform(TemplatedPlatform):
4040
.. rubric:: Radiant toolchain
4141
4242
Required tools:
43-
* ``yosys`` # optional
4443
* ``radiantc``
45-
* ``programmer`` # optional
4644
4745
The environment is populated by running the script specified in the environment variable
4846
``AMARANTH_ENV_RADIANT``, if present. On Linux, radiant_env as provided by Radiant
@@ -129,15 +127,6 @@ class LatticeNexusPlatform(TemplatedPlatform):
129127
ldc_set_port -iobuf {{ '{' }}{%- for key, value in attrs.items() %}{{key}}={{value}} {% endfor %}{{ '}' }} {{'['}}get_ports {{port_name}}{{']'}}
130128
{% endif %}
131129
{% endfor %}
132-
{% for net_signal, port_signal, frequency in platform.iter_clock_constraints() -%}
133-
{#
134-
{% if port_signal is not none -%}
135-
set_frequency "{{port_signal.name}}" {{frequency/1000000}};
136-
{% else -%}
137-
set_frequency "{{net_signal|hierarchy(".")}}" {{frequency}} HZ;
138-
{% endif %}
139-
#}
140-
{% endfor %}
141130
{{get_override("add_preferences")|default("# (add_preferences placeholder)")}}
142131
"""
143132
}
@@ -159,7 +148,7 @@ class LatticeNexusPlatform(TemplatedPlatform):
159148
""",
160149
r"""
161150
{{invoke_tool("prjoxide")}}
162-
{# {{verbose("--verbose")}} #}
151+
{{verbose("--verbose")}}
163152
{{get_override("prjoxide_opts")|options}}
164153
pack {{name}}.fasm
165154
{{name}}.bit
@@ -234,18 +223,7 @@ class LatticeNexusPlatform(TemplatedPlatform):
234223
{{invoke_tool("radiantc")}}
235224
{{name}}.tcl
236225
""",
237-
## TODO: FIXME
238-
#r"""
239-
#{{invoke_tool("programmer")}}
240-
# -oft -bit
241-
# -if {{name}}_impl/{{name}}_impl.bit -of {{name}}.bit
242-
#""",
243-
#r"""
244-
#{{invoke_tool("programmer")}}
245-
# -oft -xcfsingle -revd -op "Fast Program"
246-
# -if {{name}}_impl/{{name}}_impl.bit -of {{name}}.xcf
247-
#""",
248-
]
226+
]
249227

250228
# Common logic
251229

@@ -689,7 +667,7 @@ def get_oneg(a, invert):
689667
if "o" in pin.dir:
690668
o = pin_o
691669
if pin.dir in ("oe", "io"):
692-
t = Repl(~pin.oe, pin.width)
670+
t = (~pin.oe).replicate(pin.width)
693671
elif pin.xdr == 1:
694672
if "i" in pin.dir:
695673
get_ireg(pin.i_clk, i, pin_i)

0 commit comments

Comments
 (0)