电子科技 ›› 2023, Vol. 36 ›› Issue (9): 66-72.doi: 10.16180/j.cnki.issn1007-7820.2023.09.010

• • 上一篇    下一篇

基于FPGA的2底指数函数算法优化与实现

程甜甜,宋宇鲲   

  1. 合肥工业大学 微电子学院,安徽 合肥 230601
  • 收稿日期:2022-05-06 出版日期:2023-09-15 发布日期:2023-09-18
  • 作者简介:程甜甜(1995-),女,硕士研究生。研究方向:数字集成电路设计。|宋宇鲲(1975-),男,博士,副研究员。研究方向:面向数据高密和密集计算应用的SoC/MPSoC体系结构与实现、可重构计算系统架构和实现。
  • 基金资助:
    国家重点研发计划(2018YFB2202604)

Optimization and Implementation of 2-Base Exponential Function Algorithm Based on FPGA

CHENG Tiantian,SONG Yukun   

  1. School of Microelectronics,Hefei University of Techology,Hefei 230601,China
  • Received:2022-05-06 Online:2023-09-15 Published:2023-09-18
  • Supported by:
    National Key R&D Program of China(2018YFB2202604)

摘要:

针对指数函数的常见硬件实现方法中存在的计算范围小、误差较大等问题,文中提出一种改进的多项式和查找表相结合的2底指数函数y=2x的浮点硬件实现方法。优化算法采用区间划分的预处理方法将输入x压缩至(-1/512,1/512)后进行指数函数的泰勒级数展开,确保双精度浮点数格式下泰勒级数展开至x4项时精度达到10-16,并通过优化中间数据存储策略,减少存储资源消耗。使用Verilog HDL在Xilinx公司的XC7K325T FPGA(Field Programmable Gate Array)上完成优化算法的硬件设计实现与性能测试。结果表明,在双精度浮点数所能表示的值域范围内,文中所设计的电路能够以较少的存储开销支持全定义域指数函数计算,计算精度不低于10-16

关键词: 指数函数, 泰勒级数, 查找表, 超越函数, 区间划分, 多项式, 浮点数, 预处理

Abstract:

In view of the problems of small calculation value range and large error in common hardware implementation methods of exponential function, an improved hardware implementation method of base 2 exponential function y=2x combining polynomial and lookup table is proposed. The optimization algorithm adopts the interval division to compress the input x to (-1/512,1/512) and then performs the Taylor series expansion of the exponential function to ensure that the accuracy reaches 10-16 in the double-precision floating-point when the Taylor series is expands to x4. And storage resource consumption is reduced by optimizing intermediate data storage policies. Hardware design implementation and performance test of the improved algorithm on Xilinx XC7K325T FPGA(Field Programmable Gate Array) are performed by using Verilog HDL. The results show that within the value range that double-precision floating-point numbers can represent, the full-domain exponential function calculation can be supported by the designed circuit with less storage consumption, and the calculation accuracy is not less than 10-16.

Key words: exponential function, Taylor series, look up table, transcendental function, interval division, polynomial floating point, pretreatment

中图分类号: 

  • TN47