What is FPGA, what are the advantages and disadvantages?

Last Update Time: 2019-12-19 10:47:00

      If you need to calculate some data, the most common method is to write the software required for the calculation for an instruction-based architecture such as CPU or GPU. 

      Or take a more cumbersome approach, designing a dedicated circuit specifically for specific computing needs, rather than writing instructions for general-purpose circuits such as CPUs and GPUs. After designing your own circuit, try to implement the design you need to actually start the calculation. 

      One way to think about this is to have very deep technical capabilities, and you need to actually create the circuit that will implement the desired design (this is also called ASIC, or ASIC).

      But there is a simpler method at this time, which is the focus of this article: the use of Field Programmable Gate Array, FPGA, a reconfigurable integrated circuit to achieve their own circuit design. We can configure the FPGA to be any circuit we need (as long as the FPGA can accommodate it). 

      This is quite different from the hardware programming methods based on CPU and GPU instructions that many programmers are already familiar with. Instruction-based hardware is software-configured, while FPGAs are configured by specifying the required hardware circuitry.

      Why use FPGAs to complete computing tasks instead of choosing a more general CPU or GPU? The difference between this method and the CPU and GPU is mainly reflected in the following aspects: Delay: How long does it take to complete the calculation? FPGAs are superior in this regard. Connectivity: What inputs/outputs can be connected, and what is the bandwidth? The FPGA can be connected directly to the input, providing very high bandwidth. Engineering Cost: How much effort does it take to express the required calculations? FPGA engineering costs are usually much higher than instruction-based architectures, so choosing this approach is certainly because other advantages are worth doing.


image.png


      Energy efficiency: How much energy is used in the calculation process? This is often the biggest advantage of FPGAs, but whether FPGAs really outperform CPUs or GPUs depends on the specific application. If you need to calculate data for the unmanned function of a jet fighter, or develop a high-frequency algorithmic trading engine, low latency is definitely necessary, and the wait time between the input data and the resulting result needs to be as short as possible. FPGAs in these areas far outperform CPUs (or GPUs because GPUs also need to communicate through the CPU).

      FPGAs can easily achieve delays of around 1 millisecond, or even less than 1 millisecond, and even the best performing CPUs typically have latency of around 50 milliseconds. More importantly, FPGA latency is often deterministic. One of the main reasons for this low latency is that FPGAs are typically more specific: there is no need to rely on a general-purpose operating system or communication over a universal bus (such as USB or PCIe).

      We can connect any data source, such as a network interface or sensor, directly to the chip via an FPGA. The CPU and GPU approach is very different. They must connect to the data source through a standardized bus (such as USB or PCIe) and rely on the operating system to provide data to the application. Direct connection to the chip for higher bandwidth (and lower latency).

      In some cases, such high bandwidth is essential, such as radio astronomy applications such as LOFAR and SKA. Such applications require a large number of dedicated sensors to be deployed in the field and generate massive amounts of data. However, in order to improve the manageability of the entire system, the amount of data generated by the sensor must be greatly reduced, and then passed to the application for processing. So the Dutch Institute of Radio Astronomy ASTRON designed Uniboard2, a substrate containing four FPGA chips that can process even more data per second than the Internet exchange in Amsterdam!

      Before delving into energy efficiency issues, let's take a look at one of FPGA's biggest drawbacks: their programming/configuration work is too difficult compared to instruction-based architectures such as CPUs and GPUs! In general, these hardware circuits are described by Hardware Description Languages, HDL, such as VHDL and Verilog, while software can be programmed in a variety of programming languages, such as Java, C, and Python.

      From a theoretical point of view, both hardware description languages and programming languages can be used to express any computation (both of which are Turing-complete), but the engineering details vary greatly. There is a new trend in the field today: High Level Synthesis, HLS, which refers to the programming of FPGAs using conventional programming languages such as OpenCL or C++, which allows for more advanced abstractions. However, even with such programming languages, FPGA programming is still an order of magnitude more difficult than instruction-based system programming.

      The most difficult part of FPGA programming is the lengthy compilation process. For example, in the case of Intel OpenCL compiler, typical FPGA program compilation usually takes 4-12 hours, because of the cumbersome "Place-and-route" operation, mapping the custom circuits we need to FPGA resources. While ensuring that the desired result is achieved with the shortest possible path. This is a very complex optimization problem, and the entire process requires a huge amount of computing power. Although Intel provides an emulator that allows us to test the correctness of the final result in a shorter time, the process of determining and optimizing performance still has to go through a lengthy compilation process.

 

If you want to know more, our website has product specifications for the FPGAs, you can go to ALLICDATA ELECTRONICS LIMITED to get more information