X32: Free 32 bit FPGA Softcore

The X32 is an experimental 32-bit soft processor core and associated compiler tool chain for low-cost FPGAs (such as the 400K gates Xilinx XC3S400). The core includes an array of peripheral devices such as UARTs, PWM generators, timers, etc. providing a flexible, reconfigurable microcontroller architecture. The primary motivation for the X32 is the need for a free and simplesoft core that allows students to program FPGAs in embedded (ANSI) C in some of our course labs.

Rather than use an existing processor architecture, our independence of legacy issues allows us to rethink the entire C-to-FPGA concept. Instead of using a legacy core with some 90's or even 80's instruction set architecture, and retargeting an ANSI C compiler to this legacy ISA, we develop the core completely top-down by choosing an ISA that is at the same high level as the intermediate RTL level within the compiler, with the core simply being a hardware interpreter of this ISA written in an HDL. Although clearly a performance price is to be paid, both the compiler backend and soft core development effort can be kept at a minimum. In fact, the entire soft core and the compiler (including assembler, linker) has been realized within 5 months in terms of merely one MS project (built by Sijmen Woutersen). The approach is based on the LCC ANSI C compiler's intermediate byte code which is executed by the X32, which essentially constitutes a byte code interpreter written in VHDL.

The X32 is currently configured for use on a Xilinx Spartan-3 Starter Board (fitted with a 400k gates XC3S400 FPGA from Digilent Inc. USA) and comes with an array of devices such as button/switch/LED/SSD interfaces, UARTs (RS232), PWM generators, timers, clocks, I/O extension interfaces, pulse width readers, and application-specific devices such as a decoder compatible with Maxon DC motors to build servo systems. The tool chain consists of the usual tools

The X32 is currently used in the following three TU Delft projects

Publications

People

Software Downloads

NOTE: All X32-related software is free software; you can redistribute it and/or modify it under terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Our software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Note: refer to the X32 Programmer's Manual for installation instructions.

Important Feedback

Apart from Delft students, other people have shown interest. In particular, the following feedback received from the University of Dortmund points out some minor problems that one may encounter using our makefiles on other platforms.

X32 Version History

Release date Changes
Jan 25, 2007 BUGFIX: Interpreter memory protection removed which caused ucos to crash
BUGFIX: RS232 bautrate generator fix for lower bautrates
FEATURE: Modified X32 loader software for X32 debugger
FEATURE: Compiler warning on using functions without prototypes
Dec 13, 2006 WARNING: binary compatibility with older versions is broken in this release, please recompile all software!
BUGFIX: several small fixes in the linker and interpreter applications
FEATURE: several small X32 code/performance improvements
FEATURE: overflow detection for 8/16-bit arithmetic operations added
Oct 25, 2006 BUGFIX: multiplier would sometimes falsely detect overflow
Sept 1, 2006 Initial release