Fixes #131.
class TemplatedPlatform(Platform):
+ toolchain = abstractproperty()
file_templates = abstractproperty()
command_templates = abstractproperty()
"build_{{name}}.sh": """
# {{autogenerated}}
set -e{{verbose("x")}}
+ [ -n "$NMIGEN_{{platform.toolchain}}_env" ] && . "$NMIGEN_{{platform.toolchain}}_env"
{{emit_commands("sh")}}
""",
"build_{{name}}.bat": """
@rem {{autogenerated}}
{{quiet("@echo off")}}
+ if defined NMIGEN_{{platform.toolchain}}_env call %NMIGEN_{{platform.toolchain}}_env%
{{emit_commands("bat")}}
""",
}
* ``nextpnr-ecp5``
* ``ecppack``
+ The environment is populated by running the script specified in the environment variable
+ ``NMIGEN_Trellis_env``, if present.
+
Available overrides:
* ``verbose``: enables logging of informational messages to standard error.
* ``read_verilog_opts``: adds options for ``read_verilog`` Yosys command.
* ``{{name}}.svf``: JTAG programming vector.
"""
+ toolchain = "Trellis"
+
device = abstractproperty()
package = abstractproperty()
speed = abstractproperty()
* ``nextpnr-ice40``
* ``icepack``
+ The environment is populated by running the script specified in the environment variable
+ ``NMIGEN_IceStorm_env``, if present.
+
Available overrides:
* ``verbose``: enables logging of informational messages to standard error.
* ``read_verilog_opts``: adds options for ``read_verilog`` Yosys command.
* ``{{name}}.bin``: binary bitstream.
"""
+ toolchain = "IceStorm"
+
device = abstractproperty()
package = abstractproperty()
Required tools:
* ``vivado``
+ The environment is populated by running the script specified in the environment variable
+ ``NMIGEN_Vivado_env``, if present.
+
Available overrides:
* ``script_after_read``: inserts commands after ``read_xdc`` in Tcl script.
* ``script_after_synth``: inserts commands after ``synth_design`` in Tcl script.
* ``{{name}}.bit``: binary bitstream.
"""
+ toolchain = "Vivado"
+
device = abstractproperty()
package = abstractproperty()
speed = abstractproperty()
* ``par``
* ``bitgen``
+ The environment is populated by running the script specified in the environment variable
+ ``NMIGEN_ISE_env``, if present.
+
Available overrides:
* ``script_after_run``: inserts commands after ``run`` in XST script.
* ``add_constraints``: inserts commands in UCF file.
* ``{{name}}.bit``: binary bitstream.
"""
+ toolchain = "ISE"
+
device = abstractproperty()
package = abstractproperty()
speed = abstractproperty()