Thursday, January 26, 2006

Soft Processor in FPGA


If you are new to FPGA, your might wonder what is the advantage of using a soft embedded processor in a FPGA. Examples of the famous soft processor in the FPGA are Altera NIOS II and Xilinx MicroBlaze. Why not using a dedicated microprocessor such as Microchip PIC microcontrollers, Motorola 68000, ColdFire or others? There are quite a number of reasons for this. Below are some that I can quickly think of.

First, you can configure as many I/Os as you desire in a FPGA as long as the FPGA chosen by you can provide that. For an example, most of the dedicated microcontrollers have the most 40 I/Os, but with a FPGA, you can have as many as 300 I/Os or even more if you are willing to pay more, and all of the I/Os can be controlled through the soft-core processor programmed in the FPGA.

Second, you can design your very own customized Intellectual Property (IP) inside the FPGA to interface with your processor. Of course, your IP would reside inside the same FPGA, too. The IP can be written in Verilog, VHDL or vendor-specific hardware description language such Altera AHDL or Xilinx XDL. For an example, in my previous post, I mentioned that I had done USB device IP cores inside FPGA. In fact, these IP cores interface with the soft-core processor inside the FPGA. The reason for having a separate IP core for some dedicated function is to have a higher performance, such as USB High Speed transfer (480Mbps) with PC. A dedicated controller alone might not act as fast as an IP core in a FPGA. For that reason, I never see any dedicated controller that supports USB High Speed transfer, at least not as far as I know. Most of the dedicated controllers only support USB transfer up to 12Mbps, which is actually the USB Full Speed transfer.

By now, you may ask, why not creating the whole design in a FPGA without the soft-core processor? Actually you can. But there are cases that you want the simplicity of writing part of your design using C/C++ code, especially those design portions that require massive processing power. See my previous post . Most of the time, using a processor helps reducing your design time and save your FPGA cost, because less logic is required if you design is relatively complicated.

Third advantage of using a soft processor in a FPGA is, you can increase your operating frequency as high as the timing requirement in your design is met. For most of the dedicated controller, you have to follow the frequency specification.

Well, enough has been said for the goods of the FPGA. Is there anything good about the dedicated microcontroller? Cost, of course! Every penny counts, you have to pay for the cool features of a FPGA!

No comments: