利用矢量旋轉求解平方根的算法及其FPGA實現*
在相同精度的條件下,本文算法占用資源比采用牛頓迭代算法和不恢復余數的開平方算法分別少了9%和6%,完成一次平方根運算需要的周期明顯減少,只需要1個時鐘周期就可以輸出運算結果,以后每個時鐘輸出1個運算結果。而牛頓迭代算法由于需要反饋調整,需要31個時鐘周期才可以完成1次開平方運算;不恢復余數的開平方算法則需要9個時鐘周期才能輸出第一個結果。
在硬件速度允許的情況下,該算法可以進一步提高以獲得更好的性能,這取決于迭代計算中每次旋轉角度大小的選擇。
結語
本文提出了一種基于矢量旋轉求三角函數進而求得任意數平方根的算法,并在FPGA上加以實現。該算法沒有時延,且迭代次數少;在相同的計算誤差下,使用的算術邏輯單元較少,適于在FPGA上實現,滿足了數據更快處理速度和芯片更少面積的要求。
參考文獻:
[1] Hennessy J, Patterson D. Computer Architecture, A Quantitative Approach[M], Second Edition, Morgan Kaufmann Publishers, Inc., 1996
[2] Kabuo H, Taniguchi T, Miyoshi A. et al. Accurate Rounding Scheme for the Newton-Raphson Method Using Redundant Binary Representation[J], IEEE Transaction on Computers, Vol. 43, No. 1, 1994. pp43-51
[3] Markstein P, Computation of Elementary Functions on the IBM RISC RS6000 Processor[J]. IBM Jour. Of Res. and Dev., January, 1990. pp111-119
[4] Ercegovac M, Lang T, Radix-4 Square Root Without Initial PLA[J], IEEE Transaction on Computers, Vol. 39, No. 8, 1990. pp1016-1024
[5] Lang T, Montuschi P, Very-high Radix Combined Division and Square Root with Prescaling and Selection by Rounding[J], Proc. of 12th IEEE Symposium on Computer Arithmetic, IEEE Computer Society Press, 1995. pp124-131
[6] Bannur J, Varma A, The VLSI Implementation of A Square Root Algorithm[J], Proc. of IEEE Symposium on Computer Arithmetic, IEEE Computer Society Press, 1985. pp159-165
[7] Johnson K C, Efficient Square Root Implementation on the 68000[J], ACM Transaction on Mathematical Software, Vol. 13, No. 2, 1987. pp138-151
[8] 王艷梅,王同杰,鄭成文.用VHDL實現的開方運算[J].沈陽工業學院學報,2004, 23(1): 3
[9] 林志謀,盧貴主.一種適合FPGA實現的開平方算法[J].廈門大學學報,2006,45(2):119-201
矢量控制相關文章:矢量控制原理
評論