vendor.lattice_{ecp5,ice40}: allow clock constraints on arbitrary signals.
Fixes #88.
This commit is contained in:
parent
378e924280
commit
91ef2f58e3
4
nmigen/vendor/lattice_ecp5.py
vendored
4
nmigen/vendor/lattice_ecp5.py
vendored
|
@ -121,7 +121,7 @@ class LatticeECP5Platform(TemplatedPlatform):
|
|||
{%- for key, value in extras.items() %} {{key}}={{value}}{% endfor %};
|
||||
{% endfor %}
|
||||
{% for signal, frequency in platform.iter_clock_constraints() -%}
|
||||
FREQUENCY PORT "{{signal.name}}" {{frequency}} HZ;
|
||||
FREQUENCY NET "{{signal|hierarchy(".")}}" {{frequency}} HZ;
|
||||
{% endfor %}
|
||||
"""
|
||||
}
|
||||
|
@ -203,7 +203,7 @@ class LatticeECP5Platform(TemplatedPlatform):
|
|||
{%- for key, value in extras.items() %} {{key}}={{value}}{% endfor %};
|
||||
{% endfor %}
|
||||
{% for signal, frequency in platform.iter_clock_constraints() -%}
|
||||
FREQUENCY PORT "{{signal.name}}" {{frequency/1000000}} MHZ;
|
||||
FREQUENCY NET "{{signal|hierarchy("/")}}" {{frequency/1000000}} MHZ;
|
||||
{% endfor %}
|
||||
{{get_override("add_preferences")|default("# (add_preferences placeholder)")}}
|
||||
""",
|
||||
|
|
2
nmigen/vendor/lattice_ice40.py
vendored
2
nmigen/vendor/lattice_ice40.py
vendored
|
@ -97,7 +97,7 @@ class LatticeICE40Platform(TemplatedPlatform):
|
|||
# {{autogenerated}}
|
||||
{% for signal, frequency in platform.iter_clock_constraints() -%}
|
||||
{# Clock in MHz #}
|
||||
ctx.addClock("{{signal.name}}", {{frequency/1000000}})
|
||||
ctx.addClock("{{signal|hierarchy(".")}}", {{frequency/1000000}})
|
||||
{% endfor%}
|
||||
""",
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue