CN202075727U - Processor realizing device containing transcendental function calculation - Google Patents

Processor realizing device containing transcendental function calculation Download PDF

Info

Publication number
CN202075727U
CN202075727U CN2011200527632U CN201120052763U CN202075727U CN 202075727 U CN202075727 U CN 202075727U CN 2011200527632 U CN2011200527632 U CN 2011200527632U CN 201120052763 U CN201120052763 U CN 201120052763U CN 202075727 U CN202075727 U CN 202075727U
Authority
CN
China
Prior art keywords
stage
level
floating
point
floating point
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.)
Expired - Lifetime
Application number
CN2011200527632U
Other languages
Chinese (zh)
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.)
Anhui Core Century Technology Co Ltd
Original Assignee
CETC 38 Research Institute
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 CETC 38 Research Institute filed Critical CETC 38 Research Institute
Priority to CN2011200527632U priority Critical patent/CN202075727U/en
Application granted granted Critical
Publication of CN202075727U publication Critical patent/CN202075727U/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Images

Landscapes

  • Complex Calculations (AREA)

Abstract

The utility model discloses a processor realizing device containing transcendental function calculation, belongs to the technical field of digital signal processors and aims at providing hardware which can rapidly realize fixed point arc tangent, floating point reciprocal, floating point natural logarithm and floating point evolution calculation. In the circuit of the hardware, an accessing stage, an execution stage and a write-back stage sequentially forms a three-stage pipeline structure, wherein the accessing stage consists of an address generator and a first data register; the execution stage consists of a tab 0, a tab 1, two multiplication-addition modules and a second data register; the write-back stage consists of a bit-cutting module and a mark generating module; the accessing stage is used for generating the needed address for table lookup and registering and sending the control signal needed by the execution stage and the write-back stage, the transformed input data and the address signal to the execution stage to calculate; the execution stage is used for finishing the fixed point arc tangent, the floating point reciprocal, the floating point natural logarithm and the floating point evolution operation, and the write-back stage is used for the generation of marks and the bit-cutting output of operation results.

Description

