My confession: I've never owned an Arduino; I've never used an Arduino. There, I said it.
It's not that I dislike the Arduino. Some people disparage it as a "toy", but anything that helps you get your project done quicker is fine by me. I just haven't worked on anything that would benefit from it.
So it surprised me when I found out I actually had an Arduino. In fact, I had thousands of them! Let me explain.
People use the XESS XuLA and XuLA2 FPGA boards for a variety of applications, some of which might be better served by a microcontroller. No problem, you could use Xilinx's Picoblaze or Microblaze uC cores for that. But the Picoblaze is really small and limited, while the Microblaze is very capable and complicated (especially the IDE). One of my customers got into a conversation with Alvaro Lopes about using his microcontroller core instead.
Several years ago, Alvie developed the ZPUino: an open source, 32-bit microcontroller core written in VHDL. In addition, it has an Arduino-like IDE, also open source. Alvie offered to port his new ZPUino-2.0 to the XuLA2 board if I would send him one. Get a complete 32-bit microcontroller and IDE ported in exchange for a $69 FPGA board? You bet I sent him one!
Within a few months, Alvie had something workable that I could try. It's not in a form that's suitable for mass distribution yet (no pretty installer, for instance), but I thought I'd show a bit about it so maybe some brave souls could also give it a go. Here's what you do:
First, download a ZPUino 2.0 bitstream file for the FPGA on the XuLA2-LX9 board. Use the GXSLOAD utility to store the bitstream into the configuration flash of the XuLA2 board. (Don't store it directly into the FPGA because that will get erased if the board ever loses power.)
Next you'll need the ZPUino 2.0 IDE beta distribution. I selected the Windows archive, but linux versions are also available. (It's 111 MB, so be prepared for that.) Then, you just extract the distribution into a folder. (I used C:\temp\ZPUino-2.0.0.)
Now you have to provide a channel for the IDE to communicate with the ZPUino. This is where things get kludgy. Because the IDE doesn't currently understand the protocol used by the XuLA2, you'll need to connect the
TCK (orange) and
TDI (yellow) leads of an FTDI cable to the
chan1 I/O pins of the board. (In my case, I use a C232HM-DDHSL-0 cable although cheaper alternatives exist.)
Once the FTDI cable is connected, just fire up Alvie's Arduino-like IDE. (It's
zpuino.exe in the top level of the extracted distribution.) Let the IDE know what board it's working with by clicking
Tools => Board => ZPUino 2.0 (32-bit) Boards => ZPUino 2.0 on XuLA2 (LX9) in the menus. You'll also need to select the communication port using the
Tools => Port menu item (my FTDI cable shows up as COM6 on my PC).
Once all the setup is done, you can type some code into the IDE, compile it, and then download it to the XuLA2 board. But as an initial test, open the simple blinker example by selecting
`File => Examples => 0.1Basics => BLink. Then click the
File => Upload menu item and the example code will be compiled and loaded into the board. Connect an LED to the
chan13 pin of the XuLA2 and you should see it blinking once every two seconds.
Here's a video that shows the entire process:
(As an added incentive to watch, there are some instructions embedded partway through the video on how you can enter to win a free XuLA2-LX9 board.)
So every XuLA2 board in my inventory, every one I've ever sold, can now be turned into one of the smallest Arduino-like systems out there using an open and free microcontroller core and IDE. But, what now? It only runs on the Spartan-6 LX9 FPGA. And it's circuitry is fixed! In my following posts, I'll show you how to:
I'll also be working on some software that will allow the IDE to communicate with the ZPUino over the XuLA2 USB link. Then you won't need an extra $25 cable that takes up two of the XuLA2's precious I/O pins.
And as a final thought, if you like the ZPUino and want to see more stuff like that, consider making a donation to support Alvie's development efforts. These things aren't magically placed under your pillow by faeries during the night; it takes hard work. A donation to Alvie tells him you value what he's doing and helps him keep doing it.Share on Twitter Share on Facebook Share on Reddit