Lattice
The LatticePlatform
class provides a base platform to support Lattice toolchains (not including iCE40 devices, which are supported by SiliconBluePlatform
). Currently supported devices include ECP5, MachXO2, MachXO3L, and Nexus.
The Trellis and Diamond toolchains are supported.
- class amaranth.vendor.LatticePlatform(*, toolchain=None)
Trellis toolchain (ECP5, MachXO2, MachXO3)
- Required tools:
yosys
nextpnr-ecp5
ornextpnr-machxo2
ecppack
The environment is populated by running the script specified in the environment variable
AMARANTH_ENV_TRELLIS
, if present.- Available overrides:
verbose
: enables logging of informational messages to standard error.read_verilog_opts
: adds options forread_verilog
Yosys command.synth_opts
: adds options forsynth_<family>
Yosys command.script_after_read
: inserts commands afterread_ilang
in Yosys script.script_after_synth
: inserts commands aftersynth_<family>
in Yosys script.yosys_opts
: adds extra options foryosys
.nextpnr_opts
: adds extra options fornextpnr-<family>
.ecppack_opts
: adds extra options forecppack
.add_preferences
: inserts commands at the end of the LPF file.
- Build products:
{{name}}.rpt
: Yosys log.{{name}}.json
: synthesized RTL.{{name}}.tim
: nextpnr log.{{name}}.config
: ASCII bitstream.{{name}}.bit
: binary bitstream.{{name}}.svf
: JTAG programming vector.
Oxide toolchain (Nexus)
- Required tools:
yosys
nextpnr-nexus
prjoxide
The environment is populated by running the script specified in the environment variable
AMARANTH_ENV_OXIDE
, if present.- Available overrides:
verbose
: enables logging of informational messages to standard error.read_verilog_opts
: adds options forread_verilog
Yosys command.synth_opts
: adds options forsynth_nexus
Yosys command.script_after_read
: inserts commands afterread_ilang
in Yosys script.script_after_synth
: inserts commands aftersynth_nexus
in Yosys script.yosys_opts
: adds extra options foryosys
.nextpnr_opts
: adds extra options fornextpnr-nexus
.prjoxide_opts
: adds extra options forprjoxide
.add_preferences
: inserts commands at the end of the PDC file.
- Build products:
{{name}}.rpt
: Yosys log.{{name}}.json
: synthesized RTL.{{name}}.tim
: nextpnr log.{{name}}.config
: ASCII bitstream.{{name}}.bit
: binary bitstream.{{name}}.xcf
: JTAG programming vector.
Diamond toolchain (ECP5, MachXO2, MachXO3)
- Required tools:
pnmainc
ddtcmd
The environment is populated by running the script specified in the environment variable
AMARANTH_ENV_DIAMOND
, if present. On Linux, diamond_env as provided by Diamond itself is a good candidate. On Windows, the following script (nameddiamond_env.bat
, for instance) is known to work:@echo off set PATH=C:\lscc\diamond\%DIAMOND_VERSION%\bin\nt64;%PATH%
- Available overrides:
script_project
: inserts commands beforeprj_project save
in Tcl script.script_after_export
: inserts commands afterprj_run Export
in Tcl script.add_preferences
: inserts commands at the end of the LPF file.add_constraints
: inserts commands at the end of the XDC file.
- Build products:
{{name}}_impl/{{name}}_impl.htm
: consolidated log.{{name}}.jed
: JEDEC fuse file (MachXO2, MachXO3 only).{{name}}.bit
: binary bitstream.{{name}}.svf
: JTAG programming vector (ECP5 only).{{name}}_flash.svf
: JTAG programming vector for FLASH programming (MachXO2, MachXO3 only).{{name}}_sram.svf
: JTAG programming vector for SRAM programming (MachXO2, MachXO3 only).
Radiant toolchain (Nexus)
- Required tools:
radiantc
The environment is populated by running the script specified in the environment variable
AMARANTH_ENV_RADIANT
, if present. On Linux, radiant_env as provided by Radiant itself is a good candidate. On Windows, the following script (namedradiant_env.bat
, for instance) is known to work:@echo off set PATH=C:\lscc\radiant\%RADIANT_VERSION%\bin\nt64;%PATH%
- Available overrides:
script_project
: inserts commands beforeprj_save
in Tcl script.script_after_export
: inserts commands afterprj_run Export
in Tcl script.add_constraints
: inserts commands at the end of the SDC file.add_preferences
: inserts commands at the end of the PDC file.
- Build products:
{{name}}_impl/{{name}}_impl.htm
: consolidated log.{{name}}.bit
: binary bitstream.{{name}}.xcf
: JTAG programming vector. (if usingprogrammer
)