Skip to content

Latest commit

 

History

History
99 lines (69 loc) · 7.29 KB

README.md

File metadata and controls

99 lines (69 loc) · 7.29 KB

vivado-on-silicon-mac

This is a tool for installing Vivado™ on Arm®-based Apple silicon Macs in a Rosett-enabled virtual machine. It is in no way associated with Xilinx or AMD.

Updated for 2024!

The supported versions are:

  • 2022.2
  • 2023.1
  • 2023.2

Due to unexpected behaviour in Rosetta emulation, most versions of macOS 14 (including 14.5) are not supported. macOS 13 may work, but the above versions were tested on macOS 15.

How to install

Expect the installation process to last about one to two hours and download ~20 GB for the web installer.

Preparations

You first need to install Docker® (make sure to choose "Apple Chip" instead of "Intel Chip"). You may find it useful to disable the option "Open Docker Dashboard when Docker Desktop starts".

You will also need the Vivado installer file (the "Linux® Self Extracting Web Installer").

Installation

  1. Download this tool.
  2. Extract the ZIP file.
  3. Copy the Vivado installer into the extracted folder.
  4. Open a terminal. Then copy & paste:
cd Downloads/vivado-on-silicon-mac-main
caffeinate -dim zsh ./scripts/setup.sh
  1. Follow the instructions (in yellow) from the terminal.

Note that the installation requires You to log into Your AMD account. When asked to, allow "Terminal" to access data of other apps (the installation may succeed regardless).

If You know what You're doing, you don't have to follow these steps rigidly. For example, You can rename the downloaded folder and place it wherever You like, You can download via git, modify the configurations and scripts etc... But the above instructions should work without any modifications.

Usage

Run

Downloads/vivado-on-silicon-mac-main/scripts/start_container.sh

inside the terminal. The container can be stopped by pressing Ctrl-C inside the terminal or by logging out inside the container.

USB flashing support is limited, see the "USB Connection" paragraph below.

If you want to exchange files with the container, you need to store them inside the "vivado-on-silicon-mac-main" folder. Inside Vivado, the files will be accessible via the "/home/user" folder.

You can allocate more/less memory and CPU resources to Vivado by going to the Resources tab in the Docker settings.

Installing other software

If you want to use additional Ubuntu packages, specify them in the Dockerfile. If you want to install further AMD / Xilinx software, you can do so by copying the corresponding installer into the folder containing the Vivado installation and launching it via the GUI. Attention! You must install it into the folder /home/user/Xilinx because any data outside of /home/user does not persist between VM reboots. You can even skip installing Vivado entirely by commenting out the last line of setup.sh. I do not plan on supporting this out of the box.

How it works

Docker, Rosetta & VNC

This collection of scripts creates an x64 Docker container running Linux® that is accelerated by Rosetta 2 via the Apple Virtualization framework. The container has all the necessary libraries preinstalled for running Vivado. It is installed automatically given an installer file that the user must provide. GUI functionality is provided via VNC and the built-in "Screen Sharing" app.

USB connection

A drawback of the Apple Virtualization framework is that there is no implementation for USB forwarding as of when I'm writing this. Therefore, these scripts set up the Xilinx Virtual Cable protocol. Intended to let a computer connect to an FPGA plugged into a remote computer, it allows for the host system to run an XVC server (in this case a software called xvcd by Felix Domke), to which the docker container can connect.

xvcd is contained in this repository, but with slight changes to make it compile on modern day macOS (compilation requires libusb and libftdi installed via homebrew, though there is a compiled version included). It runs continuously while the docker container is running.

This version of xvcd only supports the FT2232C chip. There are forks of this software supporting other boards such as xvcserver by Xilinx.

Files overview

  • header.sh: Common shell functions
  • setup.sh: Setup file, to be run once in the beginning
  • start_container.sh: Starts the container and "Screen Sharing" session
  • configure_docker.sh: Automatically set necessary Docker settings
  • gen_image.sh: Generates the Docker image to be used according to the Dockerfile
  • hashes.sh: Contains the hashes of installer files and associated Vivado versions
  • linux_start.sh: Docker container start script
  • de_start.sh: Script to be executed when the desktop environment has started
  • cleanup.sh: Removes Vivado and dotfiles.
  • xvcd: xvcd source and binary copy
  • install_bin: Full path to Vivado installation binary
  • vnc_resolution: Manually adjustable resolution of the container GUI, formatted like "widthxheight"
  • vncpasswd: Password for the VNC connection. It is purposefully weak, as it serves no security function. The VNC server inside the container will not allow outside connections. The password can be changed manually nonetheless.

License, copyright and trademark information

The repository's contents are licensed under the Creative Commons Zero v1.0 Universal license.

Note that the scripts are configured such that you automatically agree to Xilinx' and 3rd party EULAs (which can be obtained by extracting the installer yourself) by running them. You also automatically agree to Apple's software licence agreement for Rosetta 2.

This repository contains the modified source code of xvcd as well as a compiled version which is statically linked against libusb and libftdi. This is in accordance to the LGPL Version 2.1, under which both of those libraries are licensed.

Vivado and Xilinx are trademarks of Xilinx, Inc.

Arm is a registered trademark of Arm Limited (or its subsidiaries) in the US and/or elsewhere.

Apple, Mac, MacBook, MacBook Air, macOS and Rosetta are trademarks of Apple Inc., registered in the U.S. and other countries and regions.

Docker and the Docker logo are trademarks or registered trademarks of Docker, Inc. in the United States and/or other countries. Docker, Inc. and other parties may also have trademark rights in other terms used herein.

Intel and the Intel logo are trademarks of Intel Corporation or its subsidiaries.

Linux® is the registered trademark of Linus Torvalds in the U.S. and other countries.

Oracle, Java, MySQL, and NetSuite are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.

X Window System is a trademark of the Massachusetts Institute of Technology.