Running Nut/OS on Altera FPGA

Not many hobbyists dare to put hands on FPGA. But now there are tons of information and tutorials that almost any beginner can follow and master these monsters step by step. If you’re done with FPGA LED blinking projects, its time to do more serious projects that involve soft processors running real time OS. Micheal Fischer suggests his series of tutorials on how to setup Altera FPGA board to run Nios II soft processor and even run Nut/OS on it.

Three part tutorials gently takes through all steps with rich explanations and visual guides. First part focuses on setting FPGA to run Nios II processor. Second part shows how to compile Nut/OS for soft processor upload it and debug. And in the third part of tutorial you’ll learn how to set up internet radio project and enjoy the musing in earphones.

Interesting comparison of Arduino and Papilio running soft Arduino

Duane Benson decided to make interesting comparison between actual Arduino UNO and Papilio FPGA configured to run soft Arduino. We all know that plain FPGA would beat Arduino in no time, but what happens when you need run software Arduino. You can get all you need here to setup Papilio board and even run custom Arduino IDE to program Arduino. Just for the record Papilio running Arduino was configured to run at 32MHz while Arduino runs at 16MHz. It would be different result if FPGA would run at 300MHz.

And here are the results. Simple square signal without delay on a single pin:

Papilio Arduino: 106kHz;

Arduino Uno: 115kHz;

and for reference PIC12F1822 gave 1MHz square.

Arduino library really slows digital I/O compared to raw AVR performance (this is why PIC beats test here). Another test was measuring program/sketch upload time. Arduino took 2s while Papillio Arduino 6s. Once again, using Papilio FPGA to run Arduino isn’t great idea. FPGA is different concept and is meant to do complex tasks in hardware level.

Controlling motor speed using FPGA

Chris continues his tour to FPGA/CPLD programming. This time topic covers a motor control using CPLD board. The idea is simple – read potentiometer value with on-board MAX150 ADC converter and according to its value generate PWM signal that is passed to motor control circuit.

Along with motor rotation PWM signal is output to LED bar which gives visual intuition on motor speed and direction. Using CPLD instead of microcontrollers in motor control gives some benefits. Firs of all in CPLD there are hardware modules instead of software flow. So it is more robust and precise process. Another benefit is that you can create multiple hardware modules that work concurrently and thus give precise timing.

Fading LEDs with CPLD

Pyroelectro has published tutorial on fading LEDs using CPLD. Making LEDs fade with CPLD or FPGA is a different task than doing this with microcontroller. First of all in CPLD you need to create hardware modules to do tasks that in many cases can perform concurently.

On a simple EMP7128 CPLD board setup there is a 10 LED bar which is programmed to fade special effects. Fading effect is created using PWM signals that are generated using a piece of VHDL code. The project is well explained and might serve as a great entry project for CPLD/FPGA starters.

« Previous PageNext Page »