The Alchitry Mojo: A better FPGA board

FPGAs are fascinating high-tech devices which allow for some amazing possibilities for various projects. As I have previously written the Pynq Z2 offers a variety of features that makes it an interesting, albeit very complicated development board. The full experience requires not only designing hardware for the FPGA, but also getting data to and from the CPU using an AXI interface and even a kernel driver written in C.

On the other side of the spectrum there are simpler development boards using FPGAs. The Alchitry Mojo may very well be the simplest of them all. Offering a Spartan 6 FPGA, on-board SPI flash and an ATMega 32U4 chip for USB connectivity, does this board deliver on its promise to be a good introduction into hardware design?

The Hardware

In my case, I ordered a Mojo board from AliExpress. While the pictures showed the official board, what I received is most definitely a clone. Not that I mind, but I would have liked to support the folks over at Alchitry. Unfortunately, the Mojo is not easily available anymore from more trusted suppliers and their new boards require breakout boards in order to be used with most basic other hobbyist modules. Their most expensive board features a powerful Artix-7 FPGA, which is certainly appealing.

In the case of the Mojo, however, we’ll have to settle for a Spartan 6 FPGA, which is significantly less powerful and advanced, but still quite capable for learning projects and serious applications. The Spartan 6 was and is quite a popular chip for measurement and test equipment such as oscilloscopes and function generators. For the full list of specifications, look no further than just below.

Xilinx Spartan 6 XC6SLX9 (speed grade 2C)
No RAM onboard (extension board available with 32MiB SDRAM)
Atmel ATMega 32U4 (connected to FPGA using serial and SPI)
84 digital IO pins, 8 analog inputs (over serial, using the 32U4)

Even though the analog pins may only be accessed over serial as they are actually located on the ATMega32U4, it is a very nice addition to see on a board of this price. For the original retail price of €75 or $79, the hardware of the board does lack a distinguishing feature to set it apart from the other FPGA development boards available. Especially considering academic pricing, your needs may be better served by a Digilent Arty A7, for example, which is available from $129.

Alchitry Labs IDE

Fortunately for the Mojo v3 board and its siblings the Alchitry Cu and Au, the hardware is not intended to be the distinguishing feature of these boards. Instead, it is the software that the Alchitry boards come with that is supposed to make FPGA development as easy as using an Arduino.

The obvious question is: Do they succeed using the Alchitry Labs IDE? My answer would be: Well, mostly. Labs is like the Arduino IDE in a lot of ways. It has a very simple interface and an even simpler text editor, it depends on an external toolchain that is not tightly integrated and it offers some included examples.

The Alchitry Labs software shines in its simplicity: You create some files, set the location of the toolchain you need for the FPGA you have (Xilinx ISE for the Mojo) and press the down-pointed arrow to get your design into the FPGA. All the examples available from Alchitry’s website are just a few clicks away from being included in your own design, such as an I2C Slave or a Servo controller, making the Mojo a very interesting board for building a peripheral for another device – an ESP8266 for example.

The simplicity of the Alchitry Labs is a true strength for beginners just starting out with hardware design. With the included modules, the online tutorials and the simple interface with few options, it is very easy to get your first sketches up and running. Unlike for the Pynq Z2, where as a beginner it took me a few hours to get a counter using the on-board LEDs to work, it took me less than fifteen minutes on this board. That is an amazing achievement, and I applaud it. This board would be perfect for students who are following their first hardware design course or hobbyists looking to dip their toes in the water, pretty much exactly what the Pynq Z2 is not.

Unfortunately, this simplicity also holds the software back when it comes to more complicated designs. Working in the software with very many files is not fun, there is no way to manipulate clocks, it does not offer any simulation or testbench suport and I find its custom language Lucid to not add much over Verilog, even if it does simplify some things for beginners. That is personal preference though, and it might be because I’ve already practiced with Verilog quite a bit.

Xilinx ISE WebPACK

For complicated designs, Xilinx ISE comes to the rescue. Combined with a free WebPACK license – which must be obtained even if you just want to use the board through the Alchitry Labs software – it is a powerful piece of software provided by the manufacturer of the FPGA to get the most out of the chip. It is a rather complicated behemoth of an IDE, even though it is less so than Vivado, so I will not go into detail here. I just want to mention that it exists in case you want to advance your designs on the Mojo past the level that Alchitry Labs can comfortably support.

In order to use the Mojo with Xilinx ISE, you have to add the pin constraints to your project manually and upload the generated binary image manually using a tool provided by Alchitry. This is necessary because the Mojo is not one of the boards that is natively supported from the Xilinx ISE software. This does slow down the workflow somewhat, but it shouldn’t be too troublesome if you use a script that automatically provides the binary file to the uploader tool.

Hardware Extensions

Alchitry offers various hardware extensions for the Mojo, which I have not (yet) tested. I am looking to acquire an SDRAM shield for my Mojo board though.

The SDRAM ‘shield’ offers 32MiB SDRAM (DRAM with a synchronized clock) which significantly extends the capability of the board. You might want to use it as a fast communication device with a large buffer, or maybe as an arbitrary waveform generator (using the serial pass-through functionality of the 32U4) or even high performance RGB LED display controller for which the RAM acts as the buffer. The possibilities are nearly endless.

In addition a board with two HDMI ports and the SDRAM is available. The HDMI connector is a cheap and widely available connector that you can incorporate into your own designs, so they can be used for more than just digital video signals. I think that this is also where the Alchitry Mojo would shine, as real-time operations on proper HDMI signals requires more hardware than the Spartan 6 can provide. The Zynq SoC utilized by the Pynq Z2 is also not capable of handling 1080p video at 60Hz.

Conclusion

Overall, this board makes for a much stronger introduction into hardware design. The Pynq board may be designed with education in mind, I think that the Alchitry Mojo would actually be a much better offering for education purposes. After all, the software provided by Alchitry is easy to get started with but the more complex software provided Xilinx can still be used with the board. This way, the Alchitry Labs IDE acts as more of a stepping stone for ‘true’ FPGA development, and I for one applaud how easy Alchitry has truly made it to dip ones toes in the water with FPGAs and logic design.

Leave a Reply

Leave a Reply

Your email address will not be published. Required fields are marked *