def toolchain_prepare(self, fragment, name, **kwargs):
# This notice serves a dual purpose: to explain that the file is autogenerated,
- # and to incorporate
+ # and to incorporate the nMigen version into generated code.
autogenerated = "Automatically generated by nMigen {}. Do not edit.".format(__version__)
def emit_design(backend):
Available overrides:
* ``verbose``: enables logging of informational messages to standard error.
- * ``read_opts``: adds options for ``read`` Yosys command.
+ * ``read_verilog_opts``: adds options for ``read_verilog`` Yosys command.
* ``synth_opts``: adds options for ``synth_ice40`` Yosys command.
* ``script_after_read``: inserts commands after ``read_ilang`` in Yosys script.
* ``script_after_synth``: inserts commands after ``synth_ice40`` in Yosys script.
""",
"{{name}}_pre_pack.py": r"""
# {{autogenerated}}
- {% for port, frequency in platform.iter_clock_constraints() -%}
+ {% for port_name, frequency in platform.iter_clock_constraints() -%}
{# Clock in MHz #}
- ctx.addClock("{{port}}", {{frequency/1000000}})
+ ctx.addClock("{{port_name}}", {{frequency/1000000}})
{% endfor%}
""",
}
""",
r"""
{{get_tool("nextpnr-ice40")}}
- {{quiet("-q")}}
+ {{quiet("--quiet")}}
{{get_override("nextpnr_opts")|default(["--placer","heap"])|join(" ")}}
- -l {{name}}.tim
+ --log {{name}}.tim
{{platform._nextpnr_device_options[platform.device]}}
--package {{platform.package|lower}}
--json {{name}}.json