vendor.intel: double-quote Tcl values rather than brace-quoting.
For unknown reasons, Quartus treats {foo} and "foo" in completely
different ways, which is not true for normal Tcl code; specifically,
it preserves the braces if they are used. Because of this, since
commit 6cee2804, the vendor.intel package was completely broken.
This commit is contained in:
parent
702e41ba3c
commit
7238e58224
2 changed files with 11 additions and 7 deletions
14
nmigen/vendor/intel.py
vendored
14
nmigen/vendor/intel.py
vendored
|
|
@ -85,22 +85,22 @@ class IntelPlatform(TemplatedPlatform):
|
|||
{% endif %}
|
||||
|
||||
{% for file in platform.iter_extra_files(".v") -%}
|
||||
set_global_assignment -name VERILOG_FILE {{file|tcl_escape}}
|
||||
set_global_assignment -name VERILOG_FILE {{file|tcl_quote}}
|
||||
{% endfor %}
|
||||
{% for file in platform.iter_extra_files(".sv") -%}
|
||||
set_global_assignment -name SYSTEMVERILOG_FILE {{file|tcl_escape}}
|
||||
set_global_assignment -name SYSTEMVERILOG_FILE {{file|tcl_quote}}
|
||||
{% endfor %}
|
||||
{% for file in platform.iter_extra_files(".vhd", ".vhdl") -%}
|
||||
set_global_assignment -name VHDL_FILE {{file|tcl_escape}}
|
||||
set_global_assignment -name VHDL_FILE {{file|tcl_quote}}
|
||||
{% endfor %}
|
||||
set_global_assignment -name VERILOG_FILE {{name}}.v
|
||||
set_global_assignment -name TOP_LEVEL_ENTITY {{name}}
|
||||
|
||||
set_global_assignment -name DEVICE {{platform.device}}{{platform.package}}{{platform.speed}}{{platform.suffix}}
|
||||
{% for port_name, pin_name, attrs in platform.iter_port_constraints_bits() -%}
|
||||
set_location_assignment -to {{port_name|tcl_escape}} PIN_{{pin_name}}
|
||||
set_location_assignment -to {{port_name|tcl_quote}} PIN_{{pin_name}}
|
||||
{% for key, value in attrs.items() -%}
|
||||
set_instance_assignment -to {{port_name|tcl_escape}} -name {{key}} {{value|tcl_escape}}
|
||||
set_instance_assignment -to {{port_name|tcl_quote}} -name {{key}} {{value|tcl_quote}}
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
|
||||
|
|
@ -109,9 +109,9 @@ class IntelPlatform(TemplatedPlatform):
|
|||
"{{name}}.sdc": r"""
|
||||
{% for net_signal, port_signal, frequency in platform.iter_clock_constraints() -%}
|
||||
{% if port_signal is not none -%}
|
||||
create_clock -name {{port_signal.name|tcl_escape}} -period {{1000000000/frequency}} [get_ports {{port_signal.name|tcl_escape}}]
|
||||
create_clock -name {{port_signal.name|tcl_quote}} -period {{1000000000/frequency}} [get_ports {{port_signal.name|tcl_quote}}]
|
||||
{% else -%}
|
||||
create_clock -name {{net_signal.name|tcl_escape}} -period {{1000000000/frequency}} [get_nets {{net_signal|hierarchy("|")|tcl_escape}}]
|
||||
create_clock -name {{net_signal.name|tcl_quote}} -period {{1000000000/frequency}} [get_nets {{net_signal|hierarchy("|")|tcl_quote}}]
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
""",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue