I know that I'm fascinated by all things related to electronics, but from what point of view, today's Field Programmable Gate Arrays (FPGAs) seem to stand out from the crowd and are really great devices. If in this intelligent era, in this field, you want to have a skill you have not paid attention to FPGA, then the world will abandon you and the era will abandon you.
As an FPGA of a pure digital circuit, the implementation of a square root is troublesome. After all, hardware does not support this algorithm.
Fortunately, the manufacturer's IP core has a related square root IP library, so it is also very convenient to use.
The figure above is the IP core in the call library of QUARTUS, and the resource usage after comprehensive adaptation. There are 1369 logic units used, accounting for 22% of the total resources, and 16 on-chip hardware multipliers. It can be said that in the limited resources, the use of resources is still very large.
In the previous articles, we introduced the CORDIC algorithm to calculate the trigonometric sin and cos values. The values ​​of the trigonometric functions sin and cos are calculated using the rotation mode of the CORDIC algorithm. In vector mode, the square root can be calculated using the CORDIC algorithm.
As shown in the figure, the CORDIC algorithm is used to calculate the square root and the usage of FPGA resources. The logic unit uses 10%, the multiplier uses 6 and the on-chip ram only uses less than 1%. It can be said that in the case of limited resources, it is a very good choice. However, it should be noted that the algorithm itself can use pipelining or other methods. The calculation period depends on the number of iterations. The larger the number of iterations, the more accurate the calculation, and the longer the calculation cycle.
The above figure is the result of 16 iterations. It can clearly be seen that the input xi, yi, and the output sqrt_out are very accurate. This method can be used when the timing is not tight.
Specific detailed algorithms can be self-reasonable based on the previously introduced CORDIC algorithm.
Modular Plug,modular jack rj45,modular jack cat6,mod plugs
NINGBO UONICORE ELECTRONICS CO., LTD , https://www.uniconmelectronics.com