Skip to content

Commit 51f5769

Browse files
committed
replace tcl_escape with tcl_quote in Lattice Nexus vendor platform
1 parent 3e99ee4 commit 51f5769

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

amaranth/vendor/_lattice_nexus.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ class LatticeNexusPlatform(TemplatedPlatform):
192192
-dev {{platform.device}}-{{platform.speed}}{{platform.package}}{{platform.grade}} \
193193
-synthesis synplify
194194
{% for file in platform.iter_files(".v", ".sv", ".vhd", ".vhdl") -%}
195-
prj_add_source {{file|tcl_escape}}
195+
prj_add_source {{file|tcl_quote}}
196196
{% endfor %}
197197
prj_add_source {{name}}.v
198198
prj_add_source {{name}}.sdc
@@ -210,19 +210,19 @@ class LatticeNexusPlatform(TemplatedPlatform):
210210
"{{name}}.sdc": r"""
211211
{% for net_signal, port_signal, frequency in platform.iter_clock_constraints() -%}
212212
{% if port_signal is not none -%}
213-
create_clock -name {{port_signal.name|tcl_escape}} -period {{1000000000/frequency}} [get_ports {{port_signal.name}}]
213+
create_clock -name {{port_signal.name|tcl_quote}} -period {{1000000000/frequency}} [get_ports {{port_signal.name}}]
214214
{% else -%}
215-
create_clock -name {{net_signal.name|tcl_escape}} -period {{1000000000/frequency}} [get_nets {{net_signal|hierarchy("/")}}]
215+
create_clock -name {{net_signal.name|tcl_quote}} -period {{1000000000/frequency}} [get_nets {{net_signal|hierarchy("/")}}]
216216
{% endif %}
217217
{% endfor %}
218218
{{get_override("add_constraints")|default("# (add_constraints placeholder)")}}
219219
""",
220220
# Physical PDC contraints
221221
"{{name}}.pdc": r"""
222222
{% for port_name, pin_name, attrs in platform.iter_port_constraints_bits() -%}
223-
ldc_set_location -site "{{pin_name}}" [get_ports {{port_name|tcl_escape}}]
223+
ldc_set_location -site "{{pin_name}}" [get_ports {{port_name|tcl_quote}}]
224224
{% if attrs -%}
225-
ldc_set_port -iobuf { {%- for key, value in attrs.items() %} {{key}}={{value}}{% endfor %} } [get_ports {{port_name|tcl_escape}}]
225+
ldc_set_port -iobuf { {%- for key, value in attrs.items() %} {{key}}={{value}}{% endfor %} } [get_ports {{port_name|tcl_quote}}]
226226
{% endif %}
227227
{% endfor %}
228228
{{get_override("add_preferences")|default("# (add_preferences placeholder)")}}

0 commit comments

Comments
 (0)