Build Intel/Altera FPGA projects using Quartus Prime Lite in a Podman container on macOS (including Apple Silicon via Rosetta 2).
- Podman with Rosetta enabled (
podman machine init --rosetta) - Quartus Prime Lite 20.1.1 Linux tarball in
~/Downloads/(or setQUARTUS_TAR) - openFPGALoader for programming (
brew install openfpgaloader)
# Build a project
quartus-build /path/to/project
# Build with a MIF file baked into on-chip RAM
quartus-build --mif program.mif /path/to/project
# Build and program via USB Blaster
quartus-build --mif program.mif --program /path/to/projectThe first run builds the container image (~10 min). Subsequent builds reuse the cached image and only run synthesis (~1 min).
--mif <file.mif> Bake a MIF into on-chip RAM (altsyncram init_file)
--program Program the FPGA after build via openFPGALoader
--cable <name> openFPGALoader cable (default: usb-blaster)
--tar <path> Path to Quartus installer tarball
--image <name> Container image name (default: quartus-lite)
- Builds an x86_64 Ubuntu 20.04 container with Quartus Prime Lite
- Mounts your project directory into the container
- Fixes absolute
SEARCH_PATHentries in the QSF for the container - Optionally injects a MIF file into
ram.vhdaltsyncram instances - Runs
quartus_sh --flow compile - Converts the output SOF to SVF format for openFPGALoader
- Restores all modified files
- Optionally programs the FPGA via USB Blaster
- The container includes a workaround for Intel TBB's malloc proxy
crashing under Rosetta 2 (replaces
libtbbmalloc_proxy.sowithlibtbbmalloc.so) - All device families from the Quartus tarball are installed; if you
only need specific families, edit the Containerfile's
--disable-componentslist - The SVF programming via openFPGALoader replaces the need for Quartus Programmer, which has no macOS support