Xilinx ISE 14.7 Running in QEMU UTM Virtual Machine on M1/M2 Apple Mac OS X

Running Xilinx ISE 14.7 On Apple M1/M2

Table of Contents

Background & Context

I recently upgraded my aging MacBookPro to one of the new M1 MacBookPros. I love the performance, however, I’ve had some issues running certain things that require an X86 architecture.

Virtualization and Apple M1/M2

Apple’s M1 and M2 family of chips are based on the ARM architecture. Specifically, the 64bit ARM architecture supporting the ARMv8.5-A instruction set. Virtualization is supported on ARM. However, most virtualization approaches will only virtualize for the same architecture as the host. So programs like Parallels, VMware Fusion, and Docker will be able to create virtual computers on your M1/M2 system. But they will only be able to run M1/M2 operating systems and/or code.

Architecture Road Block

When I first loaded up my new laptop, I pulled down my custom Docker image. However, the image kept crashing. Couldn’t figure out why until I tried running parts of the system by hand. I was getting the “bad cpu type” error. Ie, I’m trying to run code meant for an X86_64 system on an ARM64 system. Whoops.

Some searching indicated that I can run X86 systems on Docker, if I use the QEMU backend. I could also run QEMU using UTM. I had two options and that wasn’t so bad.

I also explored using CodeWeavers’s CrossOver tool to run X86 code under Wine. I’ll note the results from that below.

Docker w/QEMU

So if you run Docker with the QEMU backend, you will be able to run an X86 container. From there, you will be able to build a docker image and run the latest OS of your choice. Virtualization on top of Emulation.

From there, you can run the ISE Linux native binaries. The access to the container is via remote desktop or X11.

The performance was pretty poor, though. Partly because there was no GPU acceleration and partly because of the network and protocol overhead. -_-;;

CrossOver w/Wine

WineHQ, WineBottler, CodeWeaver’s CrossOver all implement Windows’ various API(s). Since Wine is emulating the Windows environment and not the underlying hardware, there is some performance gain here. I got it to work… but for some reason, it would take forever to start each of the binaries.

So, this works once the binaries are loaded and the windows libraries are loaded. The GUI runs at native speed. However, any call outs to other binaries incurs the long load time.

QEMU + UTS

This option essentially forgoes virtualization and goes for emulation. This runs off of a virtual drive image. The image runs Linux. And ISE 14.7 runs on top of that Linux in its own GUI and window manager. This worked out great, especially with gpu acceleration.

Implementation

Download ISE 14.7 Archive From Xilinx.com

To download the ISE 14.7 archive from Xilinx.com, you will need to create a free account if you do not already have one. Once your account is active, you will be able to download the legacy ISE 14.7 installation image archive.

Extract VMDK from ZIP Archive

The downloaded ZIP file contains various Windows executables geared towards configuring and setting up your Windows machine to run a Linux VM instance. However, you are going to be running the x86_64 Linux VM instance on a M1/M2 Mac OS X computer. So you will need to run a virtual machine that emulates X86 hardware.

To do this, you will need to extract the VMware OVA archive file from the ZIP. This OVA file is actually a TAR file, which you can extract. The resulting files will be an OVF file and a VMDK image file.

The OVF file has the MAC Address you will want.

The VMDK file contains the drive image for the virtual machine.

# Extract OVA file from ZIP file
unzip Xilinx_ISE_14.7_Win10_14.7_VM_0213_1.zip ova/14.7_VM.ova

# Extract VMDK and OVF files from OVA(TAR) file
tar xfPp ova/14.7_VM.ova

# Result is
# 14.7_VM.ovf
# 14.7_VM-disk001.vmdk

Get the MAC Address From OVF File

# Let's grab the HD Mac address from the OVF file
cat 14.7_VM.ovf | grep -i "slot=\"0\"" | tr ' ' '\012' | \
    grep -i macaddress | awk -F\" '{print $2}' | sed 's/\(..\)/\1:/g;s/:$//'
# You will get the colon separated MAC address displayed:
00:11:22:AA:BB:CC

Note, the MAC address may be different per download, so I’m omitting the MAC address I got in mine. The resulting colon separated value should be saved somewhere as you will need it for the virtual machine configuration.

Convert VMDK to QCOW2 Image Format

This step presumes you have installed QEMU. If not, please refer to the instructions below on installing QEMU.

The VMDK file is a sparse 64GB filesystem containing an Oracle Linux installation as well as ISE 14.7 already installed. In order to use it effectively with QEMU, you will need to convert the image using QEMU’s img management tool, qemu-img, which will be available if you have QEMU installed on your Mac OS X system. If not, check out the installation instructions at the end of this article.

qemu-img convert -f vmdk -O qcow2 14.7_VM-disk001.vmdk 14.7_VM-disk001.qcow2

Once the QCOW2 version of the image has been created, you can then use the image in your virtual machine,.

