CN100489766C - Device and method for high order root extraction suitable for hardware - Google Patents

Device and method for high order root extraction suitable for hardware Download PDF

Info

Publication number
CN100489766C
CN100489766C CNB2007101197676A CN200710119767A CN100489766C CN 100489766 C CN100489766 C CN 100489766C CN B2007101197676 A CNB2007101197676 A CN B2007101197676A CN 200710119767 A CN200710119767 A CN 200710119767A CN 100489766 C CN100489766 C CN 100489766C
Authority
CN
China
Prior art keywords
register
data
input
try
circuit
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 - Fee Related
Application number
CNB2007101197676A
Other languages
Chinese (zh)
Other versions
CN101105741A (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.)
Beihang University
Original Assignee
Beihang 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 Beihang University filed Critical Beihang University
Priority to CNB2007101197676A priority Critical patent/CN100489766C/en
Publication of CN101105741A publication Critical patent/CN101105741A/en
Application granted granted Critical
Publication of CN100489766C publication Critical patent/CN100489766C/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Complex Calculations (AREA)

Abstract

The invention discloses a device and a method, which is highly efficient in higher power extraction suitable for hardware, and is a technology to practically extract root through method of logical operational circuit or search table or the combination thereof. The technology takes advantages in reducing hardware circuit signal delay and compromising circuit delay and consumption of circuit resource. Operational time predicting and hardware consumption have been achieved. Extraction of random power to different data has been realized. The search table takes far less hardware resource than traditional search table. Therefore, the device has achieved good result in getting fast operational speed while taking small memory.

Description

