vendor.lattice_ice40: use pcf files instead of pre-pack Python scripts.
This allows to use nextpnr-ice40 built without Python with nMigen. Requires nextpnr revision YosysHQ/nextpnr@8c0610e84f or newer.
This commit is contained in:
parent
be6c16d0a2
commit
88649defda
11
nmigen/vendor/lattice_ice40.py
vendored
11
nmigen/vendor/lattice_ice40.py
vendored
|
@ -126,19 +126,14 @@ class LatticeICE40Platform(TemplatedPlatform):
|
||||||
{{get_override("script_after_synth")|default("# (script_after_synth placeholder)")}}
|
{{get_override("script_after_synth")|default("# (script_after_synth placeholder)")}}
|
||||||
write_json {{name}}.json
|
write_json {{name}}.json
|
||||||
""",
|
""",
|
||||||
"{{name}}_pre_pack.py": r"""
|
|
||||||
# {{autogenerated}}
|
|
||||||
{% for signal, frequency in platform.iter_clock_constraints() -%}
|
|
||||||
{# Clock in MHz #}
|
|
||||||
ctx.addClock("{{signal|hierarchy(".")}}", {{frequency/1000000}})
|
|
||||||
{% endfor%}
|
|
||||||
{{get_override("add_pre_pack")|default("# (add_pre_pack placeholder)")}}
|
|
||||||
""",
|
|
||||||
"{{name}}.pcf": r"""
|
"{{name}}.pcf": r"""
|
||||||
# {{autogenerated}}
|
# {{autogenerated}}
|
||||||
{% for port_name, pin_name, attrs in platform.iter_port_constraints_bits() -%}
|
{% for port_name, pin_name, attrs in platform.iter_port_constraints_bits() -%}
|
||||||
set_io {{port_name}} {{pin_name}}
|
set_io {{port_name}} {{pin_name}}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
{% for signal, frequency in platform.iter_clock_constraints() -%}
|
||||||
|
set_frequency "{{signal|hierarchy(".")}}" {{frequency/1000000}}
|
||||||
|
{% endfor%}
|
||||||
{{get_override("add_constraints")|default("# (add_constraints placeholder)")}}
|
{{get_override("add_constraints")|default("# (add_constraints placeholder)")}}
|
||||||
""",
|
""",
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue