How to Compile


We recommend you to watch a tutorial video about how-to-compile before getting started

General Guidelines

OpenFPGA uses CMake to generate the Makefile scripts. In general, please follow the steps to compile

git clone
cd OpenFPGA
make all


OpenFPGA requires gcc/g++ version >5


cmake3.12+ is recommended to compile OpenFPGA with GUI


Recommend using make -j<int> to accelerate the compilation, where <int> denotes the number of cores to be used in compilation.


VPR’s GUI requires gtk-3, and can be enabled with cmake .. -DVPR_USE_EZGL=on

Quick Compilation Verification


Ensure that you install python dependences in Dependencies.

To quickly verify the tool is well compiled, users can run the following command from OpenFPGA root repository

python3 openfpga_flow/scripts/ compilation_verification --debug --show_thread_logs

Build Options

General build targets are available in the top-level makefile. Call help desk to see details

make help

The following options are available for a custom build


Specify the type of build. Can be either release or debug. By default, release mode is selected (full optimization on runtime)


Force build flags to CMake. The following flags are available

  • DOPENFPGA_WITH_TEST=[ON|OFF]: Enable/Disable the test build

  • DOPENFPGA_WITH_YOSYS=[ON|OFF]: Enable/Disable the build of yosys. Note that when disabled, the build of yosys-plugin is also disabled

  • DOPENFPGA_WITH_YOSYS_PLUGIN=[ON|OFF]: Enable/Disable the build of yosys-plugin.


By default, only required modules in Verilog-to-Routing (VTR) is enabled. On other words, abc, odin, yosys and other add-ons inside VTR are not built. If you want to enable them, please look into the dedicated options of CMake scripts.


Full list of dependencies can be found at install_dependencies_build. In particular, OpenFPGA requires specific versions for the following dependencies:


version >3.12 for graphical interface


version 10.1+ is required to run Verilog-to-Verification flow

python dependencies

python packages are also required:

python3 -m pip install -r requirements.txt

Running with the docker image

Users can skip the traditional installation process by using the Dockerized version of the OpenFPGA tool. The OpenFPGA project maintains the docker image/Github package of the latest stable version of OpenFPGA in the following repository openfpga-master. This image contains precompiled OpenFPGA binaries with all prerequisites installed.

# To get the docker image from the repository,
docker pull

# To invoke openfpga_shell
docker run -it openfpga/openfpga bash

# To run the task that already exists in the repository.
docker run -it bash -c "source && run-task compilation_verification"

# To link the local directory wihth docker
mkdir work

docker run -it -v work:/opt/openfpga/ bash
# Inside container
cd work
create_task _my_task yosys_vpr