A kind of device and method that is suitable for the extraction of higher root of hardware
Technical field
The invention belongs to the Digital Electronic Technique field, relate to a kind of hardware unit and method, be specifically related to a kind of device and method of hardware extraction of higher root.
Background technology
Realize on the hardware circuit that extracting operation is pretty troublesome, following certain methods is arranged now more: look-up table, promptly, expend a large amount of storage spaces radicand and table of row as a result, radicand is big more, and used table is also big more, and the speed of tabling look-up is also slow more.The cyclic search method is promptly sought since 0 search, progressively approaches the evolution result.It is not high to do precision like this, and radicand is big more, and cycle index is many more, and elapsed time is many more, can not estimate computing time.The Newton-Raphson algorithm will choose the initial value of iteration, and the Newton iteration of high order nonlinear equation is understood in its concrete grammar utilization, and the same with the cyclic search method, also can not estimate computing time.Above-mentioned several method all has certain difficulty when being generalized to extraction of higher root, it is not high all to exist reusability, expends time in or the shortcoming of storage space.
Summary of the invention
The invention provides hardware circuit device and the computing method of the opening any power that are suitable for hardware, adopted logical operation circuit (data selector) or look-up table or the two, carry out the technology of actual numerical value computing evolution in conjunction with the mode of getting.This technology has the advantage that reduces hardware circuit signal delay, compromised circuit delay and circuit resource consumption.Obtain measurable operation time, reduced the effect of hardware consumption.
Hardware computing circuit device and method among the present invention can realize different pieces of information is carried out the extracting operation of any power.And when using look-up table, the hardware store resource that this look-up table is shared, be far smaller than the shared hardware store resource of look-up table in traditional look-up table, so this device is obtaining and has obtained effect preferably above the very fast arithmetic speed with consuming very little storage space.
A kind of method that is suitable for the extraction of higher root of hardware is characterized in that, this method comprises following several steps:
Step 1: data input initialization: radicand is input among the register Reg of circuit.Register Reg is n * k bit altogether, and k is stored among the counter Counter, and k is the register total length and the ratio of the frequency n value of evolution.Initialization is provided with register x Forward, s Try, multiple, x Lsb, x NewWith sub be zero.Wherein, register x ForwardBe used to store the current evolution result who has calculated, register s TryBe used to store tested merchant's numerical value, register multiple is used for storage examination merchant process and passes through x ForwardThe tested quotient that calculates, register sub are used to store the input data of subtracter Substrator, register x LsbBe used to store current evolution data that calculate, register x NewBe used to store Data Update evolution result later.With n the highest among register Reg bit Reg[(n * k-1): (n * k-n)], promptly the of Reg ((n * k-n) data of position are input to register s to the position of n * k-1) to the TryIn.
Step 2: pass through x ForwardObtain multiple, realize with three kinds of methods:
The first, with x ForwardBe input to data selector SelectorA, be output as multiple, data selector is equivalent to a logical circuit, the calculating of finishing, shown in the following formula:
multiple = C n n - 1 · 2 n - 1 · x forward n - 1 + . . . + C n n - i · 2 n - i · x forward n - i + . . + 1
This logical circuit is to be combined by some multipliers and totalizer, wherein the input value of multiplier Calculated and solidified in the register of circuit.
The second, adopt look-up table, this look-up table LUT1 has been cured among the ROM in advance, x ForwardAddress wire input as LUT1 is output as multiple.Among the look-up table LUT1, with x ForwardAs the address, and with different x in the following formula ForwardThe multiple that calculates as the content of corresponding address.
The 3rd, the mode of employing look-up table and logical circuit computing combination is with x ForwardAddress wire input as look-up table LUT2 is output as x ForwardThe numerical value of i power, i is a positive integer, 2≤i≤n, n represent the evolution number of times.LUT2 has been cured in the middle of the ROM in advance, brings the output of LUT2 into formula then multiple = C n n - 1 · 2 n - 1 · x forward n - 1 + . . . + C n n - i · 2 n - i · x forward n - i + . . + 1 , Remaining used addition of calculating and multiplication are realized by general totalizer and multiplier, are drawn the value of multiple.
Step 3: with s TryWith multiple input data comparator Compare, if s TryBe greater than or equal to multiple, then Compare output x LsbBe 1, otherwise be 0.Counter k subtracts one.
Step 4: with x LsbBe input to register x NewLowest order in, x NewRemaining bit is by x ForwardFill, that is:
x new=x forward<<1+x lsb
Realize with multiplier and totalizer, with x LsbIf input data selector SelectorB is x LsbBe 1, then the numerical value with register multiple is input among the register sub, otherwise the value that register sub is set is 0.
Step 5: with s TryBe input among the subtracter Subtracter with sub, promptly use s TryDeduct sub, the result data of subtraction is placed on register S SubIn the middle of.
Step 6: with Reg[(n among the register Reg * k-1): (n * k-n)] this n Bit data is input to register S NewLow n bit in, S NewRemaining bit is by S SubFill, available multiplier and totalizer realization, that is:
S new=S sub<<n+Reg[(n×k-1):(n×k-n)]
Step 7: if counter k is not equal to 0, then with S NewIn data input to s Try, with x NewInput to x Forward, and get back to step 2, otherwise the output data result.By the setting of k in the step 1, can calculate the result of different accuracy.
Data comparator Compare adopts the output terminal of conventional data comparer to add a simple adjunct circuit in the described step 3, and this data comparator Compare makes s TryCan compare with multiple, work as s TryComparer is output as 1 in the time of more than or equal to multiple, otherwise is output as 0, and the logical expression of adjunct circuit is as follows:
Figure C200710119767D00071
Wherein
Figure C200710119767D00072
Expression Y (A<B)Negate.
A kind ofly be applied to described a kind of device that is suitable for the extraction of higher root method of hardware, comprise counter module, it is characterized in that, also comprise: examination is discussed and is calculated module and data update module; The calculation module is discussed in examination, for input s TryAnd x Forward, and in cyclic process each time, calculate the one digit number value of n root of radicand; Data update module upgrades the computational data that examination is discussed to be needed in the calculation module, comprises s TryAnd x ForwardCounter module judges whether to stop circulation, output result of calculation.
The register s that calculates module is discussed in described examination TryWith register x ForwardIn data obtain the register s of multiple, two input data after handling through examination merchant respectively TryData comparator gained fiducial value x with multiple LsbWith register s TryThe signal value of itself; These three signals are input to data update module, obtain upgrading evolution result later after handling through renewal and be stored into register x NewWith register S NewIn; Data update module is by the parameter k control that is input in the counter module, and when the k value was non-vanishing, the k value subtracted one, is zero until the k value, update module output evolution result.
The calculation module is discussed in described examination, comprise the combination of a data computing circuit (data selector SelectorA) or LUT1 or data operation circuit and LUT2, a data comparator C ompare, and the input data register x of data selector SelectorA Forward, x ForwardProcess data selector SelectorA or LUT1 or data operation circuit and LUT2 obtain tested merchant's signal storage in register multiple after handling; The register s of two input data of data comparator TryAnd multiple, relatively income value is current evolution data that calculate, and is stored in register x LsbIn; The data update module branch is clipped to register multiple, x LsbAnd s TryGet corresponding signal value.
Described data update module comprises a subtracter Subtracter, the register sub and the s of two input data of data selector SelectorB, refresh circuit A and refresh circuit B and this subtracter Try, with output data register S SubS SubDisplacement obtains upgrading signal later and depositing data register S in middle signal through refresh circuit A New, x LsbSignal after middle signal process refresh circuit B displacement obtains upgrading also deposits evolution result register x in Bew, refresh circuit A and refresh circuit B are by the signal k control of counter module; With x LsbIf input data selector SelectorB is x LsbBe 1, then the numerical value with register multiple is input among the register sub, otherwise the value that register sub is set is 0.If signal k is not 0, then with register S NewIn data input to register s Try, with register x NewInput to register x Forward, discuss the calculation module invokes for examination; Otherwise output result data.
The invention has the advantages that:
(1) discusses in the calculation module method of application circuit logical operation and look-up table combination in the examination of this device.Because the look-up table that is adopted is all identical for different evolution number of times, can obtain the result who well reuses, and has saved storage space; Adopt the logical operation of circuit, make the time measurable, guaranteed the speed of handling, saved operation time.
(2) the present invention has taken into account time and two factors of hardware resource in the hardware evolution calculates, a compromise can got aspect time and the space two, so just under the not really abundant environment of or hardware resource less demanding, fully use, reduced cost computing time.
(3) hardware unit provided by the invention can be realized the extracting operation of arbitrary number of times on circuit, and is issued to degree of precision and speed in the prerequisite that takies less storage space.
Description of drawings
Fig. 1 is a kind of method flow diagram that is suitable for the extraction of higher root of hardware of the present invention;
Fig. 2 is the circuit theory diagrams that a kind of device that is suitable for the extraction of higher root of hardware of the present invention tries data comparator in the quotient module piece;
X in the device data update module of the extraction of higher root that Fig. 3 is suitable for hardware for the present invention is a kind of NewThe counting circuit schematic diagram;
S in the device data update module of the extraction of higher root that Fig. 4 is suitable for hardware for the present invention is a kind of NewThe counting circuit schematic diagram;
Fig. 5 is suitable for the device examination of the extraction of higher root of hardware and discusses calculation modular structure figure for the present invention is a kind of;
Fig. 6 is a kind of device data update module structural drawing that is suitable for the extraction of higher root of hardware of the present invention;
Fig. 7 is a kind of each modular structure figure of device that is suitable for the extraction of higher root of hardware of the present invention;
Fig. 8 is suitable for the device extraction of square root examination of the extraction of higher root of hardware and discusses multiple computing realization circuit in the calculation module for the present invention is a kind of;
Fig. 9 opens the cube examination for a kind of device that is suitable for the extraction of higher root of hardware of the present invention and discusses the calculation module, is solidificated in the LUT1 among the ROM;
Figure 10 opens the biquadratic examination for a kind of device that is suitable for the extraction of higher root of hardware of the present invention and discusses the calculation module, is solidificated in the LUT2 among the ROM;
Figure 11 opens the biquadratic examination for a kind of device that is suitable for the extraction of higher root of hardware of the present invention and discusses the calculation module, by the circuit theory diagrams of LUT2 numerical evaluation multiple.
Embodiment
The present invention is described in further detail below in conjunction with drawings and Examples.
A kind of method that is suitable for the extraction of higher root of hardware, this method comprises following several steps, process flow diagram as shown in Figure 1:
(1) data input initialization: radicand is input among the register Reg of circuit.Register Reg is n * k bit altogether, and with k=k z+ k pStore among the counter Counter, wherein k represents cycle index, k zThe expression evolution is the figure place of integral part as a result, k pThe expression evolution is the figure place of fraction part as a result.If only need draw the whole-number result of evolution, then need with register Reg the 0th of the lowest order of radicand alignd, high-order deficiency then is 0, otherwise with the lowest order of radicand and the n * k of register Reg pThe position alignment, n represents the number of times of evolution, the n * k of low level pIndividual bit is filled with 0.The initial value k of Counter is the register total length and the ratio of n value.Initialization is provided with register x Forward, s Try, multiple, x Lsb, x NewWith sub be zero.Wherein, register x ForwardBe used to store the current evolution result who has calculated, register s TryBe used to store tested merchant's numerical value, register multiple is used for storage examination merchant process and passes through x ForwardThe tested quotient that calculates, register sub are used to store the input data of subtracter Substrator, register x LsbBe used to store current evolution data that calculate, register x NewBe used to store Data Update evolution result later.With n the highest among register Reg bit Reg[(n * k-1): (n * k-n)] data be input to register s TryIn.
(2) pass through x ForwardObtain multiple, can realize with three kinds of methods:
The first, with x ForwardBe input to data selector SelectorA, be output as multiple, data selector is equivalent to a logical circuit, the calculating of finishing, shown in the following formula:
multiple = C n n - 1 &CenterDot; 2 n - 1 &CenterDot; x forward n - 1 + . . . + C n n - i &CenterDot; 2 n - i &CenterDot; x forward n - i + . . + 1 - - - ( 1 )
This logical circuit is to be combined by some multipliers and totalizer, wherein the input value of multiplier
Figure C200710119767D00092
Calculated and solidified in the register of circuit.
The second, adopt look-up table, this look-up table LUT1 has been cured among the ROM in advance, x ForwardAddress wire input as LUT1 is output as multiple.Among the look-up table LUT1, with x ForwardAs the address, and with different x in (1) formula ForwardThe multiple that calculates as the content of corresponding address.
The 3rd, the mode of employing look-up table and logical circuit computing combination, specific practice is, with x ForwardAddress wire input as look-up table LUT2 is output as x ForwardThe numerical value of i power (i is a positive integer, 2≤i≤n).Same, LUT2 is cured in the middle of the ROM in advance.Result with LUT2 inputs to computing circuit then, calculates the value of multiple, balance circuit time cost and take storage space.
(3) with s TryWith multiple input data comparator Compare, if s TryBe greater than or equal to multiple, then Compare output x LsbBe 1, otherwise be 0.Counter k subtracts one.
Described data comparator Compare adopts the output terminal of conventional data comparer to add a ball bearing made using and gets final product, general on the market data comparator, and the magnitude relationship of two number A and B has greater than (Y A〉B), equal (Y A=B) and less than (Y A<B) three kinds of results.This data comparator Compare makes s TryCan compare with multiple, when and s TryComparer is output as 1 in the time of more than or equal to multiple, otherwise is output as 0, and the logical expression of adjunct circuit is as follows:
Figure C200710119767D00101
Wherein
Figure C200710119767D00102
Expression Y (A<B)Negate.Logical circuitry as shown in Figure 2.
(4) with x LsbBe input to register x NewLowest order in, x NewRemaining bit is by x ForwardFill, that is:
x new=x forward<<1+x lsb (3)
Can realize with the multiplier totalizer on the specific implementation, also circuit can be deteriorated to several connecting lines, the bit of input and output correspondence is coupled together.Simultaneously, with x LsbIf input data selector SelectorB is x Lsb Be 1, then the numerical value with register multiple is input among the register sub, otherwise the value that register sub is set is 0.Logical circuit as shown in Figure 3.
(5) with s TryBe input among the subtracter Subtracter with sub, promptly use s TryDeduct sub, the result data of subtraction is placed on S in the register SubIn the middle of.
(6) with Reg[(n among the register Reg * k-1): (n * k-n)] this n Bit data is input to register S NewLow n bit in, S NewRemaining bit is by S SubFill, that is:
S new=S sub<<n+Reg[(n×k-1):(n×k-n)](4)
Reg[(n * k-1) wherein: (n * k-n)] expression Reg the (position of n * k-1) is (position of n * k-n) to the.Can realize with the multiplier totalizer on the specific implementation, also circuit can be deteriorated to several connecting lines, the bit of input and output correspondence is coupled together.Logical circuitry as shown in Figure 4.
(7) if counter k is not equal to 0, then with S NewIn data input to s Try, with x NewInput to x Forward, and get back to step 2, otherwise output data.By k in (1) pSetting, can calculate the result of different accuracy.
Can realize with the multiplier totalizer on described (4) and step (6) specific implementation, also circuit can be deteriorated to several connecting lines, the bit of input and output correspondence is coupled together.
A kind ofly be applied to described a kind of device that is suitable for the extraction of higher root method of hardware, this device comprises with lower module: the calculation module is discussed in examination, imports x for the user Lsb, s TryAnd multiple, for cycle calculations each time goes out the one digit number value of n root of radicand; Data update module for upgrading the computational data that examination is discussed to be needed in the calculation module, comprises s TryAnd x ForwardCounter module judges whether to stop circulation, output result of calculation.
The calculation module is discussed in described examination, comprises the combination of a data computing circuit (data selector SelectorA) or LUT1 or data operation circuit and LUT2, a data comparator C ompare, and the input data register x of data selector Forward, multiple is the output of data selector Selector, the register s of two input data of data comparator TryAnd multiple, relatively income value is x Lsb, system chart as shown in Figure 5.
Described data update module comprises a subtracter Subtracter, and the register sub and the s of two input data of this subtracter Try, with output data register S SubS SubMiddle signal obtains upgrading signal later and depositing data register S in through refresh circuit A displacement shown in Figure 4 excessively New, x LsbSignal after middle signal obtains upgrading through refresh circuit B displacement shown in Figure 3 also deposits evolution result register x in New, refresh circuit A and refresh circuit B are by the signal k control of counter module; x LsbObtain signal storage in register sub through data selector SelectorB, system chart as shown in Figure 6.
Described counter module comprises a counter Counter.Its initial value k is a register Reg total length and the ratio of n value, as shown in step (1).
The comprehensive block diagram of total system as shown in Figure 7.
Examination is discussed in the calculation module, passes through x ForwardObtain multiple, adopt three kinds of different modes to realize.Wherein LUT1 that is adopted and LUT2 will be cured in the middle of the ROM in advance:
To first method, realize examination merchant's process with pure logical circuit, do not need to use ROM, totalizer of using in the logical circuit and multiplier are general totalizer multiplier.
To second method, replace combinational logic circuit fully with LUT1, LUT1 is cured in the middle of the ROM in advance, and the Input Address line is x Forward, be output as x ForwardThe multiple that substitution (1) formula is calculated.
To the third method, with the method for LUT2 and combinational logic circuit combination, LUT2 is cured in the middle of the ROM in advance, and the Input Address line is x Forward, be output as x ForwardI power (i is the positive integer between 2 to n, and n represents the evolution number of times).The result of output is brought in (1) formula, and remaining used addition of calculating and multiplication are realized by general totalizer and multiplier.Core concept is to replace complicated power logical operation with searching LUT2.
In the data update module, register S SubExpression calculates after the evolution result of a bit s TryWith the difference of sub, as follows:
S sub=S try-Sub (5)
After finishing this step, need logical operation by (4) formula, the renewal process of whole tested quotient is just finished fully.Because the radicand of every n bit can calculate an evolution result, so try the data that the renewal of quotient data need replenish n bit of radicand each time.
Same, after calculating a result, needing to upgrade the result, renewal process is as the formula (3).Register in the formula of above-mentioned (3)~(5) may be degenerated to the circuit signal line in side circuit.
Embodiment 1:
This embodiment is with extraction of square root, and promptly n=2 is an example, and discusses the mode that adopts logical circuit (data selector) in the calculation module in examination, and application of the present invention is described
When discussing the specific implementation of calculating data selector in the module, owing to n=2 this moment, then by (1) Shi Kede with examination:
multiple=4·x forward+1 (6)
Corresponding logical operation circuit (data selector) mainly is because at this moment as shown in Figure 8, multiple and x ForwardRelation is simple between the signal, 4x ForwardBe equivalent to x ForwardBe moved to the left two.
Secondly the specific implementation method of calculating data comparator in the module is discussed in the narration examination.General on the market data comparator, the magnitude relationship of two number A and B has greater than (Y A〉B), equal (Y A=B) and less than (Y A<B) three kinds of results, among the present invention used data comparator only need obtain more than or equal to less than two kinds of results, therefore add a ball bearing made using and get final product at the output terminal of conventional data comparer, make s TryCan compare with multiple, when and s TryComparer is output as 1 in the time of more than or equal to multiple, otherwise is output as 0, and the logical expression of adjunct circuit is shown in (2).
Secondly, in the middle of data update module, used subtracter Substractor can adopt general subtracter, and S NewAnd x NewCounting circuit and the counting circuit of front multiple similar.Respectively as shown in Figure 3 and Figure 4.
At last, the counter in the counter module is general down counter, and initial value is a positive integer k, has determined the precision of calculating.
Embodiment 2:
This embodiment is to open cube, and promptly n=3 is an example, and discusses the mode of calculating employing look-up table LUT in the module in examination, and the application that we are bright is described.
At first, the formation of whole device and extraction of square root have only place's difference, and examination is discussed the specific implementation method of calculating multiple in the module of calculating, this time exactly:
multiple = 12 &CenterDot; x forward 2 + 6 &CenterDot; x forward + 1 - - - ( 7 )
Because this moment, this counting circuit more complicated can adopt the method for look-up table to replace actual computing circuit.The look-up table in this time is input as x Forward, be output as multiple.Whole LUT1 is cured in the middle of the ROM in advance, and Fig. 9 has illustrated x ForwardWhen being 6 Bit datas, complete look-up table.Use this look-up table and can open the cube computing the data of one 18 bit.
Remainder is identical with the extraction of square root example.
Embodiment 3:
This embodiment is to open biquadratic, and promptly n=4 is an example, and discusses the mode that adopts logical operation circuit and look-up table LUT2 combination in the calculation module in examination, and application of the present invention is described.
Open quadruplicate the time:
multiple = 32 &CenterDot; x forward 3 + 24 &CenterDot; x forward 2 + 8 &CenterDot; x forward + 1 - - - ( 8 )
The data that be solidificated among the ROM this moment are
Figure C200710119767D00133
Numerical value, the Input Address line of ROM is x Forward, and output comprises above-mentioned two values.Therefore this moment, data can be cured among two different ROM, but the two has identical address wire, i.e. x ForwardSignal.Figure 10 has illustrated x ForwardWhen being 6 bits, corresponding
Figure C200710119767D00134
With
Figure C200710119767D00135
Numerical value, these numerical value constitute complete LUT2, and are solidificated among the ROM.
When importing x by address wire Forward, from ROM, read
Figure C200710119767D00136
With
Figure C200710119767D00137
Value, the applied logic computing circuit is finished the function of (8) formula, totalizer of wherein using and multiplier are general totalizer multiplier, the structure as shown in figure 11.
Remainder is identical with the extraction of square root example.

