¿ªÔÆÌåÓý

Re: FGPA Development


 

¿ªÔÆÌåÓý

On 26/07/19 02:47, Harvey White wrote:
On 7/25/2019 3:50 PM, saipan59 wrote:
I want to suggest that the discussion should include the trade-offs of an FPGA implementation vs an MCU [I have very limited experience with the former, but a lot with the latter], as it relates to the applications we're talking about.

I'll weigh in here.

FPGA:? lots faster, more expensive, extensive I/O.? True hardware implementation, simultaneous operation of functions.? Often 3.3 volts for I/O.? Cost (including CPLDS, which are more limited in scope, cheaper, and generally nonvolatile), will run from about 2 dollars to 16 dollars for Xilinx parts (what I'm familiar with).? VHDL is essentially specifying hardware.? If you want it to respond to different conditions (as in pretending to have a program in it) then? you need either a state machine or a processor IP (Picoblaze is possible).? RAM resources are somewhat limited depending on chip (CPLDs have none).? Best use: smart hardware and hardware subsystems.? SPI interface may be programmed in for processor interface.? Programming is in VHDL or Verilog.?

Microprocessor:? No hardware systems need to be designed.? Programming is sequential, slower, although DMA and some subsystems can operate independently.? 3.3 and 5.0 volts depending on processor.? Cost may run from less than one dollar to 20 dollars depending on family and manufacturer.? Microprocessors need external memory, external I/O subsystems.? Microcontrollers take program and data memory inside, and provide subsystems (I2C, SPI, Serial, etc.).? Programming is in any high level language available or assembly.? Operating system can give illusion of simultaneous operation, but unless more than one processor core is available, operation is time shared.


I'll add some points about FPGAs:
  • short latency and guaranteed latency between input and/or signals changing, i.e. hard realtime operation. The operations are performed directly by hardware, so there are no interrupt service routines, multitasking etc to "get in the way"
  • Xylinx Zync devices have lots of FPGA fabric plus two onboard very capable ARM A9 processors. The processors can run an RTOS or Linux, or RTOS+Linux. This allows tight integration between the processor and custom hardware

There is one processor that is half-way between a standard MCU and FPGA in terms of performance: the XMOS xCORE devices, available from Digikey. They have a long and solid pedigree, being directly descended from Transputers and Occam and Hoare's Communicating Sequential Processes (CSP) formalism.

A single chip can have up to 32 cores (expandable with chips), run at 4000MIPS, have onboard RAM and flash memory, "FPGA like" IO (e.g. SERDES etc)? - but that is useless unless you can program them quickly and effectively. The xC language enables that, being designed for multiprocessing from the ground up - unlike C. This makes it surprisingly easy and fun to actually use the devices.

As for hard realtime, the IDE will guarantee the execution times and latency. That avoids the need to run the code, make measurements, and piously hope you have stumbled across worst-case execution times. An example is that you can use some of the cores to directly grab and process 100Mb/s serial data from an ethernet or USB interface, while other cores simultaneously get on with the real work.

Yes, I'm a fan of them, for the right application.

Join [email protected] to automatically receive all group messages.