CN101630243A - Transcendental function device and method for realizing transcendental function utilizing same - Google Patents

Transcendental function device and method for realizing transcendental function utilizing same Download PDF

Info

Publication number
CN101630243A
CN101630243A CN200910023586A CN200910023586A CN101630243A CN 101630243 A CN101630243 A CN 101630243A CN 200910023586 A CN200910023586 A CN 200910023586A CN 200910023586 A CN200910023586 A CN 200910023586A CN 101630243 A CN101630243 A CN 101630243A
Authority
CN
China
Prior art keywords
register
processing
counter
value
processing unit
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN200910023586A
Other languages
Chinese (zh)
Other versions
CN101630243B (en
Inventor
高德远
田杭沛
樊晓桠
张盛兵
王党辉
魏廷存
黄小平
张萌
郑然�
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Northwestern Polytechnical University
Original Assignee
Northwestern Polytechnical University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Northwestern Polytechnical University filed Critical Northwestern Polytechnical University
Priority to CN2009100235862A priority Critical patent/CN101630243B/en
Publication of CN101630243A publication Critical patent/CN101630243A/en
Application granted granted Critical
Publication of CN101630243B publication Critical patent/CN101630243B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Complex Calculations (AREA)

Abstract

The invention discloses a transcendental function device and a method for realizing the transcendental function utilizing the same. The device comprises a preprocessing unit, a processing unit and a post-processing unit. The processing unit is composed of a counter register 1, a counter register 2, an X register and a processing passage thereof, a Y register and a processing passage thereof, a Z register and a processing passage thereof, and a control state machine. By utilizing an HPOR CORDIC device, one-one correspondence relation between indexes of a median generated in processing and a change of the counter is established, and the change of the counter register 2 represents the change of the indexes, therefore only a magnitude portion is processed to eliminate an index operation and mantissa match exponents in a floating decimal CORDIC. The device further overcomes shortcomings of large delay of the floating decimal CORDIC device and poor processing precision of a fixed point CORDIC device, and the realization price of hardware is much low.

Description

Transcendental function device and the method that realizes transcendental function with this device
Technical field
The present invention relates to a kind of transcendental function device.Also relate to the method that realizes transcendental function with this transcendental function device.
Background technology
Document 1 " patent No. is the United States Patent (USP) of US20060200510 " discloses a kind of CORDIC angle treating apparatus, have a unit for scaling in this device, before the CORDIC conversion, this device is done the conversion that moves to left to the data of input earlier, processing finishes, and adopts opposite conversion process again.This device can improve the processing accuracy of CORDIC angle by the round-off error in the shift left operation minimizing processing.But because fixed-point data represents that the error that causes is very big, the precision that this innovative approach obtains improves more limited in the CORDIC conversion.
Document 2 " patent No. is the United States Patent (USP) of US20060233284 " discloses a kind of CORDIC whirligig, and this device adopts fixed point CORDIC conversion to realize the angle rotation, in the iterative process of CORDIC, has adopted carry at random.This device is in order to improve the precision of processing, with traditional round off nearby to be improved at random round off.But the error that rounds off at random under extreme case is very big, influences the instability of system.
Document 3 " patent No. is the United States Patent (USP) of US20030097388 " discloses a kind of vector rotation CORDIC device, this device adopt two single-precision numbers and, the index of this single-precision number is to be the signed number at the end with 2.By take and form, can reduce the error that angle is handled.But in the CORDIC device that with the floating number is process object, this structure can not reduce the delay that floating-point is handled.
With reference to Fig. 5 and Fig. 6, known transcendental function device comprises pretreatment unit, processing unit and post-processing unit.In floating-point CORDIC device, processing unit comprises exponential part and magnitude portion, owing to adopted the floating-point structure, the processing accuracy height, but each iteration need be carried out index to the normalization of rank, mantissa's addition, floating number and round off, and circuit delay is big, and realizes complicated.In fixed point CORDIC device, processing unit is made up of the integer structure, handles required hardware costs and delay is all very little, and still the round-off error that causes is bigger.Therefore, in the transcendental function device, floating-point CORDIC device and fixed point CORDIC device all exist defective to overcome.
Summary of the invention
Postpone big, the low deficiency of fixed point CORDIC structure treatment precision in order to overcome floating-point CORDIC structural circuit, the invention provides a kind of transcendental function device, adopt the HPOR CORDIC hardware configuration of high precision, order iteration to generate transcendental function, the index variation of the intermediate variable that will produce during this hardware configuration will be handled is mapped on the iterations, eliminate the index operation of floating-point transcendental function device, can not introduce unnecessary round-off error simultaneously.This HPOR CORDIC transcendental function device possesses the low characteristics that postpone, hang down hardware costs, high processing accuracy simultaneously.
The present invention also provides the method for utilizing this transcendental function hardware unit to realize transcendental function.At first input value is carried out pre-service, input value is transformed into certain limit.The exponential quantity of input value after the generation pre-service, exponential quantity, the mantissa value of input value are input to HPOR CORDIC unit as input quantity, HPOR CORDIC starts working through after the initialization, result is standardized at last again, and is converted to floating number output.
The technical solution adopted for the present invention to solve the technical problems: a kind of transcendental function device, comprise pretreatment unit, processing unit and post-processing unit, be characterized in: described processing unit is by counter register 1, counter register 2, X register and processing path thereof, y register and processing path thereof, Z register and processing path thereof, control state machine is formed, to the X register, y register and Z register input initial value, control state machine is sent processing command, the X register is handled path, y register handles path and Z register processing path was handled its corresponding register value respectively in each clock period, result is saved in the corresponding register once more, every processing once, counter register 1 adds 1, counter register 2 adds 1, when the value of counter register 1 and counter register 2 equals preset value, control state machine is sent and is ceased and desisted order, X register and y register output result.
A kind of method of utilizing above-mentioned transcendental function device to realize transcendental function is characterized in may further comprise the steps:
(a) input value pre-service when realizing trigonometric function, is converted to input value [π/4, π/4], when realizing hyperbolic function, input value is converted to [1/2,1/2];
(b) handle the index of pretreated input value, and expand three in mantissa's most significant digit and lowest order respectively;
(c) with the exponential quantity of input value as the counter initial value, the mantissa of input value is as Z register initial value, according to instruction to the X register, the y register initialize;
(d) processing unit work;
In the processing, only magnitude portion is handled, exponential part does not participate in handling;
(e) according to the exponential part of Counter Value generation result, according to the X register, the value of y register generates magnitude portion, and result is done normalization, returns step (a).
The invention has the beneficial effects as follows: owing to adopt HPOR CORDIC device, one-to-one relationship is set up in the index of the intermediate value of generation and the variation of counter in the processing, index variation has been represented in the variation of counter register 2, therefore in processing, only there is magnitude portion to participate in handling, eliminated that index among the floating-point CORDIC is handled and mantissa to rank, this device has overcome simultaneously that floating-point CORDIC device processing delay is big, the shortcoming of fixed point CORDIC device processing accuracy difference, and hardware realizes that cost is very little.
Below in conjunction with drawings and Examples the present invention is elaborated.
Description of drawings
Fig. 1 is the structured flowchart of transcendental function device of the present invention.
Fig. 2 is the detail drawing of pretreatment unit among Fig. 1.
Fig. 3 is the detail drawing of processing unit among Fig. 1.
Fig. 4 is the detail drawing of post-processing unit among Fig. 1.
Fig. 5 is the structured flowchart of known floating-point transcendental function device.
Fig. 6 is the structured flowchart of known fixed point transcendental function device.
Embodiment
With reference to Fig. 1~4, the present invention is at the textural transcendental function device that adopts HPOR CORDIC structure.Whole device is made up of pretreatment unit, processing unit and post-processing unit three parts.Pretreatment unit is used for the input value of transcendental function is carried out conversion, and processing unit is responsible for implementing concrete processing, and post-processing unit is done the normalization processing to the output result of processing unit.Processing instruction that the pretreatment unit receiving processor sends and floating-point source operand, the selector switch of pretreatment unit and divider can be done normalization to source operand according to the difference of processor instruction and handle: if processor instruction is hyperbolic function, source operand is normalized to [1/2,1/2] in, if processor instruction is a trigonometric function, source operand is normalized to [π/4, π/4].Source operand after pretreatment unit will be standardized is decomposed into sign bit S, exponent bits and mantissa position, handle the index E of normalization back source operand, and the mantissa of this source operand is expanded to 70bit by 64 count Man, S, E after pretreatment unit will be handled, Man output to processing unit.Processing unit makes up S and Man and be saved in the Z register, and E is saved in the counter 2, according to instruction counter register 1, X register, y register is done initialization simultaneously.After initialization was finished, under the control of state machine, processing unit was started working, and iteration is 64 times altogether, and required parameter is kept among the ROM in the processing, by state machine control access.The back output result of finishing dealing with X, Y and ES.Post-processing unit generates intermediate result according to ES, X, Y, middle result is standardized and rounds off handle and output.
The information flow direction of entire circuit is: processor sends transcendental function instruction and source operand, instruction of pretreatment module receiving processor and source operand, source operand is normalized to the data field of setting according to processor instruction, and source operand is decomposed into S, Man and E, this three number is kept in Z register, the counter register 2 as the input of processing unit.Processing unit is exported result X, Y and ES after initialization, 64 iteration, post-processing unit receives this three numbers and sign bit, and it is combined into floating number, does normalization at last, rounds off and operate and output.
The transcendental function device realizes that the method for transcendental function is specific as follows:
(1) source operand of the instruction of the transcendental function of pretreatment unit receiving processor and 80 IEEE754 floating-point formats.
(2) pretreatment unit is done the normalization processing according to processor instruction to source operand:, source operand is converted to [π/4, π/4] if processor instruction is a trigonometric function, if processor instruction is hyperbolic function, source operand is converted to [1/2,1/2].
(3) pretreatment unit is done decomposition to normalized source operand according to sign bit S, exponent bits, mantissa position, the index E of source operand after the processing pre-service, and expand three in the Man of mantissa most significant digit and lowest order respectively.
(4) processing unit initialization: processing unit receives S, E, Man, respectively S and Man is kept in Z register and the counter register 2, and putting counter register 1 is 0, and the output initial value is to the X register from ROM, and putting y register is 0.
(5) processing unit is started working, and has only mantissa participate in to handle in the processing, and exponent bits does not participate in handling, each clock period iteration once, 64 clock period of iteration altogether.
(6) post-processing unit receives the processing unit processes result: X, Y and ES, and according to sign bit S composition floating number.
(7) post-processing unit is done the normalization and the processing of rounding off to the result of floating-point format.
(8) the output result turns back to step (1).
Can find out that from carrying out on the flow process this device has following characteristics: at first, in pretreatment unit, the floating-point source is operated Number decomposes, and source operand is decomposed into sign bit, exponent bits and mantissa position, and sign bit and exponent bits do not participate in processing procedure, Only as the initial value of counter, in the iterative process of processing unit, the displacement of X register, y register and Z register is grasped The mantissa that do, add operation only has floating number participates in processing, and has eliminated the index of floating-point CORDIC device to rank and mantissa's specification Change operation, reduced circuit delay, the processing accuracy of not losing circuit simultaneously.

Claims (2)

1, a kind of transcendental function device, comprise pretreatment unit, processing unit and post-processing unit, it is characterized in that: described processing unit is by counter register 1, counter register 2, X register and processing path thereof, y register and processing path thereof, Z register and processing path thereof, control state machine is formed, to the X register, y register and Z register input initial value, control state machine is sent processing command, the X register is handled path, y register handles path and Z register processing path was handled its corresponding register value respectively in each clock period, result is saved in the corresponding register once more, every processing once, counter register 1 adds 1, counter register 2 adds 1, when the value of counter register 1 and counter register 2 equals preset value, control state machine is sent and is ceased and desisted order, X register and y register output result.
2, a kind of method of utilizing the described transcendental function device of claim 1 to realize transcendental function is characterized in may further comprise the steps:
(a) input value pre-service when realizing trigonometric function, is converted to input value [π/4, π/4], when realizing hyperbolic function, input value is converted to [1/2,1/2];
(b) handle the index of pretreated input value, and expand three in mantissa's most significant digit and lowest order respectively;
(c) with the exponential quantity of input value as the counter initial value, the mantissa of input value is as Z register initial value, according to instruction to the X register, the y register initialize;
(d) processing unit work;
In the processing, only magnitude portion is handled, exponential part does not participate in handling;
(e) according to the exponential part of Counter Value generation result, according to the X register, the value of y register generates magnitude portion, and result is done normalization, returns step (a).
CN2009100235862A 2009-08-14 2009-08-14 Transcendental function device and method for realizing transcendental function utilizing same Expired - Fee Related CN101630243B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2009100235862A CN101630243B (en) 2009-08-14 2009-08-14 Transcendental function device and method for realizing transcendental function utilizing same

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2009100235862A CN101630243B (en) 2009-08-14 2009-08-14 Transcendental function device and method for realizing transcendental function utilizing same

Publications (2)

Publication Number Publication Date
CN101630243A true CN101630243A (en) 2010-01-20
CN101630243B CN101630243B (en) 2011-01-05

Family

ID=41575363

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2009100235862A Expired - Fee Related CN101630243B (en) 2009-08-14 2009-08-14 Transcendental function device and method for realizing transcendental function utilizing same

Country Status (1)

Country Link
CN (1) CN101630243B (en)

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102073471A (en) * 2010-12-08 2011-05-25 东莞市泰斗微电子科技有限公司 Method and circuit for Cordic (Coordinate Rotation Digital Computer) iterative operation of processor
CN102073472A (en) * 2011-01-05 2011-05-25 东莞市泰斗微电子科技有限公司 Trigonometric function CORDIC iteration operation coprocessor and operation processing method thereof
CN102722469A (en) * 2012-05-28 2012-10-10 西安交通大学 Elementary transcendental function operation method based on floating point arithmetic unit and coprocessor for method
CN103809931A (en) * 2012-11-06 2014-05-21 西安元朔科技有限公司 Design of dedicated high-speed floating point index arithmetic unit
WO2017185334A1 (en) * 2016-04-29 2017-11-02 北京中科寒武纪科技有限公司 Device and method for performing multiple transcendental function operations
WO2017185390A1 (en) * 2016-04-26 2017-11-02 北京中科寒武纪科技有限公司 Apparatus and method for executing transcendental function operation of vectors
CN107329732A (en) * 2016-04-29 2017-11-07 北京中科寒武纪科技有限公司 It is a kind of to be used to perform a variety of apparatus and method for surmounting function computing
CN108228135A (en) * 2016-12-15 2018-06-29 上海寒武纪信息科技有限公司 A kind of a variety of devices surmounted function of operation
CN109271134A (en) * 2018-12-13 2019-01-25 上海燧原科技有限公司 Surmount function operation method and device, storage medium and electronic equipment
CN110187866A (en) * 2019-06-03 2019-08-30 南京宁麒智能计算芯片研究院有限公司 A kind of logarithmic multiplication computing system and method based on hyperbolic CORDIC

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103677737B (en) * 2013-09-26 2016-08-17 中国人民解放军国防科学技术大学 The method and device that low delay CORDIC trigonometric function based on carry-save summator realizes

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102073471B (en) * 2010-12-08 2012-11-14 东莞市泰斗微电子科技有限公司 Method and circuit for Cordic (Coordinate Rotation Digital Computer) iterative operation of processor
CN102073471A (en) * 2010-12-08 2011-05-25 东莞市泰斗微电子科技有限公司 Method and circuit for Cordic (Coordinate Rotation Digital Computer) iterative operation of processor
CN102073472A (en) * 2011-01-05 2011-05-25 东莞市泰斗微电子科技有限公司 Trigonometric function CORDIC iteration operation coprocessor and operation processing method thereof
CN102073472B (en) * 2011-01-05 2012-10-03 东莞市泰斗微电子科技有限公司 Trigonometric function CORDIC iteration operation coprocessor and operation processing method thereof
CN102722469A (en) * 2012-05-28 2012-10-10 西安交通大学 Elementary transcendental function operation method based on floating point arithmetic unit and coprocessor for method
CN103809931A (en) * 2012-11-06 2014-05-21 西安元朔科技有限公司 Design of dedicated high-speed floating point index arithmetic unit
WO2017185390A1 (en) * 2016-04-26 2017-11-02 北京中科寒武纪科技有限公司 Apparatus and method for executing transcendental function operation of vectors
WO2017185334A1 (en) * 2016-04-29 2017-11-02 北京中科寒武纪科技有限公司 Device and method for performing multiple transcendental function operations
CN107329732A (en) * 2016-04-29 2017-11-07 北京中科寒武纪科技有限公司 It is a kind of to be used to perform a variety of apparatus and method for surmounting function computing
CN108228135A (en) * 2016-12-15 2018-06-29 上海寒武纪信息科技有限公司 A kind of a variety of devices surmounted function of operation
CN108228135B (en) * 2016-12-15 2021-09-07 上海寒武纪信息科技有限公司 Device for operating multiple transcendental functions
CN109271134A (en) * 2018-12-13 2019-01-25 上海燧原科技有限公司 Surmount function operation method and device, storage medium and electronic equipment
CN110187866A (en) * 2019-06-03 2019-08-30 南京宁麒智能计算芯片研究院有限公司 A kind of logarithmic multiplication computing system and method based on hyperbolic CORDIC

Also Published As

Publication number Publication date
CN101630243B (en) 2011-01-05

Similar Documents

Publication Publication Date Title
CN101630243B (en) Transcendental function device and method for realizing transcendental function utilizing same
CN105468331B (en) Independent floating point conversion unit
US9753695B2 (en) Datapath circuit for digital signal processors
KR101735677B1 (en) Apparatus for multiply add fused unit of floating point number, and method thereof
US8990282B2 (en) Apparatus and method for performing fused multiply add floating point operation
CN1928809A (en) System, apparatus and method for performing floating-point operations
JPH0749772A (en) Floating-point arithmetic unit using corrected newton-raphson technique regarding division and computation of extraction of square root
US20080208945A1 (en) Method to compute an approximation to the reciprocal of the square root of a floating point number in ieee format
CN103984522A (en) Method for achieving fixed point and floating point mixed division in general-purpose digital signal processor (GPDSP)
CN106250098B (en) Apparatus and method for controlling rounding when performing floating point operations
Wang et al. Decimal floating-point division using Newton-Raphson iteration
CN100524201C (en) Method and apparatus for implementing power of two floating point estimation
Crespo et al. Unified posit/IEEE-754 vector MAC unit for transprecision computing
CN103135960A (en) Design method of integrated floating point unit based on FPGA (field programmable gate array)
CN101650643B (en) Rounding method for indivisible floating point division radication
CN107423026B (en) Method and device for realizing sine and cosine function calculation
CN1740962A (en) Fast pipeline type divider
CN201449601U (en) Transcendental function device
US6598065B1 (en) Method for achieving correctly rounded quotients in algorithms based on fused multiply-accumulate without requiring the intermediate calculation of a correctly rounded reciprocal
CN116933840A (en) Multi-precision Posit encoding and decoding operation device and method supporting variable index bit width
CN111666064A (en) Trigonometric function loop iteration solving method and device based on CORDIC
JPH0687218B2 (en) Floating-point arithmetic processing device and divisor multiple generation device
Murillo et al. A suite of division algorithms for posit arithmetic
CN102109973A (en) Processor implementation device including transcendental function calculation
CN113377334B (en) Floating point data processing method and device and storage medium

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
C17 Cessation of patent right
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20110105

Termination date: 20130814