Claims (5)

1, a kind of method that is suitable for the extraction of higher root of hardware is characterized in that, this method comprises following several steps:
Step 1: data input initialization: radicand is input among the register Reg of circuit; Register Reg is n * k bit altogether, and k is stored among the counter Counter, and k is the register total length and the ratio of evolution frequency n value; Register x is set during initialization Forward, s Try, multiple, x Lsb, x NewWith sub be zero; Wherein, register x ForwardBe used to store the current evolution result who has calculated, register s TryBe used to store tested merchant's numerical value, register multiple is used for storage examination merchant process and passes through x ForwardThe tested quotient that calculates, register sub are used to store the input data of subtracter Substrator, register x LsbBe used to store current evolution data that calculate, register x NewBe used to store Data Update evolution result later; With n the highest among register Reg bit Reg[(n * k-1): (n * k-n)], promptly the of Reg ((n * k-n) data of position are input to register s to the position of n * k-1) to the TryIn;
Step 2: pass through x ForwardObtain multiple;
Specifically realize by following three kinds of methods:
The first, with x ForwardBe input to data selector SelectorA, be output as multiple, data selector is equivalent to a logical circuit, the calculating of finishing, shown in the following formula:
multiple = C n n - 1 &CenterDot; 2 n - 1 &CenterDot; x forward n - 1 + . . . + C n n - i &CenterDot; 2 n - i &CenterDot; x forward n - i + . . . + 1
This logical circuit is to be combined by some multipliers and totalizer, wherein the input value of multiplier
Figure C200710119767C0002143435QIETU
Calculated and solidified in the register of circuit;
The second, adopt look-up table, this look-up table LUT1 has been cured among the ROM in advance, x ForwardAddress wire input as LUT1 is output as multiple; Among the look-up table LUT1, with x ForwardAs the address, and with different x in the following formula ForwardThe multiple that calculates as the content of corresponding address;
The 3rd, the mode of employing look-up table and logical circuit computing combination is with x ForwardAddress wire input as look-up table LUT2 is output as x ForwardThe numerical value of i power, i is a positive integer, 2≤i≤n, n represent the evolution number of times; LUT2 has been cured in the middle of the ROM in advance, brings the output of LUT2 into formula then multiple = C n n - 1 &CenterDot; 2 n - 1 &CenterDot; x forward n - 1 + . . . + C n n - i &CenterDot; 2 n - i &CenterDot; x forward n - i + . . . + 1 , Remaining used addition of calculating and multiplication are realized by general totalizer and multiplier, are drawn the value of multiple;
Step 3: with s TryWith multiple input data comparator Compare, if s TryBe greater than or equal to multiple, then Compare output x LsbBe 1, otherwise be 0; Counter k subtracts one;
Step 4: with x LsbBe input to register x NewLowest order in, x NewRemaining bit is by x ForwardFill, that is:
x new=x forward<<1+x lsb
Realize with multiplier and totalizer during specific implementation, with x LsbIf input data selector SelectorB is x LsbBe 1, then the numerical value with register multiple is input among the register sub, otherwise the value that register sub is set is 0;
Step 5: with s TryBe input among the subtracter Subtracter with sub, promptly use s TryDeduct sub, the result data of subtraction is placed on register S SubIn the middle of;
Step 6: with Reg[(n among the register Reg * k-1): (n * k-n)] this n Bit data is input to register S NewLow n bit in, S NewRemaining bit is by S SubFill, available multiplier and totalizer realization, that is:
S new=S sub<<n+Reg[(n×k-1):(n×k-n)]
Step 7: if counter k is not equal to 0, then with S NewIn data input to s Try, with x NewInput to x Forward, and get back to step 2, otherwise the output data result; By the setting of k in the step 1, can calculate the result of different accuracy.
2, according to the described a kind of method that is suitable for the extraction of higher root of hardware of claim 1, it is characterized in that: data comparator Compare adopts the output terminal of conventional data comparer to add a simple adjunct circuit in the described step 3, and this data comparator Compare makes s TryCan compare with multiple; Work as s TryComparer is output as 1 in the time of more than or equal to multiple, otherwise is output as 0, and the logical expression of adjunct circuit is as follows:
Figure C200710119767C00031
Wherein
Figure C200710119767C00032
Expression Y (A<B)Negate.
3, a kind of device that is applied to the method for the described a kind of extraction of higher root that is suitable for hardware of claim 1 comprises counter module, it is characterized in that, also comprises: examination is discussed and is calculated module and data update module; The calculation module is discussed in examination, for input s TryAnd x Forward, and in cyclic process each time, calculate the one digit number value of n root of radicand; Data update module upgrades the computational data that examination is discussed to be needed in the calculation module, comprises s TryAnd x ForwardCounter module judges whether to stop circulation, output result of calculation;
The register s that calculates module is discussed in described examination TryWith register x ForwardIn data obtain the register s of multiple, two input data after handling through examination merchant respectively TryWith multiple process data comparator gained fiducial value x LsbWith register s TryThe signal value of itself; These three signals are input to data update module, obtain upgrading evolution result later after handling through renewal and be stored into register x NewWith register S NewIn; Data update module is by the parameter k control that is input in the counter module, and when the k value was non-vanishing, the k value subtracted one, is zero until the k value, update module output evolution result.
4, device according to claim 3, it is characterized in that: the calculation module is discussed in described examination, comprise the combination of a data selector switch SelectorA or LUT1 or data operation circuit and LUT2, a data comparator C ompare, and the input data register x of data selector SelectorA Forward, x ForwardProcess data selector SelectorA or LUT1 or data operation circuit and LUT2 obtain tested merchant's signal storage in register multiple after handling; The register s of two input data of data comparator TryAnd multiple, relatively income value is current evolution data that calculate, and is stored in register x LsbIn; The data update module branch is clipped to register multiple, x LsbAnd s TryGet corresponding signal value.
5, device according to claim 3, it is characterized in that: described data update module, comprise a subtracter Subtracter, the register sub and the s of two input data of data selector SelectorB, refresh circuit A and refresh circuit B and this subtracter Try, with output data register S SubS SubDisplacement obtains upgrading signal later and depositing data register S in middle signal through refresh circuit A New, x LsbSignal after middle signal process refresh circuit B displacement obtains upgrading also deposits evolution result register x in New, refresh circuit Λ and refresh circuit B are by the signal k control of counter module; With x LsbIf input data selector SelectorB is x LsbBe 1, then the numerical value with register multiple is input among the register sub, otherwise the value that register sub is set is 0; If signal k is non-vanishing, then with register S NewIn data input to register s Try, with register x NewInput to register x Forward, discuss the calculation module invokes for examination; Otherwise output result data.
CNB2007101197676A 2007-07-31 2007-07-31 Device and method for high order root extraction suitable for hardware Expired - Fee Related CN100489766C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNB2007101197676A CN100489766C (en) 2007-07-31 2007-07-31 Device and method for high order root extraction suitable for hardware

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNB2007101197676A CN100489766C (en) 2007-07-31 2007-07-31 Device and method for high order root extraction suitable for hardware

