Monthly Archives: October 2013

Raspberry PI FPGA Module

Yet another Raspberry PI expansion module. This one’s purpose is to host a Spartan 6 FPGA, in-order to serve as a soft processor development environment.

Sitting on top of the PI’s 26-way P1 connector, it contains a Xilinx XC6SLX9 FPGA, 8MBit SPI Flash, 2 x 1Mbit SPI RAM, and a 10 way expansion connector.

The 1430 slice / 11,440 flop FPGA is large enough to hold my AltOR32 OpenRisc implementation (running at ~60MHz) along with instruction & data cache, debug interface to the PI, and with plenty of free space remaining.

The Spartan XC6SLX9 contains 64KBytes of usable blockRAM, some of which has been sacrificed for the CPU’s caches.

The board contain two Microchip 23LC1024 SPI RAMs, providing 256KBytes of additional memory mapped (and cacheable!) instruction or data space.
These RAMs are accessed in 4-bit SQI mode for increased data throughput.

The Raspberry PI is able to load the FPGA bitstream in around 1 second, and is then used to load the FPGAs internal or external memory for program execution.
You can also stop the program, inspect and modify CPU registers, memory, etc.

The CPU core benchmarks at roughly ~0.93DMIPS/MHz, which @ 60MHz is at least 16x lower than the ARM on the Raspberry PI at its stock frequency!

Still, there are plenty of interesting things you can do in HW on the FPGA that it will beat the PI at.

Verilog, C & Gerbers here

The core of the project, AltOR32 is also available on OpenCores.