• 中国计算机学会会刊
  • 中国科技核心期刊
  • 中文核心期刊

计算机工程与科学 ›› 2022, Vol. 44 ›› Issue (08): 1342-1348.

• 高性能计算 • 上一篇    下一篇

基于Piecewise算法的反正切运算器的设计

龙科莅1,汪东2,陈虎2,李旭军1   

  1. (1.湘潭大学物理与光电工程学院,湖南 湘潭 411105;2.湖南毂梁微电子有限公司,湖南 长沙 410000)
  • 收稿日期:2021-03-05 修回日期:2021-12-11 接受日期:2022-08-25 出版日期:2022-08-25 发布日期:2022-08-25

An arctangent operator based on the Piecewise algorithm

LONG Ke-li1,WANG Dong2,CHEN Hu2,LI Xu-jun1   

  1. (1.School of Physics and Optoelectronics,Xiangtan University,Xiangtan 411105;
    2.Hunan Great-Leo Microelectronics Co.,Ltd.,Changsha 410000,China)
  • Received:2021-03-05 Revised:2021-12-11 Accepted:2022-08-25 Online:2022-08-25 Published:2022-08-25

摘要: 在科学计算、数字信号处理和图像处理等诸多应用中,反正切运算都是常用的基础操作之一。基于Piecewise算法,面向某型DSP芯片设计了一个符合IEEE-754标准的单精度浮点反正切运算器。为了达到设计精度,分析和限制了运算过程中的所有误差。为了确保输出结果具备与原函数一致的单调性,提出了一种可确保算法单调性的设计方法。为了降低硬件成本,使用了二级分层分段方法,并实现了基于电路静态和动态分析的信号位宽设计与优化。基于FPGA的仿真结果表明,反正切运算器所需硬件成本较小,其输出结果与标准结果之间的误差小于1 ulp,且运算器输出具有良好的单调性。

关键词: 反正切运算, 误差分析, 分层分段, 位宽优化, 单调性

Abstract: The arctangent operation is one of the common operations in applications such as scientific computing, digital signal processing, and graph processing. Based on the piecewise algorithm, a single-precision floating-point arctangent arithmetic unit conforming to the IEEE-754 standard is designed for a certain type of DSP chip. To achieve the accuracy required by the design, all errors in the calculation process are analyzed and limited. To make the monotonicity of the output result consistent with the original function, a design method that can guarantee the monotonicity of the algorithm is proposed. To reduce hardware cost, a two-level hierarchical segmentation method is used, and the signal bit width design and optimization based on circuit static and dynamic analysis are realized. The FPGA-based simulation results show that the hardware cost of the arctangent operator is relatively small, the error between the output and the standard result is less than 1 ulp, and the operator has excellent output monotonicity.


Key words: arctangent, error analysis, hierarchical segmentation, bit width optimization, monotonicity