Compiling C# Programs into FPGA Circuits

There’s an interesting post on Satnam Singh’s MSDN Blog, Compiling C# Programs into FPGA Circuits: Factorial Example. The article explains how C# programs can be compiled into FPGA circuits using the Kiwi system developed by Satnam Singh and David Greaves at the University of Cambridge Computer Lab. Their starting point was a C# program developed with Visual Studio 2010 for computing factorial.

Kiwi system by Satnam Singh and David Greaves

The example program can be compiled and executed inside Visual Studio to report the factorial of 5 (i.e. 120). However, Singh’s and Greaves’ Kiwi system can also be used to convert the program into a Verilog circuit. The program can be configured with attributes that specify which static method should be turned into hardware, the number of bits used to represent input and output ports, and how the circuit should behave relative to a circuit clock. The generated Verilog netlist can be simulated using a Verilog simulator. The final generated programming bit-stream can be run on a real FPGA board like the Xilinx ML605, which has a Virtex-6 XC6VLX240T-1FG1156 FPGA.

Head on over to Satnam Singh’s blog to read the entire Compiling C# Programs into FPGA Circuits article.

More information: Compiling C# Programs into FPGA Circuits: Factorial Example