XLR8 Project Blends FPGA Speed with Arduino Coding

Arduino Technology
XLR8 Project Blends FPGA Speed with Arduino Coding
The new XLR8 board.
The new XLR8 board

There are any number of Arduino compatible boards and clones on the market. However, most offer little beyond what an Arduino is capable of itself. But, despite looking much like an Arduino Uno, the new XLR8 board (pronounced “Accelerate”) from Alorium Technology is somewhat different.

For those who don’t know, an FPGA, or Field Programmable Gate Array, is as close as you can get to designing your own chip. Each FPGA consists of configurable logic blocks (CLBs), which are incredibly flexible and that can implement any basic function. Effectively it’s a reprogrammable circuit where, instead of implementing functionality in software, you can do it in hardware. The benefit of an FPGA is that you can customise it to do pretty much any task. However, the big difference between an FPGA and a normal microcontroller is that, out of the box, it doesn’t do anything.

The XLR8 is an FPGA board based around the Altera MAX10, implementing an ATmega-compatible microcontroller with the same program and data memory space as the ATmega328. Right now the board is cycle accurate to a standard ATmega but, at least in theory, there’s enough headroom on the FPGA to run the ATmega core at more than double the standard Arduino Uno clock speed.

Effectively, at least to Arduino IDE, this board looks like an Arduino Uno. So much so that you can just select Uno as your board type, then compile and upload your sketch over USB as normal.

But things aren’t exactly what they seem on the surface. Also onboard the FPGA are what Alorium call “Xcelerator Blocks,” or XBs. These provide hardware-optimised implementations of functionality that otherwise have to be implemented in software.

Out of the gate they’re providing two type of blocks. The first deals with floating point math — and if you’ve ever had to do serious mathematics on the Arduino you’ll understand immediately what a big deal that could end up being — the other block handles servo control. Both blocks can be accessed using provided Arduino libraries.

For instance, to make use of the acceleration offered by the floating point math block, you’ll need to convert your code to use XLR8-specific function calls. So, for example:

c = a + b;

becomes,

c = xlr8FloatAdd(a,b);

But if that looks like too much effort you’ll be happy to learn that the servo control block can be dropped into your code without any changes except including a different header file.

That means that if you’ve been building robots, and are experiencing servo jitter due to servicing interrupts, you can substitute this board for the Arduino board in your robot and, with a single line of code, eliminate any servo jitter. For some builds that’s going to be a life saver.

I’ve had pre-production hardware on my desk for about a month now, and while I don’t do a lot of servo work, I do have to cram floating point math onto the Arduino on a fairly regular basis. While it’s been a pain converting my code, the hardware acceleration has considerably sped up execution. I am, in fact, somewhat impressed.

I sat down with Jason Pecor to talk about the XLR8 board, and he had this to say about the servo and floating point XBs:

We have already developed a servo block that eliminates the jitter/twitch that is common with the standard Arduino servo library. We demonstrated this functionality with a nifty set-up at Maker Faire Milwaukee that included a RedBoard, our XLR8 Board, and some laser pointers mounted on servos that made a very good side-by-side comparison.

YouTube player

The cool thing about the servo example is that the only difference between the sketches running on the two boards is the servo library include line.  The rest of the sketch remains exactly the same, but all the servo control functions are calling hardware functions in FPGA fabric.

We also had a clever demo with fans, clear tubes, and ping-pong balls that provided a good visual of our Floating Point block when compared with standard Atmega-based floating-point.  

YouTube player

Other blocks currently under consideration for our hit list include: PID Control, NeoPixel Timer/Controller, Multiple UARTs, Audio Functions and DSP functions.

My real concern with the XLR8 is that, at least initially, Alorium will provide only limited support for users who want to create their own XBs. While they have said that,

Down the road, we do plan to provide access to enough source code and documentation to make it possible for someone proficient with Verilog or VHDL, and with Quartus, to create their own XBs.

I think they need to address this sooner rather than later. Because the real secret sauce of this board is tied up with it being an FPGA, and the ability to make use of that. Right now it’s a great tool for users facing servo jitter or floating point problems. But with good support for creating your own XBs, it could be a serious tool for experienced Makers facing all sorts of problems.

The XLR8 is now crowdfunding on Kickstarter, and still has two more weeks to go on the campaign.

2 thoughts on “XLR8 Project Blends FPGA Speed with Arduino Coding

  1. bjepson says:

    This looks really great. Did they mention anything about whether this might be able to improve stepper motion control in 3d printer and CNC control systems? I have an Uno inside my X-Carve, for example.

    1. Alasdair Allan says:

      Yes, should be a drop in replacement for your Uno in the 3d printer.

Comments are closed.

Discuss this article with the rest of the community on our Discord server!
Tagged

Alasdair Allan is a scientist, author, hacker and tinkerer, who is spending a lot of his time thinking about the Internet of Things. In the past he has mesh networked the Moscone Center, caused a U.S. Senate hearing, and contributed to the detection of what was—at the time—the most distant object yet discovered.

View more articles by Alasdair Allan

ADVERTISEMENT

Maker Faire Bay Area 2023 - Mare Island, CA

Escape to an island of imagination + innovation as Maker Faire Bay Area returns for its 15th iteration!

Buy Tickets today! SAVE 15% and lock-in your preferred date(s).

FEEDBACK