Skip to content

2110363-HW-SYN-LAB/vivado-mac

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 

Repository files navigation

Note

Tested on MacOS 15 Sequoia. MacOS 14 is not supported.

Vivado on macOS via Docker

This repository provides a solution to run Xilinx Vivado on macOS using Docker containerization.

Normal Vivado Workflow

The typical FPGA development workflow in Vivado consists of:

  1. RTL Design (Verilog/VHDL)
  2. Synthesis
  3. Implementation
  4. Generate Bitstream

Programming with Docker Limitation

When running Vivado in a container, direct hardware programming is not possible due to USB device access restrictions. To solve this, we use openFPGALoader:

  1. Generate bitstream in containerized Vivado
  2. Locate bitstream in your project directory (typically at <project_name>/<project_name>.runs/impl_1/<top_level_module>.bit)
  3. Use openFPGALoader on host to program FPGA:
    brew install openfpgaloader
    openFPGALoader -b basys3 /path/to/project/<project_name>.runs/impl_1/<top_level_module>.bit

Note: Supported board names can be listed using openFPGALoader -h

Table of Contents

  1. Prerequisites
  2. Installation
  3. Usage
  4. Troubleshooting

Prerequisites

  1. Disk Space

    • Ensure you have at least 120GB of free disk space:
      • ~80GB for Vivado download and Extract (this space will be freed after installation)
      • ~40GB for program data
  2. Homebrew

    • Install Homebrew by running:
      /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
    • Follow any additional setup instructions provided by the installer
  3. Docker Desktop

    • Install Docker Desktop for macOS from docker.com
    • Alternatively, install via Homebrew:
      brew install --cask docker
  4. XQuartz

    • Install via Homebrew:
      brew install --cask xquartz
    • After installation, restart your computer
    • Open XQuartz and enable "Allow connections from network clients" in XQuartz preferences
    • Navigate to XQuartz -> Settings -> Security -> Allow connections from network clients
  5. Vivado Installer

Installation

  1. Get the Repository

    git clone https://github.com/yokeTH/vivado-mac.git
    # or download and extract the ZIP file
  2. Run Setup Script

    cd vivado-mac
    ./scripts/setup.sh
  3. Install Vivado

    • When prompted, drag and drop the downloaded Vivado installer (from prerequisites no.4) into the terminal
    • Follow the installation instructions in the Vivado installer
    • Select desired Vivado components

Usage

  1. Ensure Display Setup

    • Check X11 Display Issues if you encounter problems
    • XQuartz must be running before starting Vivado
  2. Start XQuartz

    xhost + localhost
  3. Launch Vivado container:

    ./scripts/start_container.sh
  4. Vivado GUI will appear in XQuartz window

Troubleshooting

Common Issues

  1. X11 Display Issues
    • Ensure XQuartz is running
    • In XQuartz preferences:
      • Go to Security tab
      • Check "Allow connections from network clients"
    • Try restarting XQuartz
    • Run xhost + localhost before starting container
  2. For permission issues, ensure setup script has executable permissions (chmod +x scripts/setup.sh)
  3. 100 Killed Error If you encounter the following error while using version 2024.2:
    100 Killed ${X_JAVA_HOME} /bin/java ${ARGS} -cp ${X_CLASS_PATH}    comxilinx.installerapi.InstallerLauncher "$@"
    
    remove the Xilinx folder and try using version 2023 instead.

License

This project is licensed under the BSD 3-Clause License - see the LICENSE file for details.

Vivado License

Vivado requires a license from AMD/Xilinx. Please obtain appropriate licensing from AMD/Xilinx website.

Disclaimer

This repository only provides the environment setup to run Vivado on Apple Silicon Macs via Docker. It does not include Vivado software itself. Users must:

  • Download Vivado separately from AMD/Xilinx
  • Comply with AMD/Xilinx's licensing terms
  • Use at their own risk

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 87.5%
  • Dockerfile 12.5%