DEV Community

Cover image for Running Xilinx ISE on an M1 Mac
Andrew Owen
Andrew Owen

Posted on • Edited on

Running Xilinx ISE on an M1 Mac

This article originally appeared on my personal dev blog: Byte High, No Limit.

Back in March 2022, I did a write-up of how to run Xilinx Vivado on an M1 Mac to generate cores for the Artix-7 series of FPGAs (as used on the Mega65). The easiest solution is to run the Intel binaries on ARM Windows under Parallels Desktop. But it's also possible to use the Linux binaries with UTM.

UTM is great for running other ARM OSes (like Ubuntu). But emulating Intel 64-bit instructions is slow. However, in the forthcoming macOS 13, third-party apps like UTM will be able to leverage Rosetta's just in time (JIT) translation for Intel 64-bit instructions. UTM should get a lot faster.

So I decided to revisit the problem of running Xilinx's older ISE tool to generate cores for the Spartan-6 (as used on the ZX-Uno). Originally published in 1995, the software hasn't been updated since 2013. Even on Windows 10, Xilnix provides an emulated Linux environment to run the software.

Initially, I had tried to get it working on Debian 11, but that suffered frequent crashes. The trick is that you need something old enough to work reliably with ISE, but new enough to support the UTM guest additions (for shared folders). ZX-Uno enthusiast Microjack informed me that he had ISE working reliably on Linux Mint 20.1 Cinnamon.

But Cinnamon relies on having a GPU to do the heavy lifting in the GUI. It was unusably slow. Fortunately, there is an Xfce distro, which has much lower hardware demands. After some messing about with various settings, to my surprise it worked, and I was able to generate a binary that behave as expected on real hardware. Here's how to do it.

  1. Install UTM. I'm using version 3.2.4 (58).
  2. Download the Linux Mint 20.1 Xfce ISO image.
  3. In UTM select File > New > Emulate > Linux > Browse and navigate to the ISO image you downloaded.
  4. In the Hardware pane, set the Memory to half your available RAM (in my case 8192 MB). Ensure the defaults are set for the Architecture (x86_64) and System (Standard PC), then click Continue.
  5. In the Storage pane, set the Size to 40 GB and click Continue.
  6. In the Shared Directory pane, select your Downloads folder and click Continue.
  7. Start the machine and select Start Linux Mint 20 Xfce 64-bit (compatibility mode). Follow the on-screen prompts to install the operating system using the default settings. You may want to enable automatic log-in when prompted. You may have to force a restart depending on whether you are able to eject the ISO image.
  8. Boot the virtual machine. From the Terminal, enter: sudo apt install spice-vdagent spice-webdavd libncurses5. Now restart the virtual machine.
  9. On macOS, download Xilinx ISE 14.7 for Linux.
    1. On Linux, open the File Manager and double-click Browse Network, then double-click Spice client folder. If you are asked to choose an application, you can dismiss the pop-up.
    2. Copy Xilinx_ISE_DS_Lin_14.7_1015_1.tar from the Mac to your Documents folder in Linux. Then extract the contents.
    3. On Linux, from the Terminal, navigate to the folder where the tar file was extracted and enter chmod +x ./xsetup, then enter sudo ./xsetup and follow the on-screen instructions. Select the licensing check boxes and ensure you choose the WebPack ISE version. For everything else, you can use the defaults.
    4. The installer will tell you how much disk space is left. Before you continue, delete the tar file you copied from the Mac to the VM.
    5. On Linux, from the Terminal, navigate to /opt/Xilinx/14.7/ISE_DS/. Enter sudo chmod +x settings64.sh.

To run the software, navigate to /opt/Xilinx/14.7/ISE_DS/ and enter:

source settings64.sh`  
./settings64.sh`  
ise`
Enter fullscreen mode Exit fullscreen mode

You'll probably want to turn that into a script.

The first time you run the software, you'll be prompted to provide a license. I found the easiest way to do this was to log in to my Xilinx account on the Mac, download a free WebPack ISE license, and copy it across to the Linux VM.

When you've verified that the software has installed correctly, you can delete the Xilinx_ISE_DS_Lin_14.7_1015_1 folder and its contents.

When you're done, you can shut down the Linux VM. If you have at least 40 GB of free space on your Mac hard disk, you can reduce the size of your VM image. In UTM, go to Settings > Drives and select the large IDE Drive (labeled disk-0.qcow2). Then click Reclaim space and then Reclaim and Compress. It will take a while, but you should get about 20 GB of space back.

Occasionally, the shared folder stops working for no apparent reason. I've found the best way to fix this is to shut down the VM, remove the Shared Directory in the settings by clicking Clear, and then add it back. If that doesn't work, you may have to restart macOS. But if that still doesn't work, there is another option:

sudo apt-get install davfs2
sudo mkdir /mnt/dav
sudo mount -t davfs -o noexec https://nextcloud.example.com/remote.php/webdav/ /mnt/dav/
Enter fullscreen mode Exit fullscreen mode

When prompted for a username and password, just press Enter.

And that's it. It's a bit slow at the moment, but when I get macOS 13 I'll update this post if I notice any major speed improvement under Rosetta.

Top comments (0)