parent
744154ebb5
commit
146f3cb684
|
@ -184,6 +184,7 @@ class Platform(ResourceManager, metaclass=ABCMeta):
|
|||
|
||||
|
||||
class TemplatedPlatform(Platform):
|
||||
toolchain = abstractproperty()
|
||||
file_templates = abstractproperty()
|
||||
command_templates = abstractproperty()
|
||||
|
||||
|
@ -191,11 +192,13 @@ class TemplatedPlatform(Platform):
|
|||
"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")}}
|
||||
""",
|
||||
}
|
||||
|
|
5
nmigen/vendor/lattice_ecp5.py
vendored
5
nmigen/vendor/lattice_ecp5.py
vendored
|
@ -14,6 +14,9 @@ class LatticeECP5Platform(TemplatedPlatform):
|
|||
* ``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.
|
||||
|
@ -33,6 +36,8 @@ class LatticeECP5Platform(TemplatedPlatform):
|
|||
* ``{{name}}.svf``: JTAG programming vector.
|
||||
"""
|
||||
|
||||
toolchain = "Trellis"
|
||||
|
||||
device = abstractproperty()
|
||||
package = abstractproperty()
|
||||
speed = abstractproperty()
|
||||
|
|
5
nmigen/vendor/lattice_ice40.py
vendored
5
nmigen/vendor/lattice_ice40.py
vendored
|
@ -14,6 +14,9 @@ class LatticeICE40Platform(TemplatedPlatform):
|
|||
* ``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.
|
||||
|
@ -32,6 +35,8 @@ class LatticeICE40Platform(TemplatedPlatform):
|
|||
* ``{{name}}.bin``: binary bitstream.
|
||||
"""
|
||||
|
||||
toolchain = "IceStorm"
|
||||
|
||||
device = abstractproperty()
|
||||
package = abstractproperty()
|
||||
|
||||
|
|
5
nmigen/vendor/xilinx_7series.py
vendored
5
nmigen/vendor/xilinx_7series.py
vendored
|
@ -14,6 +14,9 @@ class Xilinx7SeriesPlatform(TemplatedPlatform):
|
|||
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.
|
||||
|
@ -42,6 +45,8 @@ class Xilinx7SeriesPlatform(TemplatedPlatform):
|
|||
* ``{{name}}.bit``: binary bitstream.
|
||||
"""
|
||||
|
||||
toolchain = "Vivado"
|
||||
|
||||
device = abstractproperty()
|
||||
package = abstractproperty()
|
||||
speed = abstractproperty()
|
||||
|
|
5
nmigen/vendor/xilinx_spartan6.py
vendored
5
nmigen/vendor/xilinx_spartan6.py
vendored
|
@ -19,6 +19,9 @@ class XilinxSpartan6Platform(TemplatedPlatform):
|
|||
* ``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.
|
||||
|
@ -45,6 +48,8 @@ class XilinxSpartan6Platform(TemplatedPlatform):
|
|||
* ``{{name}}.bit``: binary bitstream.
|
||||
"""
|
||||
|
||||
toolchain = "ISE"
|
||||
|
||||
device = abstractproperty()
|
||||
package = abstractproperty()
|
||||
speed = abstractproperty()
|
||||
|
|
Loading…
Reference in a new issue