Lattice MachXO2 and MachXO3L¶
The torii.platform.vendor.lattice.machxo_2_3l module provides a base platform to support Lattice MachXO2 and MachXO3L devices with theDiamond toolchain.
- torii.platform.vendor.lattice.machxo_2_3l.MachXO2Platform¶
alias of
MachXO2Or3LPlatform
- torii.platform.vendor.lattice.machxo_2_3l.MachXO3LPlatform¶
alias of
MachXO2Or3LPlatform
Note
Both of the above are aliases for the actual platform below, however only the aliased definitions are actually exported from the module for use.
- class torii.platform.vendor.lattice.machxo_2_3l.MachXO2Or3LPlatform(*, toolchain: Literal['Trellis', 'Diamond'] = 'Trellis') None¶
Trellis toolchain
- Required tools:
yosysnextpnr-machxo2ecppack
The environment is populated by running the script specified in the environment variable
TORII_ENV_TRELLIS, if present.- Available overrides:
verbose: enables logging of informational messages to standard error.read_verilog_opts: adds options forread_verilogYosys command.synth_opts: adds options forsynth_latticesYosys command.script_after_read: inserts commands afterread_rtlilin Yosys script.script_after_synth: inserts commands aftersynth_latticein Yosys script.yosys_opts: adds extra options foryosys.nextpnr_opts: adds extra options fornextpnr-machxo2.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.
Diamond toolchain
- Required tools:
pnmaincddtcmd
The environment is populated by running the script specified in the environment variable
TORII_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 savein Tcl script.script_after_export: inserts commands afterprj_run Exportin 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.{{name}}.bit: binary bitstream.{{name}}.svf: JTAG programming vector for FLASH programming.{{name}}_flash.svf: JTAG programming vector for FLASH programming.{{name}}_sram.svf: JTAG programming vector for SRAM programming.