Skip to content

Toolchain and troubleshooting

FPGALab needs Verilator 5 or newer, GNU Make-compatible build tools, and a C++17 compiler. Python 3.10 or newer and PyQt6 are also needed when running from source; packaged applications include their Python runtime. Use the terminal-with-check icon in the status bar to see the exact resolved paths.

Obtain Verilator

If Icestudio/Apio already provides Verilator, you can reuse it. Otherwise, download OSS CAD Suite for your operating system and architecture and extract the archive completely. Use FPGALAB_OSS_CAD_SUITE if it is outside the automatically detected locations described below. A standalone suite provides Verilator, not the complete build environment: also follow the Make/compiler instructions for your system. Linux and macOS can alternatively install Verilator through the package managers described in their sections.

Resolution order

FPGALab searches for:

  1. An explicit executable (FPGALAB_VERILATOR, or the advanced CLI override).
  2. A suite configured through FPGALAB_OSS_CAD_SUITE or OSS_CAD_SUITE.
  3. A compatible private SDK included beside the packaged executable.
  4. A compatible private SDK installed in the user's application data.
  5. The OSS CAD Suite installed by Apio or Icestudio.
  6. Verilator on the system PATH.

Use FPGALAB_VERILATOR to select a specific executable and MSYS2_ROOT for a non-standard MSYS2 location.

FPGALab also recognizes the older tools-oss-cad-suite package name. Common OSS CAD Suite locations include ~/.apio/packages/oss-cad-suite on Linux and macOS and %USERPROFILE%\.icestudio\apio\packages\oss-cad-suite on Windows. Some Icestudio installations use AppData or another location; point FPGALAB_OSS_CAD_SUITE to the directory containing the suite's bin and share folders. An explicit FPGALAB_VERILATOR path takes precedence.

For a standalone suite on Linux or macOS, for example, set FPGALAB_OSS_CAD_SUITE=/path/to/oss-cad-suite before running fpga-lab. OSS CAD Suite provides Verilator, but it does not remove the need for Make and a C++17 compiler. On Windows, FPGALab detects a standard C:\msys64 installation; set MSYS2_ROOT when MSYS2 lives elsewhere.

Linux

Private SDK locations (development builds)

The controlled Linux SDK can be placed manually in either location:

FPGALab/toolchains/<sdk-id>/         # beside the portable executable
~/.local/share/FPGALab/toolchains/<sdk-id>/

<sdk-id> must match recipe.id in toolchain.json, currently ubuntu24.04-x86_64-sdk1. Each directory directly contains bin/, rootfs/ and toolchain.json: rename the archive's extracted toolchain directory to that ID, rather than leaving an extra nested directory. If XDG_DATA_HOME is an absolute path, it replaces ~/.local/share. Source runs also discover the per-user location, but do not search beside the Python interpreter.

No environment override is needed once the SDK is in place. The diagnostic shows its source, ID, root and resolved tools. Incompatible or incomplete SDKs are skipped with diagnostic notices; an explicitly selected broken SDK fails instead of silently changing compilers. A private SDK uses its own tools, not host Make/G++. It is never copied or removed by compilation-cache cleanup.

SDK discovery accepts the controlled Linux x86-64 format only, with Verilator 5+, a compatible host glibc and paths without whitespace. Folders are searched in descending natural ID order within each location; the bundled location has priority over per-user SDKs. Versioned SDKs should be immutable: use a new ID when replacing tools. Automatic download, installation and updates are not implemented. Use only SDKs from a trusted source: metadata compatibility checks are not signature or archive-integrity verification.

Optional SDK download (development builds)

On Linux x86-64, open Check simulation toolchain → Download SDK… and load a catalog URL supplied by a trusted maintainer. Select the SDK and choose Download and install. No public catalog is configured by default and startup does not download tools automatically. The installer verifies archive size and SHA-256 before installation; those checks do not authenticate an untrusted catalog. Cancel requests a safe stop and failed downloads are cleaned up. Explicit tool configuration and bundled SDKs retain priority over downloaded SDKs. Local catalog/VM experiments are described in the maintainer packaging guide.

The application runs but no window appears

If this happens under Wayland, close the previous process and launch the portable executable from a terminal. For diagnosis only, try QT_QPA_PLATFORM=xcb ./FPGALab. If it opens, report the Ubuntu/GNOME and Qt versions and terminal output; this isolates the graphical backend, not the simulation toolchain. Development builds defer maximization until Wayland has exposed the initial window. Default startup was validated on a clean Ubuntu 24.04 desktop without forcing X11; other compositor configurations need their own checks.

For an xcb plugin error, use QT_DEBUG_PLUGINS=1 QT_QPA_PLATFORM=xcb ./FPGALab and retain the full output. The cursor-library message alone does not identify every missing dependency. New builds require the XCB utility libraries during packaging; extract the complete application directory rather than copying only the executable. Older packages may lack those libraries.

Simulation tools

Install Make and a C++ compiler through the distribution package manager. For Verilator, use a version 5+ system package or the suite supplied by Apio. Using Apio's Verilator does not replace Make and the compiler. On Debian or Ubuntu, a typical installation of all three is:

sudo apt install verilator make g++

Windows

First obtain Verilator if Icestudio/Apio does not provide it. Verilator alone is not the complete native build environment. Install MSYS2 and run this command in its UCRT64 terminal:

pacman -S --needed make python mingw-w64-ucrt-x86_64-gcc

Do not run the executable directly from a ZIP file: extract the complete package so its _internal directory remains beside the executable.

The standalone windows-x64.exe is the simpler download. The windows-x64-portable.zip alternative must be fully extracted. Until the application is Authenticode-signed and builds reputation, Windows SmartScreen may report an unknown publisher.

macOS

Install Xcode Command Line Tools and Verilator. Homebrew is one supported option:

xcode-select --install
brew install verilator

FPGALab provides separate application bundles for Intel (x86_64) and Apple Silicon (arm64). Both still require these external compilation tools when running an Icestudio design.

The bundles are ad-hoc signed for integrity but not Apple-notarized. Use Control-click → Open on FPGALab.app on first launch if macOS blocks it.

A build appears stuck

Some valid Verilog designs expose optimizer limitations in particular Verilator versions. Open Simulation Settings and enable compatibility optimization, then run again. FPGALab also terminates active build and simulation processes when the application closes.