Lattice iCE40¶
The torii.platform.vendor.lattice.ice40 module provides a base platform to support Lattice iCE40 devices with the IceStorm and iCECube2 toolchains.
- class torii.platform.vendor.lattice.ice40.ICE40Platform(*, toolchain: Literal['IceStorm', 'LSE-iCECube2', 'Synplify-iCECube2'] = 'IceStorm') None¶
IceStorm toolchain
- Required tools:
yosysnextpnr-ice40icepack
The environment is populated by running the script specified in the environment variable
TORII_ENV_ICESTORM, 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_ice40Yosys command.script_after_read: inserts commands afterread_rtlilin Yosys script.script_after_synth: inserts commands aftersynth_ice40in Yosys script.yosys_opts: adds extra options foryosys.nextpnr_opts: adds extra options fornextpnr-ice40.add_pre_pack: inserts commands at the end in pre-pack Python script.add_constraints: inserts commands at the end in the PCF file.
- Build products:
{{name}}.rpt: Yosys log.{{name}}.json: synthesized RTL.{{name}}.tim: nextpnr log.{{name}}.asc: ASCII bitstream.{{name}}.bin: binary bitstream.
iCECube2 toolchain
This toolchain comes in two variants:
LSE-iCECube2andSynplify-iCECube2.- Required tools:
iCECube2 toolchain
tclsh
The environment is populated by setting the necessary environment variables based on
TORII_ENV_ICECUBE2, which must point to the root of the iCECube2 installation, and is required.- Available overrides:
verbose: enables logging of informational messages to standard error.lse_opts: adds options for LSE.script_after_add: inserts commands afteradd_filein Synplify Tcl script.script_after_options: inserts commands afterset_optionin Synplify Tcl script.add_constraints: inserts commands in SDC file.script_after_flow: inserts commands afterrun_sbt_backend_autoin SBT Tcl script.
- Build products:
{{name}}_lse.log(LSE) or{{name}}_design/{{name}}.htm(Synplify): synthesis log.sbt/outputs/router/{{name}}_timing.rpt: timing report.{{name}}.edf: EDIF netlist.{{name}}.bin: binary bitstream.