Creating Virtual Machine in UTM

  1. Start UTM
  2. File -> New Virtual Machine
    1. Information:
      1. Give your VM a name.
      2. Set the style to “Operating System”
    2. System:
      1. Architecture: X86
      2. System: Standard PC
      3. Memory: At least 1GB. I have this set to 4GB
      4. Checkbox Show Advanced Settings:
        1. UEFI Boot -> uncheck
        2. CPU -> Default
        3. CPU Cores -> At least 2, 4 would be better.
        4. Force Multicore -> check
    3. Drives:
      1. Import Drive
        1. Navigate to the QCOW2 image file you created and select it.
        2. Set the drive hardware type to Virt-IO
    4. Display:
      1. Full Graphics
      2. Hardware: Emulated Display Card: virtio-vga-gl (GPU supported)
      3. Resolution:
        1. Fit to screen: uncheck
        2. Retina Mode: uncheck
      4. Upscaling: Linear
      5. Downscaling: Linear
    5. Network:
      1. Network Mode: Shared Network
      2. Emulated Network Card: Intel Gigabit Ethernet (e1000)
      3. MAC Address: Use the mac address you got above from extracting from the OVF file. The address is case insensitive, but the colons need to be present.
    6. SAVE

Once saved, you will be able to hit the play button to start the virtual machine. The boot process will take a few minutes, depending on the speed of your computer, the resources assigned, and what other tasks your computer is performing.

The boot process is completed when you see a GUI desktop with the ISE graphic in the middle.

Verify License Is Valid and Working

The ISE 14.7 final release comes with a built-in xilinx.lic file tied to the hardware MAC address of the OVA(extracted from the OVF). The steps above, where you configure the Network MAC to equal the MAC address found in the OVF is crucial to make sure that the license will properly validate.

  1. Double click on the Project Navigator icon on the left side of the desktop.
  2. You will get the project navigator UI.
  3. Open Example Project
  4. Choose freqm the frequency meter example.
  5. Implement Top Module via the green play button.
  6. Watch and wait for either a completion message in the bottom status window or an error.

Completed = Success

If you get the completion message with no show stopping errors? Your Xilinx ISE 14.7 environment is installed!

Error = License Issue

If you get an error message in the bottom status window, then you may need to scroll back to see what the exact message is. Most likely, it will be something to the effect of the ISE license or Flex license doesn’t have a matching HostID. That value is derived from the primary network interface on the machine or in this case, virtual machine. This is the reason for the setting of the network interface’s MAC address from the OVF file.

However, it is possible that the Xilinx.lic file has a different MAC Address assigned. The error logs will indicate what HostID the license is expecting. You will need this to address the issue.

  1. Write down the HOSTID that the Xilinx.lic or Flex license requires.
  2. Shutdown your UTM virtual machine.
  3. Go to the UTM main window and select the virtual machine.
  4. In the upper right corner of the window will be three lines representing settings. Click on that.
  5. Navigate to the Network tab and replace the MAC Address with the HOSTID from the error log above.
  6. Save the changes.
  7. Boot up the virtual machine.
  8. Open the project navigator and the freqm project.
  9. Hit the Implement Top Module green play button.
  10. The build and synthesis should now complete.

The license should allow you to make use of any of the chips listed in the ISE 14.7 Have fun and build some interesting stuff!

Errata / Issues

Programmers

The Xilinx ISE makes use of the USB Platform Cable I/II to JTAG scan as well as program FPGA(s). The programmer can be passed through to the VM by adding the USB device ID(s). Haven’t tested this yet.

Protocol Timing JTAG

Because the ISE is running in an emulated virtual machine, timings might be off enough to cause issues when validating protocols/pin IO.

Addendum / Appendix

Additional setup instructions here for things not specific to Xilinx ISE 14.7, but might help with the installation of tools.

Installing HomeBrew on M1/M2 Mac OS X

The instructions for installing HomeBrew can be found at: https://brew.sh/

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

Installing HomeBrew will help greatly in getting up and running as there are other tools that are installed via HomeBrew

Installing QEMU on M1/M2 Mac OS X

This presumes you have installed HomeBrew. If you have not, please refer to the instructions above.

QEMU is the hardware emulation application. It can actually emulate a variety of hardware platforms, but we are only interested in the X86 capabilities. To install, use HomeBrew:

brew install qemu

This will install QEMU on your system. Homebrew will take care of installing the ARM64 version of the binaries. Once QEMU has been installed, you will be able to make use of the qemu-img utility to convert the VMDK image file to a QCOW2 image file.

Installing UTM

This presumes you have installed HomeBrew and QEMU. If you have not, please refer to the instructions above.

Once you have HomeBrew and QEMU installed, you can install UTM, the GUI wrapper for QEMU to simplify the creation of virtual machines based on QEMU.

brew install utm

You can also install UTM from their git repository, but HomeBrew has you covered.

About Post Author

Author: Wing Wong
Husband, Father, and all around technology tinkerer. :)