Comprise the processor implement device that transcendental function calculates
Technical field
The utility model relates to a kind of processor implement device that transcendental function calculates that comprises, and belongs to the digital signal processor techniques field.
Background technology
At present, computing machine normally adopts software to realize to the calculating of transcendental function.Because adopt the mode of software to realize finding the solution of transcendental function, its speed is slower,, particularly can't satisfy in the digital processing field rapid solving to the transcendental function of logarithm and inverse trigonometric function and so on so can't satisfy the occasion that computing velocity is had relatively high expectations.
Summary of the invention
The purpose of this utility model is to provide a kind of can the realization fast to comprise the processor implement device that transcendental function calculates to what fixed point arc tangent, floating-point inverse, floating-point natural logarithm and floating-point evolution calculated.
Its technical scheme is: a kind of processor implement device that comprises transcendental function calculating, it is characterized in that: the peek level that described implement device is made of the address generator and first data register successively, by tab0, tab1, two take advantage of and add the execution level that module and second data register constitute, and write back the framework that level is formed three grades of flowing water by what cut position module and sign generation module constituted;
Peek level according to control signal and input data, is used for producing the required address of tabling look-up in address generator, and with execution level with write back the required control signal of level, input data after the conversion and address signal and deposit and deliver to execution level and calculate;
Execution level is used to finish the calculating of fixed point arc tangent, floating-point inverse, floating-point natural logarithm and floating-point evolution;
Write back level, generation that is used to indicate and the output of the cut position of operation result.
Its technique effect is: the utility model at first is shown as the form of fixed point or floating-point by the peek grade tables of data with reception, with its input value of calculating as the execution transcendental function; By execution level specific function is launched according to Taylor's formula then, require the extraction Taylor series partly to itemize to constitute to take advantage of according to computational accuracy and add form, and obtain part subitem value by the mode of look-up table, in 1 clock period, finish the approximation calculation of transcendental function; By writing back level middle result of calculation is revised at last, obtained net result, thereby realize quick calculating fixed point arc tangent, floating-point inverse, floating-point natural logarithm and floating-point evolution.
Description of drawings
Fig. 1 is a circuit block diagram of the present utility model.
Fig. 2 is the realization flow figure of fixed point arc tangent arctg (x).
Fig. 3 is the realization flow figure of floating-point 1/x reciprocal.
Fig. 4 is the realization flow figure of floating-point natural logarithm ln (x).
Fig. 5 is the realization flow figure of floating-point evolution sqrt (x).
Embodiment
As shown in Figure 1, a kind ofly comprise the processor implement device that transcendental function calculates, successively by peek level, execution level with write back the framework that level is formed three grades of flowing water.
The peek level is made of the address generator and first data register, according to control signal and input data, be used in address generator producing the required address of tabling look-up, and with execution level with write back the required control signal of level, input data after the conversion and address signal and deposit and deliver to execution level and calculate.
Execution level by tab0, tab1, two take advantage of and add module and second data register constitutes, be mainly used in the calculating of finishing 1/x, sqrt (x) and ln (x).Wherein, include rec_tab, rec2_tab, sqr_tab, recsqr_tab and five tables of ln_tab that are used to inquire about among the tab0.Include arctg_tab0, arctg_tab1, sqr_tab_fix and four tables of recsqr_tab_fix of being used to inquire about among the Tab1, and one is used for calculating
Figure 686502DEST_PATH_IMAGE001
Figure 287247DEST_PATH_IMAGE002
Multiplier.Can finish arctan (x) and the floating-point index is the extracting operation of odd number by Tab1.The checking result of Tab0 adds the result of calculation that can directly obtain 1/x after the module by taking advantage of.The floating-point index (not having partially) that can only obtain source operand when calculating evolution sqrt (x) is the value of even number, promptly
Figure 812907DEST_PATH_IMAGE003
, floating-point index (not having partially) is that the value of odd number needs to calculate according to checking result among the tab1, final result of calculation will pass through to select output according to the parity of index.Utilize tab0 to calculate when calculating ln (x)
Figure 157300DEST_PATH_IMAGE004
, utilize tab1 to calculate
Figure 966862DEST_PATH_IMAGE001
, final synthetic
Figure 472930DEST_PATH_IMAGE005
Write back level and constitute, be mainly used in the generation of sign and the cut position output of operation result by cut position module and sign generation module.Flag register is divided into floating-point and overflows, and fixed point is overflowed and the non-number of floating-point, can produce the two kinds of situations that mainly contain of floating-point overflow indicator: the one, and the input data are floating-point 0 when calculating the floating-point inverse; The 2nd, the input data are the infinity of floating-point when calculating the floating-point evolution.When the input source operand of floating-point operation is non-when several, will produce the non-number sign of floating-point.Have only calculating ln (0) Shi Caihui to produce the fixed point overflow indicator.The cut position module is mainly finished the correction of result of calculation, and net result is blocked into the output of 32 bit data.
It realizes fixed point arc tangent arctg (x), floating-point 1/x reciprocal, and the flow process that floating-point natural logarithm ln (x) and floating-point evolution sqrt (x) calculate is as follows:
1, finish the arctangent computation of 32 fixed-point datas: the result of calculation of arc tangent is 16 fixed-point numbers.On mathematical meaning, the utility model is realized the receptible source operand x of arctg (x), be one more than or equal to-1, the number less than 1.Resultant result, be [0,65536) interval normalize to [0,2 ∏) interval resulting numerical value, that is, if the utility model obtains a Φ as a result, the radian result on the mathematical meaning should be so Shown in being implemented as follows:
The Talor expansion of arctg (x) is ,
Order
Figure 986454DEST_PATH_IMAGE008
,
Get
Figure 476472DEST_PATH_IMAGE009
,
Figure 914407DEST_PATH_IMAGE010
,
Then arctg (| x|) can be expressed as:
arctg(|x|)=arctg(x 0+x 1)=(x 0+x 1)-(x 0+x 1) 3/3+(x 0+x 1) 5/5-(x 0+x 1) 7/7+……
=?x 0-x 0 3/3+x 0 5/5-x 0 7/7+……
+x 1(1-x 0 2+x 0 4-x 0 6+……)+x 1 2x 0(1-2x 0 2+3x 0 4-4x 0 6+……)+……
=?arctg(x 0)+x 1(1+x 0 2) -1+x 1 2x 0(1+x 0 2) -2+…… (1)
As shown in Figure 2, in address generator, at first calculate the absolute value of x | x|, promptly in the formula (1)
Figure 662920DEST_PATH_IMAGE011
Extract x 0As the entry address of look-up table, and with x 0, x 1The positive and negative sign that reaches x deposits, and next timeticks enters execution level to begin to calculate.
Only extract expansion during actual computation preceding two Just can obtain the result of calculation of 16 precision.Storage in advance in this device
Figure 983360DEST_PATH_IMAGE013
With
Figure 226034DEST_PATH_IMAGE014
Two tables, numerical value also all is accurate to behind the radix point 16 in the table.Because the angle in this device circuit is with 0~65535 expression, 0 ~ 2 ∏, so need be right
Figure 450342DEST_PATH_IMAGE013
With
Figure 839735DEST_PATH_IMAGE014
Carry out convergent-divergent, the coefficient of convergent-divergent is
Figure 124086DEST_PATH_IMAGE015
, promptly
Figure 84083DEST_PATH_IMAGE016
(2)
Figure 112082DEST_PATH_IMAGE017
(3)
(4)
Arctg_tab0 and arctg_tab1 among the inquiry execution level tab1 obtain And
Figure 711056DEST_PATH_IMAGE020
Result of calculation.Arctg_tab0 and arctg_tab1 are that the degree of depth is 256, and word is wide to be 18 question blank.Add module by taking advantage of of linking to each other with tab1 and finish calculating of formula (4)
Figure 588751DEST_PATH_IMAGE021
, and will
Figure 624840DEST_PATH_IMAGE021
Deposit with the positive and negative sign of x.
Write back positive and negative right according to source operand of cut position module in the level
Figure 250994DEST_PATH_IMAGE021
Revise, finish the calculating of arctg (x).If x be on the occasion of then
Figure 434851DEST_PATH_IMAGE022
If, x be negative value then
Figure 804652DEST_PATH_IMAGE023
Because taking advantage of the operation result that adds module is 36bit, so net result output can be removed result's low 4.The computing of arctg (x) can not produce zone bit.
2, finish the calculating of floating-point 1/x reciprocal:
Suppose
Figure 773876DEST_PATH_IMAGE024
,
Get
Figure 570931DEST_PATH_IMAGE025
,
Figure 179767DEST_PATH_IMAGE026
,
Then
Figure 149997DEST_PATH_IMAGE027
Figure 160678DEST_PATH_IMAGE028
Figure 440219DEST_PATH_IMAGE029
(5)
As shown in Figure 3, in address generator, at first extract the x of mantissa of floating-point x 0+ x 1With no inclined to one side exponent e xp.X wherein 0As the entry address of look-up table, x 0, x 1, no inclined to one side exponent e xp and x positive and negative sign deposited, next timeticks enters execution level to begin to calculate.
Need obtain the result of 16 precision, execution level only need calculate
Figure 536351DEST_PATH_IMAGE030
Store in this device
Figure 247955DEST_PATH_IMAGE031
With
Figure 441039DEST_PATH_IMAGE032
Two tables, the result remains into 16 precision, and final result of calculation can be expressed as:
Figure 579896DEST_PATH_IMAGE033
(6)
Rec_tab and rec2_tab among the inquiry execution level tab0 obtain
Figure 710794DEST_PATH_IMAGE034
With
Figure 226089DEST_PATH_IMAGE035
Rec_tab and rec2_tab are that the degree of depth is 256, and word is wide to be 18 question blank.Adding module by taking advantage of of linking to each other with tab0 finishes
Figure 211363DEST_PATH_IMAGE036
Calculating, and with the positive and negative sign of this result of calculation, x and do not have inclined to one side exponent e xp and deposit.
Because
Figure 583438DEST_PATH_IMAGE036
It need be moved to left after one could be as the floating-point coefficient of 1/x more than or equal to 0.5 less than 1 value to be one, and the no inclined to one side index of adjusting result of calculation is Export behind the normalization operations result.These the operation all write back the level finish.
The utility model can be as accurate as behind the radix point the 16th to the mantissa of floating-point 1/x result of calculation reciprocal.
3, finish the calculating of floating-point natural logarithm ln (x): primary operand x need be more than or equal to 0.Result of calculation is exported according to 16 fixed point modes.In the implement device, the result of ln (x) output also is subjected to the control of 4 control signal cutnum.If
Figure 753574DEST_PATH_IMAGE038
Then export the integral part of result of calculation, The integral part of then exporting result of calculation adds a decimal,
Figure 74014DEST_PATH_IMAGE040
The integral part of then exporting result of calculation adds two-decimal, by that analogy.
Order
Figure 694351DEST_PATH_IMAGE041
,
Get
Figure 285870DEST_PATH_IMAGE025
,
Figure 58785DEST_PATH_IMAGE026
,
Then
Figure 710346DEST_PATH_IMAGE042
(7)
Because x 1/ x 0Less than 1, so ln (1+x 1/ x 0) can use Taylor's formula to launch.
Figure 490083DEST_PATH_IMAGE043
(8)
As shown in Figure 4, floating-point 1/x is identical with calculating, and in address generator, at first extracts the mantissa of floating-point natural logarithm x
Figure 947609DEST_PATH_IMAGE011
With no inclined to one side exponent e xp.X wherein 0Will be as the entry address of look-up table, x 0, x 1, no inclined to one side exponent e xp and output control cutnum deposited, next timeticks enters execution level to begin to calculate.
Participate in the result of calculation that calculating just can obtain 16 precision for first that gets Taylor expansion, promptly
Figure 761981DEST_PATH_IMAGE044
There is the table of natural logarithm that a precision reaches 16 in this device
Figure 890169DEST_PATH_IMAGE045
, and a precision reaches 16 reciprocal table
Figure 157202DEST_PATH_IMAGE031
, then final result of calculation can be expressed as:
Figure 356102DEST_PATH_IMAGE046
(9)
Rec_tab and ln_tab among the inquiry execution level tab0 obtain
Figure 87298DEST_PATH_IMAGE034
With
Figure 80662DEST_PATH_IMAGE047
Ln_tab also is that the degree of depth is 256, and word is wide to be 18 question blank.Adding module by taking advantage of of linking to each other with tab0 finishes
Figure 648041DEST_PATH_IMAGE048
Calculating, meanwhile utilize the 18bit multiplier among the tab1 to calculate
Figure 650632DEST_PATH_IMAGE049
The cut position output module that writes back level is finished calculating
Figure 174017DEST_PATH_IMAGE050
According to output control signal cutnum, add decimal, an integer according to whole integers, integer and add two-decimal and integer and add a kind of output result in four kinds of modes of three decimals.
4, finish the calculating of floating-point evolution sqrt (x): primary operand x need be more than or equal to 0;
Suppose
Figure 400599DEST_PATH_IMAGE041
,
Get
Figure 642224DEST_PATH_IMAGE025
,
Figure 494512DEST_PATH_IMAGE026
Figure 872403DEST_PATH_IMAGE051
(10)
Will
Figure 473149DEST_PATH_IMAGE052
Taylor expansion gets:
Figure 998808DEST_PATH_IMAGE053
(11)
Participate in computing for preceding two that get expansion
Figure 343202DEST_PATH_IMAGE054
(12)
The index of floating-point extracting operation time-division floating-point is two kinds of situations of odd and even number:
When index is even number: (13)
When index is odd number:
Figure 160296DEST_PATH_IMAGE056
(14)
As shown in Figure 5, the floating-point evolution also is the mantissa that at first extracts floating-point x in the peek level
Figure 110935DEST_PATH_IMAGE011
With no inclined to one side exponent e xp.X wherein 0Entry address as look-up table.
Among the execution level tab0
Figure 55757DEST_PATH_IMAGE057
,
Figure 408241DEST_PATH_IMAGE058
Among the tab1
Figure 662374DEST_PATH_IMAGE059
,
Figure 100308DEST_PATH_IMAGE060
Sqr_tab, recsqr_tab and sqr_tab_fix, recsqr_tab_fix precision are 16.The execution level hardware circuit calculates by tab0 question blank sqr_tab and recsqr_tab
Figure 786505DEST_PATH_IMAGE061
, and calculate by tab1 question blank sqr_tab_fix and recsqr_tab_fix simultaneously
Figure 55812DEST_PATH_IMAGE062
The parity that writing back level does not have an inclined to one side index according to x is selected one of them result's output: if x does not have inclined to one side index when being even number, write back level and select
Figure 169261DEST_PATH_IMAGE063
Export as net result; If it is odd number that x does not have inclined to one side index, if Less than 1, write back level and then export the result , otherwise the output result
Figure 458925DEST_PATH_IMAGE066
, meet the call format of single-precision floating point to guarantee final calculation result.

