A divider may determine a quotient, denoted “Q”, corresponding to a division of a dividend, denoted “P”, by a divisor, denoted “D”.
A conventional divider may implement a division algorithm, e.g., a Sweeney, Robertson and Tocher (SRT) division algorithm, including a series of division cycles, each for determining a quotient based on a partial remainder of a previous cycle and a quotient digit.
Conventional dividers may include a quotient-digit selection logic (QSL) for generating the quotient digit according to a partial remainder value from a previous division cycle, for example, based on a predetermined PD-Plot.
The subject matter regarded as at least one embodiment of the invention is particularly pointed out and distinctly claimed in the concluding portion of the specification. Embodiments of the invention, however, both as to organization and method of operation, together with objects, features and advantages thereof, may best be understood by reference to the following detailed description when read with the accompanied drawings in which:
It will be appreciated that for simplicity and clarity of illustration, elements shown in the drawings have not necessarily been drawn accurately or to scale. For example, the dimensions of some of the elements may be exaggerated relative to other elements for clarity or several physical components included in one functional block or element. Further, where considered appropriate, reference numerals may be repeated among the drawings to indicate corresponding or analogous elements. Moreover, some of the blocks depicted in the drawings may be combined into a single function.
In the following detailed description, numerous specific details are set forth in order to provide a thorough understanding of embodiments of the invention. However, it will be understood by those of ordinary skill in the art that embodiments of the present invention may be practiced without these specific details. In other instances, well-known methods, procedures, components and circuits may not have been described in detail so as not to obscure embodiments of the present invention.
Unless specifically stated otherwise, as apparent from the following discussions, it is appreciated that throughout the specification discussions utilizing terms such as “processing,” “computing,” “calculating,” “determining,” or the like, refer to the action and/or processes of a computer or computing system, or similar electronic computing device, that manipulate and/or transform data represented as physical, such as electronic, quantities within the computing system's registers and/or memories into other data similarly represented as physical quantities within the computing system's memories, registers or other such information storage, transmission or display devices. In addition, the term “plurality” may be used throughout the specification to describe two or more components, devices, elements, parameters and the like.
Reference is made to
According to some demonstrative embodiments, system 100 may include a processor 104. Processor 104 may include, for example, a central processing unit (CPU), a digital signal processor (DSP), a microprocessor, a host processor, a plurality of processors, a controller, a chip, a microchip, or any other suitable multi-purpose or specific processor or controller.
According to some demonstrative embodiments of the invention, system 100 may also include an input unit 132, an output unit 133, a memory unit 134, and/or a storage unit 135. System 100 may additionally include other suitable hardware components and/or software components. In some embodiments, system 100 may include or may be, for example, a computing platform, e.g., a personal computer, a desktop computer, a mobile computer, a laptop computer, a notebook computer, a terminal, a workstation, a server computer, a personal digital assistant (PDA) device, a tablet computer, a network device, a micro-controller, a cellular phone, a camera, or any other suitable computing and/or communication device.
Input unit 132 may include, for example, a keyboard, a mouse, a touch-pad, or other suitable pointing device or input device. Output unit 133 may include, for example, a cathode ray tube (CRT) monitor, a liquid crystal display (LCD) monitor, or other suitable monitor or display unit.
Storage unit 135 may include, for example, a hard disk drive, a floppy disk drive, a compact disk (CD) drive, a CD-recordable (CD-R) drive, or other suitable removable and/or fixed storage unit.
Memory unit 134 may include, for example, a random access memory (RAM), a read only memory (ROM), a dynamic RAM (DRAM), a synchronous DRAM (SD-RAM), a Flash memory, a volatile memory, a non-volatile memory, a cache memory, a buffer, a short term memory unit, a long term memory unit, or other suitable memory units or storage units.
According to some demonstrative embodiments of the invention, processor 104 may include at least one arithmetic logic unit (ALU) 105. ALU 105 may include at least one divider arrangement 120 to determine a quotient, denoted “Q”, corresponding to a division of a first number (also referred to as “the dividend”), denoted “P”, by a second number (also referred to as “the divisor”), denoted “D”, as describe below.
According to some demonstrative embodiments of the invention, divider arrangement 120 may include a divisor value generator 140, a dividend value generator 160, and a divider 142, as described in detail below.
Generator 140 may generate signals 164 corresponding to a value, denoted “gD”, which corresponds to the divisor D. Generator 160 may generate signals 162 corresponding to a value, denoted “gP”, which corresponds to the dividend P. The value gD may correspond, for example, to a product of the divisor D and an approximate reciprocal, denoted g, of the divisor D. The value gP may correspond, for example, to a product of the dividend P and the approximate reciprocal g, as described below.
According to demonstrative embodiments of the invention, divider 142 may generate signals 170 corresponding to a division of the dividend P by the divisor D, by dividing the value gP of signals 162 by the value gD of signals 164. For example, divider 142 may implement a division algorithm, e.g., a Sweeney, Robertson and Tocher (SRT) division algorithm as is known in the art, for performing a series of x division cycles. A quotient Qm+1 of a division cycle m+1, m=0 . . . x−1, may be determined, for example, using the following recursive equations:
R0=gP, Q0=0 (1)
Rm+1=rRm−qm+1(gD) (2)
Qm+1=rQm+qm+1 (3)
wherein Rm denotes a partial remainder value corresponding to a previous cycle m, qm+1 denotes a quotient digit corresponding to cycle m+1, Rm+1 denotes a partial remainder value corresponding to cycle m+1, Qm denotes a quotient corresponding to cycle m, and r denotes a radix of divider 142. The radix r may be determined, for example, by the following equation:
r=2ρ (4)
wherein ρ denotes a value related to the number of bits of the quotient digit qm+1.
According to some demonstrative embodiments of the invention, divider 142 may include a quotient digit selector 148 to generate quotient digit qm+1.
According to some demonstrative embodiments of the invention, divider 142 may include a high-radix divider, for example, having a radix of at least four, e.g., a radix of 256. Accordingly, quotient digit selector 148 may generate two or more bits, e.g., eight bits, representing quotient digit qm+1, e.g., as described below.
According to some demonstrative embodiments of the invention, quotient digit selector 148 may generate a plurality of independent interim values by adding at least first and second sets of one or more carry bits of an encoded remainder value corresponding to cycle m+1 to at least first and second sets of one or more sum bits of the encoded remainder value, respectively; and to generate a plurality of coefficients corresponding to quotient digit qm+1 based on the plurality of interim values. Quotient digit selector 148 may also generate one or more bits corresponding to the quotient digit qm+1 by combining two or more of the plurality of coefficients, e.g., as described in detail below.
According to other embodiments of the invention, quotient digit selector 148 may include any other suitable quotient digit selector, e.g., as known in the art.
According to some demonstrative embodiments of the invention, divider 142 may also include a main loop module 149 to determine the quotient Qm+1 and/or the partial remainder Rm+1, e.g., in accordance with Equations 1, 2, and/or 3. According to some demonstrative embodiments of the invention, main loop 149 may be able to generate one or more signals corresponding to the encoded-remainder value, e.g., as described below with reference to
According to some demonstrative embodiments of the invention, generator 140 may generate signals 164 by applying a predetermined transformation to a remainder value corresponding to a division of the number one by the divisor D, e.g., as described below. However, it will be appreciated by those skilled in the art, that according to other embodiments of the invention, generator 140 may include any other suitable configuration, for example, including a memory to store a reciprocal look-up-table, one or more multipliers, and/or any other hardware for generating the value gD, e.g., as is known in the art.
According to some demonstrative embodiments of the invention, generator 140 may include a dividing unit 144 and a transformation configuration 146. Dividing unit 144 may generate one or more signals corresponding to a division of two numbers by performing a predetermined number, denoted “j”, of division cycles corresponding to a division algorithm, e.g., a SRT division algorithm. For example, dividing unit 144 may receive signals 156, e.g., corresponding to the divisor D, and signals 153 corresponding to another number to be divided by the divisor D. Dividing unit 144 may be able to determine a remainder, denoted “R′m”, of a division cycle m′, m′=1 . . . j−1; and a quotient, denoted “Q′m” resulting from division cycle m′, e.g., as described below. Dividing unit 144 may generate signals 166 corresponding to a remainder, R′j, and signals 168 corresponding to the quotient Q′j, after performing j division cycles. The number of cycles performed by dividing unit 144 may be determined based on any suitable criteria, e.g., as described below. Dividing unit 144 may include, for example, a low-radix divider, e.g., a divider having a radix of two. In other embodiments, dividing unit 144 may include any other suitable divider, e.g., having a radix of four, eight, sixteen, or any other suitable radix.
According to some demonstrative embodiments of the invention, dividing unit 144 may be provided with signals 153 having a value corresponding to the number one, e.g., as described below.
According to some demonstrative embodiments of the invention, divider arrangement 120 may be selectively switched between first and second division configurations, as described in detail below. For example, the first division configuration of divider arrangement 120 may perform a low-radix division operation, e.g., a low-radix integer division, and/or any other operation, e.g., a low-radix square root operation, corresponding to divisor D and dividend P. The second configuration of divider arrangement 120 may perform a high-radix division operation corresponding to divisor D and dividend P.
According to some demonstrative embodiments of the invention, divider arrangement 120 may selectively provide dividing unit 144 with input signal 153 having a value corresponding either to the number one or to the dividend P. For example, divider arrangement 120 may include a selector 179 to receive signals 150 and 152 having values corresponding to the dividend P and the number one, respectively; and to selectively provide dividing unit 144 with signals 153 having a value corresponding to either signals 150 or signal 152, e.g., based on a control signal 154.
According to some demonstrative embodiments of the invention, control signal 154 may be used to control selector 179 to select either signals 150 or 152, e.g., in accordance with a desired operation to be performed by divider arrangement 120, as described below.
According to some demonstrative embodiments of the invention, it may be desired to perform a division operation corresponding to the division of the dividend P by the divisor D, e.g., as part of a square root operation or an integer division operation, which may be performed, for example, using a low-radix divider. Accordingly, selector 179 may be controlled, e.g., using signal 154, to provide dividing unit 144 with signals 153 corresponding to the value of dividend P. Thus, signals 168 and 166 may have values corresponding to the quotient and dividend of the division of the dividend P by the divisor D.
Alternatively, it may be desired to perform one or more division cycles corresponding to the division of the number one by the divisor D, e.g., in order to generate signals 164. Accordingly, selector 179 may be controlled, e.g., using signal 154, to provide dividing unit 144 with signals 153 corresponding to the value of signals 152. Thus, signals 168 and 166 may have values corresponding to the quotient and remainder of the division of the number one by the divisor D.
According to some demonstrative embodiments of the invention, transformation configuration 146 may generate signals 164 corresponding to the value gD by applying a predetermined transformation to signals 166, for example, if signals 153 correspond to the number one and signals 166 correspond to the remainder R′j, e.g., as described below.
According to some demonstrative embodiments of the invention, dividing unit 144 may determine a quotient Q′m+1 of a division cycle m+1, for example, using the following recursive equations, e.g., when divider is provided with signals 153 corresponding to the number one and signals 156 corresponding to the divider 156:
R′0=1, Q′0=0 (5)
R′1=r0R′0−q′1D (6)
Q′1=r0Q′0+q′1 (7)
R′m′+1=r′R′m′−q′m′+1D (8)
Q′m′+1=r′Q′m′+q′m′+1 (9)
wherein, q′m′+1 denotes a quotient digit corresponding to cycle m′+1, R′m′+1 denotes a partial remainder value corresponding to cycle m′+1, and r′ denotes a radix of dividing unit 144. The radix r′ may be determined, for example, by the following equation:
r′=2ρ′ (10)
wherein ρ′ denotes a value related to the number of bits of the quotient digit q′m′+1; and wherein r0 denotes a pre-processing radix corresponding to a preprocessing stage, which may be performed, for example, to determine k≧0 quotient bits, e.g., as is known in the art The radix r0 may be determined, for example, by the following equation:
r0=2k (11)
According to some demonstrative embodiments the following equation may be derived from Equations 5-9, e.g., by induction as described below:
R′m′=(r′)m−1r0−DQ′m′ (12)
According to some demonstrative embodiments of the invention, the following equations may be derived from Equations 5-9:
R′1=r0R′0−q′1D=r0−Q′1D (13)
R′2=r′R′1−q′2D=r′r0−r′Q′1D−q′2D=r′r0−D(r′Q′1D+q′2)=r′r0−DQ′2 (14)
Thus, Equation 13 may indicate that Equation 12 is true for m′=1.
The following Equation may be derived from Equation 8, e.g., assuming that Equation 12 is correct:
It is noted from Equations 13 and 15 that Equation 12 is correct for m′=1; and for m′+1, if it is correct for m′. Thus, Equation 12 may be correct for every m′.
According to demonstrative embodiments of the invention, Equation 12 may be rewritten as follows:
An absolute value of the partial remainder, e.g., in the SRT division algorithm, is smaller than the absolute value of the divisor D, which in turn is smaller than two. Accordingly, the absolute value of the remainder R′m′ may be smaller than two. Thus, according to some demonstrative embodiments of the invention, the following may be correct for R′m′;
According to Equation 17, the value of
may be relatively very small, e.g., the value of
may tend to zero as the value of m′ grows.
According to some demonstrative embodiments of the invention, the number j of division cycles performed by dividing unit 144 may be determined such that after the j-th division cycle:
Accordingly, equation 16 may be rewritten as follows:
Thus, according to some demonstrative embodiments of the invention, the value of g may be determined according to the following equation:
Substituting Equation 20 into Equation 16 may yield the following equation, which may be used, for example, to determine the value gD:
According to some demonstrative embodiments of the invention, transformation module 146 may generate signals 164 by applying to the remainder value R′j of signals 166 a transformation based on Equation 21, e.g., as described below.
According to some demonstrative embodiments of the invention, the value (−R′j) may be expressed using the following binary representation:
−R′j=sp0.p−1p−2. . . p−n (22)
Applying the transformation of Equation 21 to the representation of Equation 22 may yield the following representation of gD:
gD=0s′.s1s2 . . . scp0p−1p−2 . . . p−n (23)
wherein s′ denotes the inversion of s (i.e., s′=1−s), s1=s2= . . . =sc=s; and wherein the number c of bits after the fixed point in Equation 23 having the value s may be determined, for example, as follows:
c=p(j−1)+k−2 (24)
Thus, for example, transformation module 146 may include a configuration, e.g., a hardware configuration, for generating signals 146 according to Equation 23. For example, transformation module 146 may include suitable hardware, e.g., an inverter, for generating s′ based on the value s of signal 166; and suitable hardware, e.g., wiring, for generating bits s1 . . . sc based on the value s of signal 166. Generator 146 may additionally or alternatively include any suitable configuration for generating signals 164 based on signals 166.
According to some demonstrative embodiments of the invention, the number of cycles j performed by dividing unit 144 may be determined based on any desired criteria, e.g., corresponding to the convergence of the division of P by D. The number of cycles j may be related, for example, to the radix of dividing unit 144 and/or the radix of divider 142. For example, dividing unit 144 may perform j=2 cycles, e.g., if the radix of dividing unit 144 is sixteen, the number k of quotient bits determined in the preprocessing stage is two, and the radix of divider 142 is 256.
According to some demonstrative embodiments of the invention, generator 160 may receive, e.g., from dividing unit 144, signals 158 corresponding to one or more quotient digits q′m+1 of cycles m′=0 . . . j−1, e.g., j quotient digits of the division operation corresponding to the divisor D and the number one. Generator 160 may generate signals 162 corresponding to the value gP based on the quotient digits q′m+1, e.g., as described below. According to other embodiments, generator 160 may implement any other suitable method to generate signals 162, e.g., as is known in the art.
According to some demonstrative embodiments of the invention, the value gP may be determined according to the following equation, which may be derived for example, from Equation 20:
According to some demonstrative embodiments of the invention, the value Q′j may be determined, for example, by performing j calculation cycles for summing the values of quotient digits corresponding to the j cycles. A cumulative value Pl+1 of a division cycle l+1, l=1 . . . j−1, may be determined, for example, using the following recursive equations:
P0=0 (26)
P1=r0P0+q′l+1P (27)
Pl+1=rP1+q′l+1P (28)
According to some demonstrative embodiments of the invention, one or more of the cumulative values Pl+1 may be determined in parallel to one or more respective division cycles performed by dividing unit 144.
According to some exemplary embodiments of the invention, the value Q′j may be determined after j cycles, e.g., in accordance with the following equation, which may be derived by induction from Equations 26-28:
Q′jP=Pj (29)
Thus, according to some demonstrative embodiments of the invention, the value gP may be determined in accordance with the following equation, which may be derived by substituting Equation 29 in Equation 25:
According to some demonstrative embodiments of the invention, generator 160 may include any suitable configuration, e.g., hardware configuration, for generating signals 162, e.g., in accordance with Equation 30. For example, generator 160 may include a first configuration for generating signals corresponding to the value Pj; and a second configuration for generating signals 162 by applying to the signals corresponding to the value Pj a transformation based on Equation 30.
According to some demonstrative embodiments of the invention, generator 160 may be implemented using one or more elements of main loop 149, e.g., as described below. However, it will be appreciated by those skilled in the art that according to other embodiments, generator 160 may be implemented by any other suitable configuration, e.g., separate from or combined with divider 142.
Reference is made to
Although the invention is not limited in this respect, configuration 200 may be implemented by arrangement 120 (
According to some demonstrative embodiments of the invention, configuration 200 may include first, second and third selectors 208, 216, and 230, respectively. Selectors 208, 216 and/or 230 may include any selector, e.g., a 2:1 multiplexer as is known in the art, for selectively providing an output signal corresponding to either one of two input signals.
Selector 208 may receive a signal 204 corresponding to the quotient digit q′m′+1, e.g., from dividing unit 144 (
Selector 216 may receive a signal 214 corresponding to the value P, and/or a signal 212 corresponding to the value gD, e.g., from dividing unit 144 (
Selector 230 may receive signal 212, and/or a signal 226 corresponding to the value zero. Selector 230 may selectively provide a signal 232 corresponding to either signal 212 or signal 226, e.g., based on a control signal 228.
Configuration 200 may also include first and second summation arrangements, e.g., a first CSA arrangement 222 and a second CSA arrangement 234. CSA arrangement 222 may generate a signal 224 having a value corresponding to a sum of the values of signals 210, 220 and a signal 236 received from CSA arrangement 234. For example, CSA arrangement 222 may generate signal 224 according to the following equation:
S224=r*S236+S210*S220 (31)
wherein S224, S236, S210, and S220 denote the values of signals 224, 236, 210, and 220, respectively.
CSA arrangement 234 may generate signal 236 having a value corresponding to the sum of the values of signals 224, 202 and 232. For example, CSA arrangement 234 may generate signal 236 according to any suitable calculation method implemented by divider 142 (
According to some demonstrative embodiments of the invention, CSA arrangements 222 and/or 234 may be implemented for performing the functionality of main loop 149 (
According to one demonstrative embodiment of the invention, selector 208 may be controlled, e.g., using signal 206, to provide CSA 222 with signal 210 corresponding to the quotient digit q′m′+1; selector 216 may be controlled, e.g., using signal 218, to provide CSA 222 with signal 220 corresponding to the dividend P, e.g., of signal 214; and selector 230 may be controlled e.g., using signal 228, to provide CSA 234 with signal 232 corresponding to the value zero. CSA arrangement 222 may be controlled, e.g., using signal 293, to generate signal 224 according to Equation 31. Accordingly, signal 224 may have a value corresponding to the value of Pl+1, e.g., after l division cycles, for example, in accordance with Equation 28. Accordingly, signal 224 may have a value corresponding to the value Pj, e.g., after j division cycles.
According to another demonstrative embodiment of the invention, selector 208 may be controlled, e.g., by signal 206, to provide CSA 222 with signal 210 corresponding to the value −(qm+1); selector 216 may be controlled, e.g., by signal 218, to provide CSA 222 with signal 220 corresponding to the value gD, e.g., of signal 212; and selector 230 may be controlled, e.g., by signal 228, to provide CSA 234 with signal 232 corresponding to the value gD. CSA arrangement 222 may be controlled, e.g., by signal 293, to generate signal 224 according to Equation 32. Accordingly, signal 224 may have a value corresponding to the value of Rm+1, e.g., after m division cycles, for example, in accordance with Equation 2.
Following are examples for determining the value gD using a dividing unit of a first radix; and dividing the number P by the number D, by dividing the value gP by the value gD, e.g., using a second divider of a second radix. It should be noted that these examples have been randomly selected for demonstrative purposes only and are not intended to limit the scope of the invention to any particular choice of the first and second dividers.
According to one demonstrative embodiment of the invention, the first divider may have a radix r′=16, and the second divider may have a radix r=256. The first divider may be used to perform j=3 division cycles, e.g., including the preprocessing stage, which may have a radix r0=4. The remainder R′m′ of the first divider may satisfy the following condition:
Substituting Condition 32 in Equation 21 may yield the following:
Thus, the values of gD, q1, and/or gP may be determined, for example, after three cycles.
Since the second divider has a radix of 256, each division cycle of the second divider may generate 8 bits of the quotient Q corresponding to the division of the number P by the number D. Accordingly, 64 bits of the quotient Q may be determined, for example, after performing eight division cycles of the second divider. An additional number of post-processing cycles, e.g., two cycles, may be performed for generating a 67-bit quotient.
According to another demonstrative embodiment of the invention, the first divider may have a radix r′=8, and the second divider may have a radix r=256. The first divider may be used to perform j=5 division cycles, e.g., including the preprocessing stage, which may have a radix r0=1. The remainder R′m′ of the first divider may satisfy the following condition:
|R′m′|≦D (34)
Substituting Condition 34 in Equation 21 may yield the following:
Thus, the values of gD, q1, and/or gP may be determined, for example, after five cycles.
Since the second divider has a radix of 256, each division cycle of the second divider may generate 8 bits of the quotient Q corresponding to the division of the number P by the number D. Accordingly, 64 bits of the quotient Q may be determined, for example, after performing eight division cycles of the second divider. An additional number of post-processing cycles, e.g., two cycles, may be performed for generating a 67-bit quotient.
Reference is made to
As indicated at block 302, the method may include generating the value gD corresponding to the remainder of a division of the number one by the second number. Generating the value gD may include, for example, using a divisor value generator generator, e.g., generator 140 as described above with reference to
As indicated at block 306, generating the value gD may include performing a division operation including a predetermined number of division cycles corresponding to the division of the number one by the second number. Performing the division operation may include, for example, using a dividing unit, e.g., dividing unit 144 as described above with reference to
As indicated at block 308, generating the value gD may also include applying a tansformation to a remainder of the division operation. The transformation may be based, for example, on the predetermined number of division cycles and a radix of the division operation, e.g., as described above. Applying the transformation to the remainder of the division operation may include, for example, using a transformation module, e.g., transformation module 146 as described above with reference to
As indicated at block 310, the method may also include generating the value gP based on the first number and one or more quotient digits corresponding to one or more of the division cycles, respectively. Generating the value gP may include, for example, using a dividend value generator, e.g., generator 160 as described above with reference to
As indicated at block 304, the method may also include dividing the value gP by the value gD. Dividing the value gP by the value gD may include, for example, using a divider, e.g., divider 142 as described above with reference to
As indicated at block 312, the method may also include, for example, selectively providing signals corresponding to the second number and the number one to first and second inputs of the dividing unit, respectively. The method may also include performing a predetermined operation on a third number by selectively providing a signal corresponding to the third number to one of the dividing unit inputs. Selectively providing the signals to the dividing unit inputs may include, for example, using a selector, e.g., selector 179 as described above with reference to
Reference is made to
Although the invention is not limited in this respect, divider 400 may perform the functionality of divider 142 (
According to some demonstrative embodiments of the invention, divider 400 may include a main loop 402. Although the invention is not limited in this respect, main loop 402 may perform the functionality of main loop 149 (
Rm+1encoded=Rm+1+γ (36)
wherein γ denotes an encoding constant which may be determined, e.g., based on desired criteria as described below.
Generator 406 may include, for example, an adder arrangement 406 to generate the encoded remainder value Rm+1encoded by adding encoding constant γ to the remainder value Rm+1. For example, generator 406 may include a 8:2 CSA, e.g., including three 4:2 CSAs 416, 418 and 420, to receive a plurality of signals, e.g., signals 422, 424, 426, 428, 430, 432 and 434, corresponding to the remainder Rm+1; and a signal 436 having a value corresponding to the value γ. For example, signals 422 and 424 may correspond to carry and save values of a product of the partial remainder R′m; and the radix r′; and/or signals 426, 428, 430, 432 and/or 434 may correspond to a product of the value gD and the quotient digit q′m′+1. Signals 422, 424, 426, 428, 430, 432, and/or 434 may be generated, for example, by any suitable element of divider 400, e.g., as known in the art.
According to some demonstrative embodiments of the invention, signals 426, 428, 430, 432 and/or 434 may be generated based on a plurality of quotient-digit coefficients denoted, a0, a1, a2, a3, . . . aρ/2, corresponding to the quotient digit qm+1 For example, main loop 402 may generate signals 426, 428, 430, 432 and/or 434 based on a plurality of signals corresponding to quotient-digit coefficients a0, a1, a2, a3, . . . aρ/2. The signals corresponding to quotient-digit coefficients a0, a1, a2, a3, . . . aρ/2, may be generated, for example, by selector 404, e.g., as described in detail below. Main loop 402 may include any suitable configuration for generating signals 426, 428, 430, 432 and/or 434, e.g., according to the following Equation:
Generator 406 may generate, e.g., based on signals 422, 424, 426, 428, 430, 432, 434 and/or 436, a plurality of signals, e.g., signals 440, corresponding to sum bits of encoded remainder value Rm+1encoded; and plurality of signals, e.g., signals 438, corresponding to carry bits of encoded remainder value Rm+1encoded. According to other embodiments of the invention, generator 406 may include any other suitable configuration, e.g., including one or more CSAS, to generate signals 438 and/or 440.
According to some demonstrative embodiments of the invention, divider 400 may also include a quotient digit selector 404 to generate a plurality of independent interim values by adding at least first and second sets of one or more carry bits of encoded remainder value Rm+1encoded to at least first and second sets of one or more sum bits of encoded remainder value Rm+1encoded, respectively; and to generate a plurality of coefficients corresponding to quotient digit qm+1 based on the plurality of interim values, as described below.
According to some demonstrative examples of the invention, selector 404 may generate two or more of the interim values in parallel, e.g., as described below.
According to some demonstrative embodiments of the invention, the sum and carry bits of the redundant form of encoded remainder value Rm+1encoded may be represented in the following binary representations:
s=α1α0.α−1α−2α−3 . . . α−ρ/2 (38)
c=β1β0.β−1β−2β−3 . . . β−ρ/2 (39)
According to some demonstrative embodiments of the invention, selector 404 may include an adder configuration 409, e.g., including at least first and second adders, to independently add the at least first and second sets of carry bits to the at least first and second sets of sum bits, respectively, as described below.
According to some demonstrative examples of the invention, adder configuration 409 may add, in parallel, the sets of carry bits to the sets of sum bits, respectively.
According to some demonstrative embodiments of the invention, the sets of carry bits may include sets of two carry bits of encoded remainder Rm+1encoded; and the sets of sum bits may include sets of two bits of the encoded remainder Rm+1encoded. The sets of two sum bits may be independently added to the sets of carry bits of the encoded remainder Rm+1encoded, e.g., as follows:
wherein σ−2g+1 and σ−2g denote first and second interim sum values corresponding to the sum of the g-th set of sum bits, denoted α−2g+1α−2g, and the g-th set of carry bits, denoted β−2g+1β−2g, respectively; and wherein c−2g+1 denotes an interim carry value corresponding to the sum of α2g+1α−2 and β−2g+1β−2g.
According to some demonstrative embodiments of the invention, the number of signals 438 and/or 440, e.g., which may be used for determining the quotient-digit coefficients, may correspond, for example, to the radix of divider 400. Accordingly, adder configuration 409 may include a number of adders corresponding to the radix of divider 400. For example, signals 440 may include twelve signals corresponding to twelve sum bits of encoded remainder value Rm+1encoded; and signals 438 may include twelve signals corresponding to twelve carry bits of encoded remainder value Rm+1encoded, e.g., if divider 400 has a radix of 256. Accordingly, adder configuration 409 may include six adders, e.g., including adders 412 and 414, to add six sets of two sum bits to six sets of two carry bits, respectively.
For example, signals 440 may include twelve signals including signals 442, 444, 450 and 452, e.g., corresponding to the values α1, α0, α−−ρ/2, and α−2−ρ/2, respectively; and signals 438 may include twelve signals including signals 446, 448, 454 and 456, e.g., corresponding to the values β1, β0, β−1−ρ/2, and β−2−ρ/2, respectively. Adder 412 may receive signals 442, 444, 446 and 448; and generate signal 458, e.g., corresponding to the interim value c0; and signals 460 corresponding to the interim values σ1, and σ0. Adder 414 may receive signals 450, 452, 454 and 456; and generate signal 462, e.g., corresponding to the interim value c−1−ρ/2; and signals 460 corresponding to the interim values σ−1−ρ/2, and σ−2−ρ/2.
According to some demonstrative embodiments of the invention, selector 404 may also include a quotient-digit coefficient generator 410 to generate a plurality of quotient-digit coefficient signals corresponding to the plurality of coefficients a0, a1, a2, a3, . . . aρ, based on the interim values received from adder configuration 409. For example, generator 410 may generate signals 466, 468, and 470 corresponding to coefficients a0, a1 and aρ, respectively. For example, generator 410 may generate the plurality of quotient-digit coefficient signals, according to the following equations:
α0=c−1+σ0+2(σ1−1)
αi=c−2i−1+σ−2i+2(σ−2i+1−1) (41)
wherein i=1, 2, . . . ρ.
According to some demonstrative embodiments of the invention, selector 404 may also include a quotient digit generator 408 to generate signals 472 corresponding to quotient digit qm+1 by combining the plurality of quotient digit coefficients. For example, generator 408 may generate signals 472 according to the following equation:
Generator 408 may include any desired quotient bit generator configuration, e.g., as is known in the art.
According to some demonstrative embodiments of the invention, the encoded remainder value Rm+1encoded may be determined, for example, using the following equation, which may be derived from Equation system 40:
According to some demonstrative embodiments of the invention, the encoding constant γ may be determined as follows:
wherein N is a predetermined integer number, corresponding to half of a data path width if the division operation. For example, N may equal 40.
According to some demonstrative embodiments of the invention, the following equation may be derived by substituting Equation 44 in Equation 43:
Equation 45 may be re-arranged as follows:
According to some demonstrative embodiments of the invention, Equations 41, 42 and 46 may be combined into the following equation:
Since the expression 2σ1−2j+σ−2j+c−2j−1 may have a value of either −2, −1, 0, 1, or 2, Equation 47 may be estimated as follows, e.g., using the formula of geometric progression:
Thus, it will be appreciated by those skilled in the art that the division operation performed by divider 400 may converge relatively efficiently, e.g., if the quotient digit qm+1 is generated in accordance with Equation 42.
It will be appreciated by those skilled in the art that a divider according to some demonstrative embodiments of the invention, e.g., divider 400, may generate a high radix quotient digit, e.g., a 256-bit quotient digit or a quotient digit of any other desired number of bits, during a single division cycle.
Some demonstrative embodiments of the invention are described above in relation to an encoding constant determined in accordance with an adder configuration e.g., configuration 401, to independently add at least first and second sets of two carry bits of the encoded remainder value Rm+1encoded to at least first and second sets of two sum bits of the encoded remainder value Rm+1encoded, respectively. However, it will be appreciated by those skilled in the art that in other embodiments of the invention the encoding constant may be determined in accordance with an adder configuration able to independently add at least first and second sets of any desired number of carry and sum bits of the encoded remainder value Rm+1encoded. For example, the encoding constant may be determined as follows, e.g., if the quotient digit qm+1 is to be generated using an adder configuration to independently add at least first and second sets of three carry bits of the encoded remainder value Rm+1encoded to at least first and second sets of three sum bits of the encoded remainder value Rm+1encoded, respectively:
Reference is made to
Although the invention is not limited in this respect, generator 500 may perform the functionality of quotient-digit coefficient generator 410 (
According to some demonstrative embodiments of the invention, generator 500 may generate the plurality of coefficients a0, a1, a2, a3, . . . , aρ/2, e.g., in accordance with Equation set 41, as described below.
According to Equation set 41, coefficient αi may have a value of (−2), e.g., if c−2i−1=0, σ−2i=0, and σ−2i+1=0. Coefficient αi may have a value of (−1), e.g., if c−2i−1=0, σ−2i=1, and σ−2i+1=0; or if c−2i−1=1, σ−2i=0, and σ−2i+1=0. Coefficient αi may have a zero value, e.g., if c−2i−1=0, σ−2i=0, and σ−2i+1=1; or if c−2i−1=1, σ−2i=1, and σ−2i+1=0. Coefficient αi may have a value of 1, e.g., if c−2i−1=0, σ−2i=1, and σ−2i+1=1; or if c−2i−1=1, σ−2i=0, and σ−2i+1=1. Coefficient αi may have a value of 2, e.g., if c−2i−1=1, σ−2i=1, and σ−2i+1=1.
According to some demonstrative embodiments of the invention, generator 500 may include a configuration of logical gates to generate one or more of the quotient-digit coefficients, for example, based on one or more of the values c−2i−1, σ−2i, and σ−2i+1, e.g., as received from adder configuration 409 (
Generator 500 may include, for example, an XNOR gate 502 to generate a signal 503 corresponding to a logical XNOR operation performed on the values c−2i−1, and σ−2i; a NOT gate 506 to generate a signal 507 corresponding to a logical NOT operation performed on the value σ−2i+1; a NOR gate 504 to generate a signal 510 corresponding to a logical NOR operation performed on the values of signals 507 and 503; and a NOR gate 508 to generate a signal 512 corresponding to a logical NOR operation performed on the value of signal 503 and the value σ−2i+1.
Generator 500 may also include, for example, an XNOR gate 514 to generate a signal 518 corresponding to a logical XNOR operation performed on the values c−2i−1, and σ−2i+1; an XNOR gate 516 to generate a signal 520 corresponding to a logical XNOR operation performed on the values σ−2i and σ−2i+1; and a NOR gate 522 to generate a signal 524 corresponding to a logical NOR operation performed on the values of signals 518 and 520.
Generator 500 may also include, for example, an AND3 gate 530 to generate a signal 532 corresponding to a logical AND operation performed on the values c−2i−1, σ−2i, and σ−2i+1.
Generator 500 may also include, for example, a NOR gate 526 to generate a signal 528 corresponding to a logical NOR operation performed on the values c−2i−1, σ−2i, and σ−2i+1.
According to some demonstrative embodiments of the invention, the coefficient αi may be generated based on the values of signals 510, 512, 524, 532, and/or 528. For example, the coefficient ai may have a value of (−2), e.g., if the value of signal 528 is one; a value of (−1), e.g., if the value of signal 512 is one; a zero value, e.g., if the value of signal 524 is one; a value of 1, e.g., if the value of signal 510 is one; or a value of 2, e.g., if the value of signal 532 is one.
It will be appreciated by those skilled in the art that the above configuration of logical gates is only for demonstrative purposes, and that according to other embodiments of the invention, generator 500 may include any other suitable configuration for generating one or more of the quotient-digit coefficients.
As indicated at block 602, the method may include generating a plurality of quotient-digit coefficients corresponding to the quotient digit qm+1. Generating the plurality of quotient-digit coefficients may include, for example, using a quotient digit selector, e.g., selector 404 as described above with reference to
As indicated at block 604, generating the plurality of quotient-digit coefficients may include generating a plurality of independent interim values by adding at least first and second sets of one or more carry bits of an encoded remainder value corresponding to the division cycle, to at least first and second sets of one or more sum bits of the encoded remainder value, respectively. For example, generating the plurality of interim values may include generating the plurality of interim values by independently adding at least first and second sets of two carry bits of the encoded remainder value to at least first and second sets of two sum bits of the encoded remainder value, respectively. Independently generating the plurality of interim values may include, for example, using an adder configuration, e.g., adder configuration 409 as described above with reference to
As indicated at block 608, generating the plurality of quotient-digit coefficients may also include generating the plurality of quotient-digit coefficients based on the plurality of interim values. Generating the plurality of quotient-digit coefficients based on the plurality of interim values may include, for example, using quotient-digit coefficient generator, e.g., generator 410 as described above with reference to
As indicated at block 610, the method may include generating one or more bits corresponding to the quotient digit by combining two or more of the plurality of quotient-digit coefficients. Generating the one or more bits corresponding to the quotient digit may include, for example, using a quotient digit generator, e.g., generator 408 as described above with reference to
As indicated at block 606, the method may include generating the encoded remainder value by adding a predetermined encoding constant value to a remainder value corresponding to the division cycle. The encoding constant value may be based, for example, on the number of bits in one or more of the sets of one or more carry bits. The remainder value corresponding to the division cycle may be generated, for example, based on one or more of the quotient-digit coefficients. Generating the encoded remainder value may include, for example, using an encoded-remainder generator, e.g., generator 406 as described above with reference to
Embodiments of the present invention may be implemented by software, by hardware, or by any combination of software and/or hardware as may be suitable for specific applications or in accordance with specific design requirements. Embodiments of the present invention may include units and sub-units, which may be separate of each other or combined together, in whole or in part, and may be implemented using specific, multi-purpose or general processors, or devices as are known in the art. Some embodiments of the present invention may include buffers, registers, storage units and/or memory units, for temporary or long-term storage of data and/or in order to facilitate the operation of a specific embodiment.
While certain features of the invention have been illustrated and described herein, many modifications, substitutions, changes, and equivalents may occur to those of ordinary skill in the art. It is, therefore, to be understood that the appended claims are intended to cover all such modifications and changes as fall within the true spirit of the invention.