Publications (2)

Publication Number Publication Date
CN101105741A CN101105741A (en) 2008-01-16
CN100489766C true CN100489766C (en) 2009-05-20

Family

ID=38999650

Family Applications (1)

Application Number Title Priority Date Filing Date
CNB2007101197676A Expired - Fee Related CN100489766C (en) 2007-07-31 2007-07-31 Device and method for high order root extraction suitable for hardware

Country Status (1)

Country Link
CN (1) CN100489766C (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102253924B (en) * 2011-07-29 2013-09-25 电子科技大学 Method for realizing root extraction arithmetic on hardware and root extraction arithmetic device
CN105094745A (en) * 2015-08-19 2015-11-25 国网重庆市电力公司电力科学研究院 Implementation method of digital power meter calibration instrument floating-point square-rooting algorithm based on Microblaze system

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
一种适合FPGA实现的开平方算法. 林志谋,卢贵主.厦门大学学报(自然科学版)),第45卷第2期. 2006
一种适合FPGA实现的开平方算法. 林志谋,卢贵主.厦门大学学报(自然科学版),第45卷第2期. 2006 *

Also Published As

Publication number Publication date
CN101105741A (en) 2008-01-16

Similar Documents

Publication Publication Date Title
CN105955706B (en) A kind of divider and division operation method
CN103959192B (en) For estimating the mathematical circuit surmounted function
CN106909970A (en) A kind of two-value weight convolutional neural networks hardware accelerator computing module based on approximate calculation
GB2330226A (en) Digital signal processor for performing fixed-point and/or integer arithmetic
CN107291419A (en) Floating-point multiplier and floating number multiplication for neural network processor
CN104375802A (en) Multiplication and division device and operational method
CN102542149A (en) Hardware realization method of fissile bootstrap particle filtering algorithm based on FPGA (Field Programmable Gate Array)
CN100543666C (en) The method of a kind of fixed-point divider and realization computing thereof
CN107992284A (en) A kind of division function implementation method of programming device
CN100489766C (en) Device and method for high order root extraction suitable for hardware
CN102200544B (en) Total electricity accumulation method of the intelligent electric meter of bidirectional measuring can be realized
CN104375800A (en) Embedded system and floating-point division operation method and system thereof
CN108388333B (en) Power consumption adjusting method and device for setting multiplier precision based on electric quantity
CN102063284A (en) Division operation method and device
US9569175B2 (en) FMA unit, in particular for utilization in a model computation unit for purely hardware-based computing of function models
CN204143432U (en) A kind of multiplier-divider
CN102253924B (en) Method for realizing root extraction arithmetic on hardware and root extraction arithmetic device
CN103176768B (en) Calculate modular multiplication method and the scalable modular multiplier of classical modular multiplication
CN117331529B (en) Divider logic circuit and method for realizing same
CN109298848A (en) The subduplicate circuit of double mode floating-point division
CN111323761B (en) Echo system function construction method and device and echo simulator
CN103176950A (en) Circuit and method for achieving fast Fourier transform (FFT) / inverse fast Fourier transform (IFFT)
TWI442315B (en) Low-error compensation method for fixed-width modified booth multipliers
CN114417249B (en) Method for realizing multi-order matrix rapid inversion hardware structure
CN112286490B (en) Hardware architecture and method for loop iteration multiply-add operation

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: 20090520

Termination date: 20100731