Jump to content

Programming FPGA Boards from a Mac


Recommended Posts

I know, I know -  this question gets asked regularly and the answer is always "no".  But, with Covid and the switch to on-line classes (possibly for the next year), having a Macintosh option to program an FPGA board may mean the difference between our university using FPGA boards in our large digital design courses or not.  So, it has moved up on the importance list drastically recently.

Is anyone aware of any way to program a board (Basys 3 for example), from a Mac?  We are limping along having the 10-20% of our students who run on a Mac install a Linux VM this term, but it doesn't look like a good long term solution due to a variety of issues that they regularly run into (think 120 sophomores who know very little about computers). 

Lacking a known way to program an FPGA, we are investigating writing our own.  Can anyone point us to documentation on the protocol needed to talk to the USB interface chip as well as other info needed to write such a tool?  It would be worth a fair amount to us to write such a tool (even if it was absolutely minimal).   We know bitstreams inside and out but are trying to bootstrap the rest of the process..

Ideas appreciated.  


Brent Nelson

Brigham Young University

Link to comment
Share on other sites

Hi @Brent,

I apologize for the delay. The two main hurdles to doing this on a Mac are the generation of the bitstream which we can't assist with since we use Xilinx's Vivado software to do this, though it sounds like you have that aspect covered, and the loading of the bitstream onto the FPGA itself. Digilent does not have any solution for you with the second half since our Adept software which would readily facilitate loading a bitstream onto a supported FPGA (such as the Basys 3) is not compatible with OSX (though it is with Windows and Linux). I did request some higher-ups at Digilent to consider making Adept compatible with OSX, though that's about all the sway I have is the requesting portion.

One alternate solution you might be able to do is set up a remote desktop that students can connect to since (I think) it is possible to enable talking to other serial ports based on the last post in this thread: https://community.spiceworks.com/topic/999865-com-port-trouble-with-remote-desktop. I don't know how that will play between different operating systems (and will be pretty slow and painful if multiple students are using it simultaneously), but it is an option. Realistically though, a VM will be the way to go at least with regards to students doing their own development within Vivado.



Link to comment
Share on other sites


I have written a bitstream uploader for 7 series FPGAs which is included here (run the demo with an CMOD A7-35 board and it will upload its own test bitstream at startup). But it's not a turnkey solution in general.

.NET exists in the mac world, AFAIK, so you should be able to build it. But it'll probably require some modifications to link dynamically with the mac's equivalent of the FTDI DLL.

The Xilinx protocol at JTAG level is described in UG470.

There are a few other projects on the web e.g. xc3sprog or urjtag that may be more general, once you figure out how to use them.
xc3sprog will require minor changes for 7 series e.g. IDCODE.

Edited by xc6lx45
Link to comment
Share on other sites

Thanks for the last 3 comments - all very helpful and just what I was looking for.  

Some of our students are doing dual-boot so that is an option.  I am looking at the other 2 solutions proposed as well.  I appreciate people's input...

Link to comment
Share on other sites

  • 3 months later...

Follow Up and Summary - Programming FPGA Boards from a Mac

Thanks to those who responded to my request for methods for programming FPGA boards on a Mac.  

Since then I have found a mechanism that is working very well.  It is called Open OCD (search the web).  This is an open source solution that we have tested on a number of Digilent boards (Nexys4, Basys3, Arty).  

It works for both a Mac as well as Linux (useful since we could never get Adept 2 installed in a way to work on Ubuntu 16.04).

I have created a web page that describes how to use it at: https://github.com/byu-cpe/BYU-Computing-Tutorials/wiki/Program-7-Series-FPGA-from-a-Mac-or-Linux-Without-Xilinx

Feedback appreciated.



Link to comment
Share on other sites

  • 5 months later...


There are couple of options :

1) Use a VM software like Vmware or Virtualbox and install Windows/Linux in it and use it inside the MacOS environment.

2) Use Boot Camp to install Windows on Mac and install Xilinx ISE in the windows.

3) Install Linux on mac in dual boot mode (How to Dual Boot Linux on Your Mac and Take Back Your Powerhouse Apple Hardware)

Link to comment
Share on other sites

  • 1 year later...

I'm at a very small college with similar constraints — specifically, we have a majority of users with Macs. I'd like to be able to take them through a text such as Harris & Harris, Digital Design and Computer Architecture, including the FPGA labs. The openocd step for loading the bitstream once it has been generated onto the board discussed above is cross-platform and looks straightforward (there are brew and macports options). However, an even larger question is what are the cross-platform options for generating the bitstream!?

I'm posting because I have learned that there is a project that is fairly far along for that, called f4pga, which stands for FOSS Flow for FPGA, which can create bitstreams for Digilent boards without using Vivado. The f4pga project has straightforward directions for setting up on four Linux platforms (Ubuntu, Debian, CentOS, and Fedora), and since it is free, open-source software, it seems plausible to hope that Mac directions will soon exist as well. Here is where those Linux directions live: https://f4pga-examples.readthedocs.io/en/latest/.

Thanks to all the contributors to this thread.

Link to comment
Share on other sites

  • 4 months later...

I have finally gotten a full tool path to work completely self-contained on my M1 MacBook Pro.   I am running Ventura on the MAC and have a fresh copy of Windows 11 (ARM) running in a Parallels VM.

For Verilog design I am using Icarus on the MAC and GTKWave (Scansion, which I like better, does not work on the M1 very well).   I installed Vitis and Vivado 22.2 on the Windows 11 ARM VM (ML license version).   I can take a couple of old designs and have been able to run them through Vivado, synthesize, implement, and generate a bit file.

I have been unable to get the target hardware to be recognized by Vivado in the tool, so I have used openFPGAloader to program the bit files into my CMOD A7's (from MACOS), which are the only FPGA development modules I have.   I have been able to load in a temporary image, and have also used openFPGAloader to load an image into the CMOD's FLASH memory for permanent use.

This flow is functional, but a bit slow right now.    It is quite a bit slower than when I run Vivado on my 6 year old Intel MacBook in a Parallels-Linux VM.   Also, I have had a couple of hangs when I jump from step to step, like from Synthesis to Implementation.  Offsetting the slowness of Vivado is the big speed improvement in Icarus on the MAC side.

I have not yet gotten a successful behavioral simulation to run in Vivado.   Since I am using Icarus for Verilog functional verification, this is not a killer.

I am looking forward to when Xilinx gets an ARM image of Vivado running, I am sure the performance will be sparkling.  I cannot imagine that they will stick with x86 binaries on Windows or Linux forever as that is gradually becoming a smaller portion of the market.   I bought the M1 Mac a bit early, primarily for the incredible performance in Blender and for doing computationally intensive work.   For that it has been great.  3DCAD and FPGA is starting to catch up.   Windows 11 on ARM is a huge help as the emulation is "serviceable".   Native apps on ARM should be awesome.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...