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

计算机工程与科学

• 论文 • 上一篇    下一篇

基于一阶泰勒级数查表法单精度倒数的设计与实现

晏敏1,何欣1,李沙1,祝龙1,赵丽2   

  1. (1.湖南大学物理与微电子科学学院,湖南 长沙 410082;
    2.湖南城市学院市政与测绘工程学院,湖南 益阳 413099)
  • 收稿日期:2015-09-21 修回日期:2016-03-04 出版日期:2017-07-25 发布日期:2017-07-25

Design and implementation of a single precision inverse
based on the first order Taylor series look-up table method
 

YAN Min1,HE Xin1,LI Sha1,ZHU Long1,ZHAO Li2   

  1. (1.College of Physics and Microelectronics Science,Hunan University,Changsha 410082;
    2.College of Municipal and Surveying and Mapping Engineering,Hunan City University,Yiyang 413099,China)
  • Received:2015-09-21 Revised:2016-03-04 Online:2017-07-25 Published:2017-07-25

摘要:

在分析了单精度倒数算法在图形处理器中存在的不足的基础上,设计了一阶泰勒级数单精度倒数算法。与传统算法相比,在资源消耗、运算周期和效率方面得到了有效改善。本浮点倒数算法的主要逻辑模块由一个24位整数加法器、一个ROM和一个24位乘法器组成。将在[1,2)范围的尾数平均分为4 096个区间,将每个区间起始点倒数平方放入查找表,并对每个区间采用一阶泰勒级数计算倒数值。仿真结果表明:仿真的结果与理论结果一致,满足单精度浮点数的精度要求。目前此算法已经成功流片,应用于国产第三代图形处理器JM7200。

关键词: 图形处理器, 一阶泰勒级数, 查表法, 单精度倒数

Abstract:

Based on the analysis on the existing problems in the single precision inverse algorithm, we design and implement a single precision inverse based on the first order Taylor series. Compared with the traditional algorithm, the resource consumption, operation cycle and efficiency are improved. The main logic module of this floating point algorithm is composed of a 24 bit integer adder, a ROM and a 24 bit multiplier. The mantissa in range of [1, 2) is divided to 4096 intervals on average, and the reciprocal square of the starting point of each interval is stored in a lookup table. Then the first order Taylor series is applied to compute the inverse value of each interval. Simulation results are consistent with the theoretical results, which meets the accuracy requirement of the single precision. This algorithm has been successfully applied to the third generation of GPU JM7200.

Key words: GPU, first order Taylor series, look-up table, single precision inverse