Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
14 years ago

Pro& Cons using FPGA???

Hello everyone,

Can someone pointed out to me what are the pros and cons using fpga compare to microcontroller?

What I know is fpga execute our program in paralel order and uc execute the program sequentially. Because of that reason, I think fpga tends to make less delay compare to uc. It is needed for example when I would like to operate multiple motor which I need accuracy.

FPGA convert our hdl later into some sort of gate array but the uc use only bunch of instruction.

(please someone correct me if I'm wrong)

What are other pro& con using fpga compared to uc?

Thank you everyone.

11 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    What the pros and cons are, really depends on the application you have in mind. Talking about motor control, you may be able to use some microcontroller's PWM features. If you need reaction times less than a microsecond, depending on algorithms you need to implement, you might need to use a FPGA. On the other hand, complex algorithms tend to be implemented more quickly and easily in software, especially if they involve dynamic amounts of memory and high-level descision-making. Writing software is easier to learn than coding HDL.

    Also keep in mind that FPGAs need some infrastructure like non-volatile memory to be configured when they're not connected to a PC, maybe a configuration controller for updatability in the field, an oscillator. There are microcontrollers out there with built-in flash/EEPROMs and built-in oscillators. Of course, if you know that the logic you need is small enough to fit into a CPLD, you can reduce device count.

    If you are not yet sure about how fast the reaction times will need to be, the safer option would probably be a FPGA big enough to contain a microcontroller, like Nios. Then you could start by implementing your algorithms in software and later, if you realise it is not fast enough, you could extend that on-chip system with custom modules. Depending on code size, you might need to add an external RAM for that Nios. Expect some learning how Nios works, how to build the system, how to interface it to the rest of the FPGA and the outside world, how to debug and write efficient code. But that might be similar to what you have to do for off-the-shelf microcontrollers anyway.

    Well, you see there are a couple of options. It really depends what your project is about, how it should evolve, what timeframe, budget and skills you have.

    Hope that helps :-)