Gowin

The torii.platform.vendor.gowin module provides a base platform to support Gowin FPGAs with the Gowin and Apicula toolchains.

class torii.platform.vendor.gowin.GowinPlatform(*, toolchain='Apicula') None

Apicula toolchain

Required tools:
  • yosys

  • nextpnr-gowin or nextpnr-himbaechel (newer)

  • gowin_pack

The environment is populated by running the script specified in the environment variable TORII_ENV_APICULA, if present.

Available overrides:
  • gowin_pack_opts: sets additional options for gowin_pack command

  • nextpnr_opts: sets additional options for nextpnr command

  • read_verilog_opts: sets additional options for read_verilog

  • script_after_read: inserts commands after read_rtlil in Yosys script

  • script_after_synth: inserts commands after synth_gowin in Yosys script

  • synth_opts: sets additional options for synth_gowin in Yosys script

  • yosys_opts: sets additional options for yosys command

Build products:
  • {{name}}.cst: physical constraints

  • {{name}}.debug.v: debug verilog file, if TORII_DEBUG_VERILOG is set

  • {{name}}.il: Register-Transfer-Level-Intermediate-Language file

  • {{name}}.pnr.json: place-and-route json

  • {{name}}.rpt: synthesis report (yosys log)

  • {{name}}.syn.json: synthesis json

  • {{name}}.tim: timing data (nextpnr log)

  • {{name}}.fs: binary bitstream

Gowin toolchain

Required tools:
  • gw_sh

The environment is populated by running the script specified in the environment variable TORII_ENV_GOWIN, if present.

Available overrides:
  • add_constraints: stuff

  • add_options: stuff

Build products:
  • {{name}}.cst: physical constraints

  • {{name}}.sdc: timing constraints

  • {{top}}.tcl: TCL instructions for gw_sh

  • {{top}}.v: verilog file

  • impl/gwsynthesis/project*: gw_sh-generated outputs for synthesis

  • impl/pnr/project*: gw_sh-generated outputs for place-and-route

  • {{name}}.fs: binary bitstream