Claims (1)

1. comprise the processor implement device that transcendental function calculates, it is characterized in that: described implement device is successively by peek level, execution level with write back the framework that level is formed three grades of flowing water;
The peek level is made of the address generator and first data register, according to control signal and input data, be used in address generator producing the required address of tabling look-up, and with execution level with write back the required control signal of level, input data after the conversion and address signal and deposit and deliver to execution level and calculate;
Execution level is taken advantage of by two of tab0, tab1 and is added module and second data register constitutes, and is used to finish the calculating of fixed point arc tangent, floating-point inverse, floating-point natural logarithm and floating-point evolution;
Write back level and constitute, generation that is used to indicate and the output of the cut position of operation result by cut position module and sign generation module.
CN2011200527632U 2011-03-02 2011-03-02 Processor realizing device containing transcendental function calculation Expired - Lifetime CN202075727U (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2011200527632U CN202075727U (en) 2011-03-02 2011-03-02 Processor realizing device containing transcendental function calculation

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2011200527632U CN202075727U (en) 2011-03-02 2011-03-02 Processor realizing device containing transcendental function calculation

Publications (1)

Publication Number Publication Date
CN202075727U true CN202075727U (en) 2011-12-14

Family

ID=45113821

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2011200527632U Expired - Lifetime CN202075727U (en) 2011-03-02 2011-03-02 Processor realizing device containing transcendental function calculation

Country Status (1)

Country Link
CN (1) CN202075727U (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI776090B (en) * 2018-12-17 2022-09-01 南韓商三星電子股份有限公司 Computer-readable storage medium, computer-implemented method and compute logic section

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI776090B (en) * 2018-12-17 2022-09-01 南韓商三星電子股份有限公司 Computer-readable storage medium, computer-implemented method and compute logic section

Similar Documents

Publication Publication Date Title
CN109643228B (en) Low energy mantissa multiplication for floating point multiply-add operations
CN102722352B (en) Booth multiplier
CN102629189A (en) Water floating point multiply-accumulate method based on FPGA
US20140067889A1 (en) Datapath circuit for digital signal processors
CN103809930B (en) Design method of double-precision floating-point divider and divider
CN101630243B (en) Transcendental function device and method for realizing transcendental function utilizing same
CN106990937A (en) A kind of floating number processing unit
CN106951211B (en) A kind of restructural fixed and floating general purpose multipliers
CN107273090A (en) Towards the approximate floating-point multiplier and floating number multiplication of neural network processor
CN109146067B (en) Policy convolution neural network accelerator based on FPGA
CN108287681A (en) A kind of single-precision floating point fusion point multiplication operation unit
CN106155627B (en) Low overhead iteration trigonometric device based on T_CORDIC algorithm
CN101685383A (en) Calculator and direct match-exponent based operational circuit of free-precision floating point
CN105335127A (en) Scalar operation unit structure supporting floating-point division method in GPDSP
CN104679720A (en) Operation method for FFT
CN103135960A (en) Design method of integrated floating point unit based on FPGA (field programmable gate array)
CN102109973A (en) Processor implementation device including transcendental function calculation
CN104679719A (en) Floating point calculation method based on FPGA
CN104133656A (en) Floating point number divider adopting shift and subtraction operation by tail codes and floating point number division operation method adopting shift and subtraction operation by tail codes
CN104991757A (en) Floating point processing method and floating point processor
CN202075727U (en) Processor realizing device containing transcendental function calculation
CN104714773B (en) The soft core of the embedded IP based on PLB buses and anglec of rotation computational methods calculated for the anglec of rotation
CN110187866A (en) A kind of logarithmic multiplication computing system and method based on hyperbolic CORDIC
CN111984226B (en) Cube root solving device and solving method based on hyperbolic CORDIC
CN107423026A (en) The implementation method and device that a kind of sin cos functionses calculate

Legal Events

Date Code Title Description
C14 Grant of patent or utility model
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20191011

Address after: 5 / F, airborne center, 38 new area, No. 199, Xiangzhang Avenue, hi tech Zone, Hefei City, Anhui Province 230000

Patentee after: Anhui core Century Technology Co., Ltd.

Address before: 230088, 199, camphor Road, hi tech Zone, Anhui, Hefei

Patentee before: No.38 Inst., China Electronic Sci. & Tech. Group Co.

TR01 Transfer of patent right
CX01 Expiry of patent term

Granted publication date: 20111214

CX01 Expiry of patent term