The Oldland CPU 32-bit FPGA Core

Field Programmable Gate Arrays (FPGAs) let you program any logic you’d like onto a chip. You write your logic using a hardware description language, then flash it to the FPGA. You can even design your own processor and flash it to the chip.

That’s exactly what [jamieiles] has done with the Oldland CPU. It’s an open source 32 bit CPU core that you can synthesize for use on an FPGA. Not only can you browse through all the Verilog code in the Github repo, but there’s also a bunch of tools for working with this CPU core.

Included with the package is oldland-rtlsim, which lets you simulate the processor on a PC. The oldland-debug tool lets you connect to the processor for programming and debugging over JTAG. Finally, there’s a GNU toolchain port that lets you build C code for the device.

Going one step futher, [jamieiles] built a full SoC around the Oldland core. This has SPI, UART, timers, and more features you’d expect to find in a microcontroller. It can be flashed to the relatively cheap Terasic DE0-Nano board.

[jamieiles] has also ported u-boot to the processor, and the next thing on the list is the Linux kernel. If you’ve ever been interested in how CPUs actually work, this is a neat project to look through. If you want more open source CPU cores, check out OpenCores.

Running the Linux kernel on a DE0-nano FPGA board

[Mike] has been filling up a rather intense wiki entry outlining how to run uClinux on a DE0-nano FPGA board. This is an inexpensive dev board that will run you somewhere between $80 and $100. Right off the bat he goes into a hefty list of the reasons that this is a foolish activity. To name a few: Once you’ve complete the build the device will be tethered for reboot.  This board doesn’t have Ethernet hardware and TCP/IP is one of the beast features of the uClinux kernel. And the FPGA tools are closed-source, which doesn’t often mesh with the ideals of Linux developers. But we still like to see what it really takes to get these large-scope firmware builds to compile and load correctly.

After his preamble you’ll find three main chunks. The first deals with setting up the toolchain on Fedora 14. From there, he installs packages necessary for cross-compiling, pulls down the source packages, and gets to work. Once the kernel is compiled and running on the FPGA [Mike] goes on to show you how to build out a simple hardware add-on in the form of a couple of LEDs connected to extra FPGA pins. The final portion of the wiki details rolling support for toggling the LEDs into the software distribution.