WO2008005592A1 - Computation of a mod (2 n - 1) - Google Patents

Computation of a mod (2 n - 1) Download PDF

Info

Publication number
WO2008005592A1
WO2008005592A1 PCT/US2007/064370 US2007064370W WO2008005592A1 WO 2008005592 A1 WO2008005592 A1 WO 2008005592A1 US 2007064370 W US2007064370 W US 2007064370W WO 2008005592 A1 WO2008005592 A1 WO 2008005592A1
Authority
WO
WIPO (PCT)
Prior art keywords
bit
adder
output
sections
mod
Prior art date
Application number
PCT/US2007/064370
Other languages
French (fr)
Inventor
Qiang Shen
Original Assignee
Via Telecom Co., Ltd.
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 Via Telecom Co., Ltd. filed Critical Via Telecom Co., Ltd.
Publication of WO2008005592A1 publication Critical patent/WO2008005592A1/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F7/00Methods or arrangements for processing data by operating upon the order or content of the data handled
    • G06F7/60Methods or arrangements for performing computations using a digital non-denominational number representation, i.e. number representation without radix; Computing devices using combinations of denominational and non-denominational quantity representations, e.g. using difunction pulse trains, STEELE computers, phase computers
    • G06F7/72Methods or arrangements for performing computations using a digital non-denominational number representation, i.e. number representation without radix; Computing devices using combinations of denominational and non-denominational quantity representations, e.g. using difunction pulse trains, STEELE computers, phase computers using residue arithmetic
    • G06F7/727Modulo N arithmetic, with N being either (2**n)-1,2**n or (2**n)+1, e.g. mod 3, mod 4 or mod 5

Definitions

  • the present invention relates generally to the field of fixed-point arithmetic realizations, more specifically, to systems and methods for computing the modulo operation corresponding to divisor (2 n -l).
  • vl x mod r where x is an integer and r is a positive integer, is defined as the nonnegative integer y. less than r, in the set ⁇ x-kr: ke Z ⁇ , where Z represents the set of integers.
  • 8 mod 5 equals 3.
  • 101 mod 10 equals 1.
  • '"x mod r may be interpreted as the remainder resulting from the division of x by r.
  • A is an m bit binary word, where in and n are positive integers.
  • a system for computing A mod (2 n -l ), where A is an m-bit quantity, where m is an integer greater than or equal to two, where n is a positive integer less than or equal to m, may include a plurality of adder circuits. Each of the adder circuits may be configured to operate on two n-bit operands in order to produce an n-bit output
  • the plurality of adder circuits may be coupled to form a tree structure.
  • the quantity A is partitioned into a plurality of sections, where each of the sections includes up to n consecutive bits of the quantity A. Each of the sections may be supplied to exactly one of the adder circuits to determine one of the two n-bit input operands of that adder circuit.
  • Each of the adder circuits may include: a first n-bit adder configured to operate on the two n-bit operands in order to produce an intermediate n-bit result; and a second n-bit adder configured to operate on the intermediate n-bit result and on a carryout signal from the first n-bit adder in order to produce the n-bit output.
  • a system for computing A mod (2 n -l). where A is an m-bit quantity, where m is an integer greater than or equal to two, where n is a positive integer less than or equal to m may include an adder circuit.
  • the adder circuit may be configured to operate on two n-bit inputs and to produce an n-bit output.
  • the output of the adder circuit may be coupled to a first of the two inputs.
  • the adder circuit may include: a first n-bit adder configured to operate on the two n-bit operands in order to produce an intermediate n-bit result; and a second n-bit adder configured to operate on the intermediate n-bit result and on a carryout signal from the first n-bit adder in order to produce the n-bit output.
  • a plurality of sections of the quantity A may be presented to a second of the two inputs in a plurality of cycles (of a clock signal) respectively. Each of the sections may include up to n consecutive bits of the quantity A.
  • a method for computing A mod (2 n -l ), where A is an m-bit quantity, where m is an integer greater than or equal to two, where n is a positive integer less than or equal to m may involve: (a) receiving the m-bit quantity A; (b) extracting a section of the quantity A, where the section includes up to n consecutive bits of the quantity ⁇ ;
  • a method for computing A mod (2 n -l), where A is an m-bit quantity, where m is an integer greater than or equal to two, where n is a positive integer less than or equal to m may involve performing a number of addition operations in a sequence of stages. Each of the stages may include performing a corresponding subset of the number of addition operations in a parallel fashion. The subset of addition operations of each stage may receive corresponding input data and generate corresponding output data. The input data of each stage, except for a first of the stages, may include at least a portion of the output data of a previous one of the stages.
  • the input data of the first stage may include a plurality of sections of the quantity A. Each of the sections may include at most n consecutive bits of the quantity A. Each of the number of addition operations may include performing a first n-bit addition and a second n-bit addition, where the second n-bit addition operates on an intermediate result and a carry out produced by the first n-bit addition.
  • the method may further comprise selecting either the value zero or the output data from a last of the stages depending on a comparison of the value (2 n -l) and the output data from the last stage, where the selected value equals A mod f2 n -l).
  • Any of the various method embodiments disclosed herein (or any combinations thereof or portions thereof) may be implemented in terms of program instructions.
  • the program instructions may be stored in (or on) any of various memory media.
  • a memory medium is a medium configured for the storage of information. Examples of memory media include various kinds of magnetic media (e.g.. magnetic tape, magnetic disk, magnetic strips, and magnetic film); various kinds of optical media (e.g., CD-ROM); various kinds of semiconductor RAM and ROM; various media based on the storage of electrical charge or other physical quantities; etc.
  • various embodiments of a system including a memory and a processor are contemplated, where the memory is configured to store program instructions and the processor is configured to read and execute the program instructions from the memory.
  • the program instructions encode corresponding ones of the method embodiments described herein (or combinations thereof or portions thereof).
  • Figure IA illustrates an adder circuit employing feedback in order to compute the value A mod (2 n -l) in a number of clock cycles.
  • Figure IB illustrates one embodiment of a system configured to extract sections of an m-bit quantity A and to operate on the sections in order to compute A mod (2 n -l) in a number of clock cycles.
  • Figure 1C one embodiment of a circuit configured to extract successive sections of the quantity A.
  • Figure 2A illustrates one embodiment of an adder tree configured to compute
  • Figure 3B illustrates one embodiment of an adder tree configured to compute
  • Figure 3C illustrates one embodiment of an adder tree configured to compute
  • Figure 3D illustrates one embodiment of an adder tree configured to compute
  • Figure 5 illustrates one embodiment of an adder circuit V n configured to implement the computation (X+ Y) mod(2 n -l) on two n bit operands X and Y.
  • Figure 6 illustrates one embodiment of a circuit G n including two n-bit adders.
  • Figure 8 illustrates one embodiment of a system for computing A mod (2 n -l), the system including an adder tree structure and a mapping circuit.
  • Figure 9 illustrates one embodiment of a system for computing ⁇ mod (2 n -l) hi a number of computational cycles using feedback.
  • Figure 1OA illustrates one embodiment of a method (e.g., a computer- implemented method) for computing A mod (2 n -l) in a sequential fashion.
  • Figure 1OB illustrates one embodiment of a method for computing A mod (2 n - 1) in a plurality of stages, each including a number of parallel addition operations.
  • Figure IOC illustrates one embodiment of a method for accessing a data symbol from memory as part of an interleaving operation or deinterleaving operation.
  • Figure 11 illustrates one embodiment of a computer system for computing A mod (2 n -l ) on an m bit quantity A.
  • the word “may” is used in a permissive sense (i.e., in the sense of “having the potential to"), rather than in the mandatory sense (i.e., in the sense of “must”).
  • the phrase “A includes B” is used to mean 'A includes B. but is not limited to B”.
  • a ⁇ m> denote an m-bit binary word, where m is an integer greater than or equal to two.
  • n be a positive integer less than or equal to m.
  • k ln , where ⁇ _x ⁇ denotes the floor of x, i.e., the greatest integer which is less than or equal to x, In other words, k is the result of dividing m by n and then rounding down to the nearest integer.
  • the m-bit word A ⁇ m> can be represented as a concatenation of k consecutive n-bit sections and a terminal section having (m-kn) bits:
  • a ⁇ m > A 1 ⁇ m - kn > A k _ ⁇ n > A k _ 2 ⁇ n > . , .
  • the notation X ⁇ r> is meant to indicate an r-bit binary word X.
  • the value of the binary word A can be expressed in terms of the values of the sections as follows:
  • a mod(2" - 1) ( 4 + A k _ x 4- A L _ 2 + . . . + A ⁇ A 0 ) mod(2" - 1) .
  • the output Z k from the last cycle represents A mod (2 n -l). Because addition operation (based on any modulus) is both commutative and associative, the order of presentation of the quantities Ao, Ai, A 2 , ..., A k 1 , A ⁇ to the adder circuit V n 10 does not matter so far as the final output is concerned.
  • a section extraction circuit SEC 50 may be provided to extract the quantities Ao, Ai, A 2 , ..., A k -i, A ⁇ from the binary word A and to present the quantities Ao, Ai, A 2 , ..., A U , A ⁇ to the adder circuit V n in successive clock cycles, e.g., as suggested in Figure I B.
  • the section extraction circuit SEC 50 may include a multiplexer 51, an m-bit register 52, a shift unit 53 and a control unit 54 as illustrated in Figure 1C.
  • the multiplexer 51 may initially select the m-bit binary word A and forward the binary word A to the m-bit register 52.
  • Register 52 receives and stores the binary word A.
  • the m-bit output of the register 52 is provided to the shift unit 53.
  • the least significant n bits of the register output may be interpreted as the output of the section extraction unit SEC.
  • the shift unit 53 receives the m-bit output of the register 52 and shifts the register output by n-bits to the right in order to generate a shifted value.
  • the control unit 54 directs multiplexer 51 to select the shifted value from the shift unit 53.
  • the shifted value gets stored in register 52 and gets shifted again by shift unit 53.
  • the control unit 54 directs multiplexer 51 to select the doubly shifted value.
  • the control unit 54 may direct the multiplexer to select the output of the shift unit Therefore, in successive clock cycles, successive ones of the sections Ao, Ai, A 2 , ..., An, A ⁇ will appear at the output of the section extraction unit SEC 50.
  • the control unit 54 may receive the clock signal CLK and control the selection action of the multiplexer 51, the storage action of the register 52, and the shifting action of the shift unit 53. For example, the control unit may induce the register 52 to capture data on rising edges of the clock CLK and induce the shift unit
  • control unit 53 to perform the shifting action on falling edges of the clock CLK.
  • n ⁇ is a multiple of n
  • the value (m-kn) equals zero, and thus, the quantity A ⁇ is vacuous. Therefore, in this case, only the quantities Ao, Ai, Aj, ..., A ⁇ 1 need be presented to the adder circuit V n , and the computation of A mod (2 n -l) may be completed in k computational cycles.
  • the computation of A modulo (2 1 M) may be implemented, e.g., in one clock cycle, by an adder tree formed from copies of the adder circuit V n .
  • the adder tree 100 has four stages including eight copies of the adder circuit V 4 . In the first stage, adder circuits 101 , 102, 103 and
  • adder circuits 101 and 102 feed adder circuit 105
  • adder circuits 103 and 104 feed adder circuit 106.
  • the adder circuit 108 of the fourth stage receives the 4-bit output of adder circuit 107 and also receives the 3 -bit quantity Ag, the only quantity that didn't get consumed in the first stage.
  • the 4-bit output of adder circuit 108 represents the result A mod (2 -1), i.e., A mod 15.
  • the number n L of levels in the adder tree is given by the expressions: c
  • the adder tree depth ni equals the ceiling of the base-2 logarithm of the ceiling of vain.
  • the quantity A% is the first stage remainder.
  • Figure 2B illustrates an embodiment of an adder tree 200 where the first-stage remainder (quantity Ag) is consumed by an adder circuit 207 in the third stage, Li the first two stages, the adder tree 200 has a structure similar to the structure of the adder tree 100.
  • the quantity Ag and the output of adder circuit 106 are fed to adder circuit 207.
  • the outputs of adder circuits 105 and 207 are fed to adder circuit 208.
  • Figure 3 A illustrates an embodiment of an adder tree 300 where the quantity AQ is the first-stage remainder.
  • each of adder circuits 301, 302, 303 and 304 receive a corresponding pair of the quantities Ai 3 Ai, A 3 , ..., Ag.
  • Adder circuit 305 of the second stage is supplied with quantity Ao and the output of adder circuit 301 from the first stage.
  • the outputs of adder circuits 305 and 306 are supplied to adder circuit 307.
  • the outputs of adder circuit 302 and 307 are fed to adder circuit 308.
  • Each of the adder circuits 351, 352, 353 and 354 receives a corresponding pair of the quantities Ao, Ai, A 2 , Aj, ..., A7.
  • Adder circuit 355 receives the outputs of adder circuits 351 and 352.
  • Adder circuit 356 receives the outputs of adder circuits 353 and 354.
  • Adder circuit 357 receives the outputs of adder circuits 355 and 356.
  • an adder tree may include only two copies of the adder circuit V n .
  • Adder tree 360 includes adder circuits 36] and 362.
  • the adder circuit 361 receives the 8 -bit quantities Ao and Ai.
  • the adder circuit 362 receives the 8 -bit output of the adder circuit 361 and also receives the 5 -bit quantity A 2 .
  • an adder tree may include only one copy of the adder circuit V n .
  • Adder circuit 370 receives the quantities Ao and A 1 .
  • Adder circuit 401 receives quantities Ao and Ai.
  • Adder circuit 402 receives the quantities A 3 and A 4 .
  • Adder circuit receives the output of adder circuit 401 and the quantity A 2 .
  • Adder circuit 404 receives the outputs of adder circuits 402 and 403.
  • the adder circuit V n implements the computation (X+Y) mod(2 ⁇ -l) on two n bit operands X and Y to produce an n-bit output Z.
  • the adder circuit V n may be realized as illustrated in Figure 5.
  • the adder circuit V n may include two n-bit adders 501 and 502. Each n-bit adder is configured to operate on two n-bit operands to produce an n-bit output, using wrap as the overflow operation.
  • the n-bit operands X and Y are supplied to the adder 501.
  • the output W ⁇ n> of the adder 501 may be supplied to the adder 502.
  • the carryout bit from the adder 501 may be supplied to the adder 502.
  • the output R ⁇ n> from the adder 502 is supplied to a circuit 503 for selectively mapping the state (2 n -l) to zero and for passing all other states of the output R.
  • the adder circuit V n reports the result (X l Y) mod (2 n -l).
  • the circuit 503 may include a comparison unit 504 and a multiplexer 505.
  • the comparison unit 504 may determine if the output R equals 2 n -l and asserts the control signal CNTL if so.
  • the control signal CNTL may be coupled to the select input of the multiplexer 505.
  • the output Z of the multiplexer 505 is the output of the adder circuit V n .
  • systems for computing A mod (2 n -l) may be configured using copies of an adder circuit G n as illustrated in Figure 6. Similar to the adder circuit V n , the adder circuit G r , includes two n-bit adders 601 and 602. However, in contrast to the adder circuit V n , the adder circuit G n does not include an exceptional-state mapping circuit such as circuit 503.
  • the adder 601 receives the n-bit operands X and Y and produces an n-bit output W.
  • the output W and the carryout signal from the adder 601 are provided to the adder 602.
  • the adder 602 generates the output Z.
  • Figure 7 illustrates one embodiment of a system 690 for computing A mod (2 n -l ) including an adder tree 700.
  • Adder tree 700 is configured using copies of adder circuit G n instead of copies of adder circuit V n .
  • Each of the adder circuits 701. 702, 703 and 704 receive a corresponding pair of the quantities Ao, A 1 , A 2 ..., A 7 .
  • Adder circuit 705 is provided with the outputs of adder circuits 701 and 702.
  • Adder circuit 706 is provided with the outputs of adder circuits 703 and 704.
  • Adder circuit 707 is provided with the output of adder circuit 706 and with the quantity Ag- Adder circuit 708 is provided with the outputs of adder circuits 705 and 707.
  • the system 690 includes an exceptional -state mapping circuit 709 coupled to the output of adder tree 700 (i.e., the output of adder circuit 708) in order to complete the computation of A mod (2 n -l).
  • the mapping circuit 709 includes a control circuit 710 and a multiplexer 71 1.
  • the adder circuit output Z is supplied to a control circuit 710 and to multiplexer 71 1.
  • the control circuit 710 determines if the output Z equals (2 4 -l) and drives the control signal CNTL accordingly.
  • the output of the multiplexer 711 is the output of the system 690 and is equal to A mod (15).
  • adder tree 700 is similar to the structure of adder tree 200 depicted in Figure 2B.
  • system 690 includes the mapping circuit 709 coupled to the output of the adder tree 700.
  • the difference between the adder circuit V 4 and the adder circuit G 4 is the presence of a mapping circuit.
  • system 690 performs the mapping function once at the output, whereas adder tree 200 performs the mapping function in each adder circuit. Because, system 690 does not duplicate the mapping circuit, it occupies less silicon area and consumes less power than adder tree 200.
  • adder tree T' has the same structure of connections between adder circuit copies, but employs copies of adder circuit G n instead of copies of adder circuit V n .
  • a computer system may be configured to implement the computation of A mod (2 n -l) in software.
  • the notation "ceil(x)” denotes the ceiling function operating on the operand x.
  • the notation "A[v:u]” represents the extraction Of (V-U + I) consecutive bits from the quantity A, i.e., the bits starting at the u* bit position and ending at the v th bit position of A. The 0 th bit position designates the least significant bit of A.
  • the final value of the variable X represents A mod (2 n -l).
  • a system for computing ⁇ mod (2 n -l), where A is an m-bit quantity, where rn is an integer greater than or equal to two, where n is a positive integer less than or equal to m may include a plurality 801 of adder circuits AC as suggested in Figure 8.
  • Each of the adder circuits AC may be configured to operate on two n-bit operands in order to produce an n-bit output.
  • the plurality of adder circuits may be coupled to form a tree structure.
  • the quantity A is partitioned into a plurality of sections, where each of the sections includes up to n consecutive bits of the quantity A.
  • Each of the sections is supplied to exactly one of the adder circuits in order to determine one of the two n-bit input operands of that adder circuit. Note, however, this does not imply that each of the adder circuits necessarily receives exactly one section. For example, in the embodiment of Figure 7, observe that adder circuit 701 receives two sections, adder circuit 707 receives exactly one section, and adder circuit 708 receives zero sections.
  • Each of the adder circuits AC may include a first n-bit adder 601 and a second n-bit adder 602, e.g., as suggested in Figure 6.
  • the first n-bit adder may be configured to operate on the two n-bit operands in order to produce an intermediate n-bit result W.
  • the second n-bit adder may be configured to operate on the intermediate n-bit result W and on a carryout signal from the first n-bit adder in order to produce the n- bit output Z.
  • the output of the adder circuit 802 corresponding to a root of the tree structure may be used in a wide variety of ways.
  • output of the adder circuit 802 may be used to perform data interleaving or deinterleaving.
  • the output of the adder circuit 802 may be used to perform encryption ⁇ r decryption of data.
  • the system may also include a mapping circuit 805.
  • the mapping circuit 805 may be coupled to receive the output from an adder circuit
  • the adder circuit 802 may correspond to a root of the tree structure 801 ,
  • the mapping circuit 805 may be configured to operate on the output of adder circuit 802 in order to map a state 2 n -l to zero and to pass all other states of the adder circuit output Thus, the output of the mapping circuit 805 may equal the value A mod (2 n -l).
  • the value A mod (2 n -l ) may be used in a variety of ways. As suggested above, the value A mod (2 n -l) may be used for perform data interleaving or deinterleaving. Alternatively, the value A mod (2 n -l) may be used to perform data encryption or decryption.
  • the mapping circuit 805 may include a comparison unit and a multiplexer, e.g., as suggested by circuit 709 of Figure 7.
  • the comparison unit 710 may be configured to determine if the output of the adder circuit 802 is equal to 2 n -l and to assert a control signal CNTL in response determining that the adder circuit output is equal to 2 n -l.
  • the multiplexer 711 may be configured to select between the value zero and the adder circuit output based on the control signal.
  • n is a multiple of n, it may be advantageous for each of the sections to be of length n bits. If m is not a multiple of n, it may be desirable to partition the quantity
  • a into k floor(m/n) sections of length n and one section of length (m-kn).
  • the section containing the most significant bits of A may be the section of length (m-kn).
  • the number of adder circuits in the tree structure may equal (c-1).
  • the tree structure has a number of levels equal to the ceiling of the base-2 logarithm of the ceiling of m/n.
  • n is a positive integer in the range [2,32].
  • n is a power of two.
  • n rnay 2 4, 8,
  • a system for computing A mod (2 n -l), where A is an m-bit quantity, where m is an integer greater than or equal to two, where n is a positive integer less than or equal to m may include an adder circuit, e.g., as suggested in Figure 9.
  • the adder circuit 900 may be configured to operate on two n- bit inputs (X and Y) and to produce an n-bit output (Z).
  • the output Z of the adder circuit may be coupled to a first input (Y) of the two inputs.
  • the adder circuit 900 may include a first n-bit adder and a second n-bit adder, e.g., as suggested in Figure 5 or Figure 6.
  • the first n-bit adder may be configured to operate on the two n-bit operands (X and Y) in order to produce an intermediate n-bit result W.
  • the second n-bit adder may be configured to operate on the intermediate n- bit result W and on a carryout signal from the first n-bit adder in order to produce the n-bit output Z.
  • a plurality of sections of the quantity A may be sequentially presented to a second input (X) of the two inputs of adder circuit 900 in a plurality of cycles of the clock signal respectively.
  • Each of the sections may include up to n consecutive bits of the quantity A.
  • the modulo operation may require c cycles to complete
  • two sections may be presented to the adder circuit 900 in the first cycle, i.e., one section to the X input and one to the Y input. In succeeding cycles, sections are presented to the X input while the Y input is reserved for feedback from the output Z.
  • the modulo operation may be completed in (c-1) cycles.
  • the output of the adder circuit 900 after a last of the plurality of cycles may be used in a variety of ways.
  • the adder circuit output may be used to perform data interleaving or deinterleaving.
  • the adder circuit output may be used as part of a data encryption operation or a decryption operation .
  • the system may also include an extraction circuit configured to receive the m-bit quantity A, to extract the plurality of sections of the quantity A, and to supply the plurality of sections to the second input (X) in successive clock cycles respectively.
  • an extraction circuit configured to receive the m-bit quantity A, to extract the plurality of sections of the quantity A, and to supply the plurality of sections to the second input (X) in successive clock cycles respectively.
  • the extraction circuit are contemplated.
  • the extraction circuit may include a multiplexer, a register and a shift unit, e.g., as suggested in Figure 1C.
  • the multiplexer 51 may be configured to select between a first input port U and a second input port V, where the first input port U is coupled to receive the m-bit quantity A, where the second input port V is coupled to receive an output of the shift unit 53.
  • the register 52 may be coupled to an output of the multiplexer.
  • the shift unit may be coupled to an output of the register. The lowest n significant bits of the register output may be provided as output to the adder circuit 900.
  • the system also includes a mapping circuit configured to receive the n-bit output from the adder circuit 900, to operate on the adder circuit output to map a state 2 n -l to zero and to pass all other states of the adder circuit output. See for example, the mapping circuit 709 of Figure 7.
  • the output of the mapping circuit after a last of the plurality of cycles is equal to A mod (2 n -l).
  • the value A mod (2 1 M) may be used in a variety of ways.
  • the value A mod (2 a -l) may be used to perform data interleaving or deinterleaving.
  • the value A mod (2 n -l) may be used to perform data encryption or decryption.
  • the adder circuit 900 may itself include a mapping circuit, e.g., as illustrated by the mapping circuit 503 in the adder circuit V n of Figure
  • the mapping circuit may be configured to receive an n-bit result R generated by the second n-bit adder, to operate on the n-bit result R in order to obtain the n-bit output Z.
  • the process of operating on the n-bit result may include mapping a state 2 n -
  • the output of the adder circuit 900 is equal to A mod (2 n -l).
  • a method for computing A mod (2 n -l).
  • A is an m-bit quantity
  • m is an integer greater than or equal to two
  • n is a positive integer less than or equal to m
  • A may involve the following actions, as illustrated in Figure JOA.
  • the m-bit quantity A may be received (or generated by computation),
  • a section of the quantity A may be extracted, where the section includes up to n consecutive bits of the quantity A.
  • the section may be added to the value of a register, where the register is more than n bits in length.
  • the register value may be incremented in response to a determination that the register value is greater than 2 ⁇ -1 , where the increment operation is performed modulo 2 n .
  • a test may be performed to determine if all m bits of the quantity A have been consumed. If not, the method returns to 1012 for another repetition of the loop (including 1012, 1014 and 1016) on a next section of the quantity A. Thus, actions 1012, 1014 and 1016 may be repeated until the quantity A is exhausted.
  • the register value may be set equal to zero if the register value equals
  • the value A mod (2 n -l) may be used in any of a wide variety of ways.
  • the value A mod (2°- J ) may be used to compute a read address.
  • the read address may be used to read data from a memory medium (e.g., a data buffer) as part of an interleaving (or deinterleaving) operation.
  • a memory medium e.g., a data buffer
  • the data symbols may be written into an input buffer in sequential order and then read out from the input buffer in an interleaved order.
  • the read addresses for the interleaved order may be computed according to the following algorithm:
  • RdAddr f(A), where f is a bijection (i.e., one-to-one function) on the set ⁇ 0, 1, 2, ..., (N- 2), (N-l) ⁇ .
  • the compulation of f(A) may involve the computation of A mod (2 n -l). (See, e.g., section 3.1.3.1.8.1.1 of the following standard: "Physical Layer Standard for cdma2000 Spread Spectrum Systems", 3GPP2 C.S0002-D, Version 1.0, February 13, 2004.)
  • the interleaved block of data may be transmitted through a channel.
  • a receiver may then receive the interleaved block of data (possibly corrupted with noise) from the channel and perform a deinterleaving operation on the received data.
  • the deinterleaving operation may similarly involve repeated computation of A mod (2 n - 1) for different values of A.
  • the operations indicated in the method embodiment of Figure 1OA may be performed for each value in a sequence ⁇ AjJ of m-bit values in order to generate read addresses for a data interleaving (or deinterleaving) operation.
  • the value A mod (2 n -l) may be used as part of a data encryption (or decryption) operation on a block of data. Methods for performing encryption (or decryption) using the value A mod (2 n -l) are known in the field of encryption.
  • a transmitter may transmit the encrypted data block through a channel (or store the encrypted data on a storage medium).
  • a receiver may then receive the encrypted data block, possibly corrupted by noise, from the channel (or from the storage medium) and apply a decryption operation on the received block.
  • the decryption operation may similarly involve the computation of A mod (2"-I).
  • the value (or values) of A used in the encryption operation is (are) not necessarily the same as the value (or values) of A used in the decryption operation.
  • n is a positive integer in the range [2,32].
  • n is a power of two.
  • n may equal 2, 4,
  • the method may be enacted by a processor in response to the execution of program instructions stored in a memory.
  • the processor and memory are incorporated in a mobile phone.
  • a method for computing A mod (2 n -l), where A is an m-bit quantity, where m is an integer greater than or equal to two, where n is a positive integer less than or equal to m. may involve the following actions, as illustrated in Figure 1OB.
  • a number of addition operations may be performed in a sequence of stages.
  • Each of the stages may include performing a corresponding subset of the number of addition operations in a parallel fashion.
  • the subset of addition operations of each stage may receive corresponding input data and generate corresponding output data.
  • the input data of each stage except for a first of the stages, may include at least a portion of the output data of a previous one of the stages. (See Figures 2A-B, 3A-C, 4 and 7 for various examples of how the input data of a given stage may be supplied from one or more previous stages.)
  • the input data of the first stage may include a plurality of sections of the quantity A.
  • Each of the sections may include at most n consecutive bits of the quantity A. (If a section is n bits long, the section may be directly provided as an input operand to one of the first stage addition operations. If a section is less than n bits long, the section may be padded with zeros in order to form an input operand.)
  • Each addition operation of said number of addition operations may include performing a first n-bit addition and a second n-bit addition.
  • the first n-bit addition operates on two portions of the input data (of the stage to which the addition operation belongs).
  • the second n-bit addition operates on an intermediate result and a carryout produced by the first n-bit addition.
  • either the value zero or the output data from a last of the stages is selected depending on a comparison of the value (2 n -l) and the output data from the last stage.
  • the selected value equals A mod (2 n -] ).
  • the last stage includes only one addition operation, and thus, the output data of the last stage comprises the output operand of that one addition operation.
  • the method may include additional actions after performing actions 1050 and 1055, e.g., as illustrated in Figure H)C.
  • a read address may be generated using the selected value.
  • a data symbol may be read (i.e., accessed) from a data buffer using the read address.
  • the m-bit quantity A may be varied through a range of values, and actions 1050 through 1059 may be performed for each value of the m-bit quantity A (in the range of values) in order to implement an interleaving operation (or a deinterleaving operation) on data symbols stored in the data buffer.
  • the actions 1050 and 1055 may be performed as part of an encryption operation or a decryption operation on a block of data.
  • Figure 1 1 is a block diagram representing one set of embodiments of a computer system 1082.
  • the computer system 1082 may include at least one cental processing unit CPU 1160 (i.e., processor) which is coupled to a host bus 1162.
  • CPU 1160 i.e., processor
  • CPU 1160 may be any of various types, including, but not limited to, an x86 processor, a PowerPC processor, a CPU from the SPARC family of RISC processors, as well as others.
  • a memory medium typically including semiconductor RAM, and referred to herein as main memory 1166, may be coupled to the host bus 1162 by means of memory controller 1 164.
  • the main memory 1166 may store programs operable to implement any or all or any portion of the various method embodiments described herein.
  • the main memory may also store operating system software, as well as other software for operation of the computer system.
  • the host bus 1162 may couple to an expansion or input/output bus 1170 through a bus controller 1168 or bus bridge logic.
  • the expansion bus 1 170 may include slots for various devices such as a video card 1180, a hard drive 1182, storage devices 1190 (such as a CD-ROM drive, a tape drive, a floppy drive, etc.) and a network interface 1122.
  • the video card 1 ] 80 may couple to a display device such as a monitor, a projector, or a head mounted display.
  • the network interface 1122 (e.g., an Ethernet device) may be used to communicate with other computers through a network.
  • the computer system 1082 may also include one or more FQ devices 1 192 such as a mouse, a keyboard, one or more microphones, and one or more speakers, a touch sensitive pad, etc.
  • FQ devices 1 192 such as a mouse, a keyboard, one or more microphones, and one or more speakers, a touch sensitive pad, etc.
  • Embodiments of computer system 1082 targeted for use as a server computer may be more richly endowed with processor capacity (e.g., having multiple processors), memory capacity and network access bandwidth than embodiments targeted for use as a client computer.
  • the client computer may include the mouse, keyboard, speakers and video card (or graphics accelerator), whereas a server computer does not necessarily include these items.
  • a mod (2 n -l) in a sequential fashion using a single adder circuit or in a parallel fashion using an adder tree.
  • the present invention contemplates combinations of these embodiments where the value A mod (2 ⁇ -1) is computed partially in a sequential fashion and partially in a parallel fashion.
  • the c sections may be divided in groups, e.g.. groups of size at most (ni-1). The groups may be supplied to the adder tree in successive cycles.
  • the output of the adder tree may be coupled to one of the nr adder tree inputs.
  • the remaining (n[- 1 ) inputs may be configured to recei ve the (ni- 1 ) sections of each group.
  • Any of various logic implementations may be used in the adder circuits and/or the tree structures of the embodiments described above.
  • Any of the various method embodiments disclosed herein may be implemented in terms of program instructions.
  • the program instructions may be stored in (or on) any of various memory media.
  • a memory medium is a medium configured for the storage of information. Examples of memory media include various kinds of magnetic media (e.g., magnetic tape or magnetic disk); various kinds of optical media (e.g., CD- ROM); various kinds of semiconductor RAM and ROM; various media based on the storage of electrical charge or other physical quantities; etc.
  • various embodiments of a system including a memory and a processor are contemplated, where the memory is configured to store program instructions and the processor is configured to read and execute the program instructions from the memory.
  • the program instructions encode corresponding ones of the method embodiments described herein (or combinations thereof or portions thereof).
  • Various embodiments may further include receiving, sending or storing program instructions and/or data implemented in accordance with the foregoing description upon a computer-accessible medium.
  • a computer- accessible medium may include storage media or memory media such as magnetic or optical media, e.g., disk or CD-ROM, volatile or non-volatile media such as RAM (e.g. SDRAM, DDR SDRAM, RDRAM, SRAM, etc.), ROM, etc. as well as transmission media or signals such as electrical, electromagnetic, or digital signals, conveyed via a communication medium such as network and/or a wireless link.
  • RAM e.g. SDRAM, DDR SDRAM, RDRAM, SRAM, etc.
  • ROM etc.
  • transmission media or signals such as electrical, electromagnetic, or digital signals

Abstract

A system and method for computing A mod (2n-1), where A is an m bit quantity, where n is a positive integer, where m is greater than or equal to n. The quantity A may be partitioned into a plurality of sections, each being at most n bits long. The value A mod (2n-1) may be computed by adding the sections in mod(2n-1) fashion. This addition of the sections of A may be performed in a single clock cycle using an adder tree, or, sequentially in multiple clock cycles using a two-input adder circuit provided the output of the adder circuit is coupled to one of the two inputs. The computation A mod (2n-1) may be performed as a part of an interleaving/deinterleaving operation, or, as part of an encryption/decryption operation.

Description

COMPUTATION OF A MOD (2 N - 1)
Field of the Invention
[0001] The present invention relates generally to the field of fixed-point arithmetic realizations, more specifically, to systems and methods for computing the modulo operation corresponding to divisor (2n-l).
Description of the Related Art
[0002] As used herein the expression vlx mod r", where x is an integer and r is a positive integer, is defined as the nonnegative integer y. less than r, in the set {x-kr: ke Z}, where Z represents the set of integers. For example, 8 mod 5 equals 3. As another example, 101 mod 10 equals 1. When x is positive, '"x mod r" may be interpreted as the remainder resulting from the division of x by r.
[0003] There are many situations in which A mod (2n-l) needs to be computed, where
A is an m bit binary word, where in and n are positive integers. For example, A mod
(2n-l) needs to be computed when performing data interleaving or deinterleaving according to the CDMA2000 High Rate Packet Data Air Interface Specification,
3GPP2 C.S0024-A, Ver2.0, July 2005.
[0004] When m is less than n. A mod (2n-l) is simply A itself. Thus, in the case m<n, the computation of A mod (2n-l) is trivial.
[0005] When m is greater than or equal to n, the computation of A mod (2n-l) is nontrivial.
[0006] Re to Zimmeπnann discloses a method for the computation of X mod (2n-l) in the case where X is (n+1) bits in length, i.e., the case m=nϊ 1. See the paper entitled
"Efficient VLSI implementation of modulo (2" ± 1) addition and multiplication." published in the Proceedings of 14th IEEE Symposium on Computer Arithmetic,
1999. However, Zimmermann's method does not generalize to other values of m.
[0007] Thus, there exists a need for circuits, systems and methods for computing A mod (2n-l) in the case where m is greater than or equal to n. Summary of the Invention
[0008] In one set of embodiments, a system for computing A mod (2n-l ), where A is an m-bit quantity, where m is an integer greater than or equal to two, where n is a positive integer less than or equal to m, may include a plurality of adder circuits. Each of the adder circuits may be configured to operate on two n-bit operands in order to produce an n-bit output The plurality of adder circuits may be coupled to form a tree structure. The quantity A is partitioned into a plurality of sections, where each of the sections includes up to n consecutive bits of the quantity A. Each of the sections may be supplied to exactly one of the adder circuits to determine one of the two n-bit input operands of that adder circuit.
[0009] Each of the adder circuits may include: a first n-bit adder configured to operate on the two n-bit operands in order to produce an intermediate n-bit result; and a second n-bit adder configured to operate on the intermediate n-bit result and on a carryout signal from the first n-bit adder in order to produce the n-bit output. [0010] In another set of embodiments, a system for computing A mod (2n-l). where A is an m-bit quantity, where m is an integer greater than or equal to two, where n is a positive integer less than or equal to m, may include an adder circuit. The adder circuit may be configured to operate on two n-bit inputs and to produce an n-bit output. The output of the adder circuit may be coupled to a first of the two inputs. [0011] The adder circuit may include: a first n-bit adder configured to operate on the two n-bit operands in order to produce an intermediate n-bit result; and a second n-bit adder configured to operate on the intermediate n-bit result and on a carryout signal from the first n-bit adder in order to produce the n-bit output.
[0012] A plurality of sections of the quantity A may be presented to a second of the two inputs in a plurality of cycles (of a clock signal) respectively. Each of the sections may include up to n consecutive bits of the quantity A. [0013] In yet another set of embodiments, a method for computing A mod (2n-l ), where A is an m-bit quantity, where m is an integer greater than or equal to two, where n is a positive integer less than or equal to m, may involve: (a) receiving the m-bit quantity A; (b) extracting a section of the quantity A, where the section includes up to n consecutive bits of the quantity Λ;
(c) adding the section to a value of a register;
(d) adding one to the register value if the register value is greater than 2n- 1 , where said adding of one is performed modulo 2n;
(e) repeating (b), (c) and (d) until the quantity A is exhausted; and
(f) setting the register value equal to 7ero if the register value equals 2n-l . [0014] In yet another set of embodiments, a method for computing A mod (2n-l), where A is an m-bit quantity, where m is an integer greater than or equal to two, where n is a positive integer less than or equal to m, may involve performing a number of addition operations in a sequence of stages. Each of the stages may include performing a corresponding subset of the number of addition operations in a parallel fashion. The subset of addition operations of each stage may receive corresponding input data and generate corresponding output data. The input data of each stage, except for a first of the stages, may include at least a portion of the output data of a previous one of the stages. The input data of the first stage may include a plurality of sections of the quantity A. Each of the sections may include at most n consecutive bits of the quantity A. Each of the number of addition operations may include performing a first n-bit addition and a second n-bit addition, where the second n-bit addition operates on an intermediate result and a carry out produced by the first n-bit addition.
[0015] The method may further comprise selecting either the value zero or the output data from a last of the stages depending on a comparison of the value (2n-l) and the output data from the last stage, where the selected value equals A mod f2n-l). [0016] Any of the various method embodiments disclosed herein (or any combinations thereof or portions thereof) may be implemented in terms of program instructions. The program instructions may be stored in (or on) any of various memory media. A memory medium is a medium configured for the storage of information. Examples of memory media include various kinds of magnetic media (e.g.. magnetic tape, magnetic disk, magnetic strips, and magnetic film); various kinds of optical media (e.g., CD-ROM); various kinds of semiconductor RAM and ROM; various media based on the storage of electrical charge or other physical quantities; etc.
[0017] Furthermore, various embodiments of a system including a memory and a processor are contemplated, where the memory is configured to store program instructions and the processor is configured to read and execute the program instructions from the memory. In various embodiments, the program instructions encode corresponding ones of the method embodiments described herein (or combinations thereof or portions thereof).
Brief Description of the Drawings
[0018] The following detailed description makes reference to the accompanying drawings, which are now briefly described.
[0019] Figure IA illustrates an adder circuit employing feedback in order to compute the value A mod (2n-l) in a number of clock cycles.
[0020] Figure IB illustrates one embodiment of a system configured to extract sections of an m-bit quantity A and to operate on the sections in order to compute A mod (2n-l) in a number of clock cycles.
[0021] Figure 1C one embodiment of a circuit configured to extract successive sections of the quantity A.
[0022] Figure 2A illustrates one embodiment of an adder tree configured to compute
A mod (2π- 1) in the case m=35 and n=4.
[0023] Figure 2B illustrates another embodiment of an adder tree configured to compute Λ mod (2n-l) in the case m=35 and n=4.
[0024] Figure 3Λ illustrates yet another embodiment of an adder tree configured to compute A mod (2n-l ) in the case m=35 and n=4,
[0025] Figure 3B illustrates one embodiment of an adder tree configured to compute
A mod (2n-l) in the case m=31 and n=4.
[0026] Figure 3C illustrates one embodiment of an adder tree configured to compute
A mod (2n-l) in the case m=21 and n=8.
[0027] Figure 3D illustrates one embodiment of an adder tree configured to compute
A mod (2n-l) in the case m=l 1 and n=6.
[0028] Figure 4 illustrates one embodiment of an adder tree configured to compute A mod (2n-l) in the case m=15 and n=3.
[0029] Figure 5 illustrates one embodiment of an adder circuit Vn configured to implement the computation (X+ Y) mod(2n-l) on two n bit operands X and Y.
[0030] Figure 6 illustrates one embodiment of a circuit Gn including two n-bit adders.
[0031] Figure 7 illustrates one embodiment of an adder tree employing copies of the circuit Gn in the case n=4. [0032] Figure 8 illustrates one embodiment of a system for computing A mod (2n-l), the system including an adder tree structure and a mapping circuit. [0033] Figure 9 illustrates one embodiment of a system for computing Λ mod (2n-l) hi a number of computational cycles using feedback.
[0034] Figure 1OA illustrates one embodiment of a method (e.g., a computer- implemented method) for computing A mod (2n-l) in a sequential fashion. [0035] Figure 1OB illustrates one embodiment of a method for computing A mod (2n- 1) in a plurality of stages, each including a number of parallel addition operations. [0036] Figure IOC illustrates one embodiment of a method for accessing a data symbol from memory as part of an interleaving operation or deinterleaving operation. [0037] Figure 11 illustrates one embodiment of a computer system for computing A mod (2n-l ) on an m bit quantity A.
[0038] While the invention is described herein by way of example for several embodiments and illustrative drawings, those skilled in the art will recognize that the invention is not limited to the embodiments or drawings described. It should be understood, that the drawings and detailed description thereto are not intended to limit the invention to the particular form disclosed, but on the contrary, the intention is to cover all modifications, equivalents and alternatives falling within the spirit and scope of the present invention as defined by the appended claims. The headings used herein are for organizational purposes only and are not meant to be used to limit the scope of the description or the claims. As used throughout this specification, the word "may" is used in a permissive sense (i.e., in the sense of "having the potential to"), rather than in the mandatory sense (i.e., in the sense of "must"). Furthermore, the phrase "A includes B" is used to mean 'A includes B. but is not limited to B".
Detailed Description of the Invention
[0039] Let A<m> denote an m-bit binary word, where m is an integer greater than or equal to two.
[0040] Let n be a positive integer less than or equal to m.
[0041] Let k =
Figure imgf000009_0001
ln , where \_x\ denotes the floor of x, i.e., the greatest integer which is less than or equal to x, In other words, k is the result of dividing m by n and then rounding down to the nearest integer.
[0042] Observe that the m-bit word A<m> can be represented as a concatenation of k consecutive n-bit sections and a terminal section having (m-kn) bits:
A < m > = A1 < m - kn > Ak_ < n > Ak_2 < n > . , . A1 < n > A0 < n > , (1)
[0043] In general, the notation X<r> is meant to indicate an r-bit binary word X. [0044] The value of the binary word A can be expressed in terms of the values of the sections as follows:
A = i, 2 i- Ak_{ 2(k-ϊ)n + Λt_? 2(i-2)" 4- . . . t- A12" - A6 . (2)
[0045] It is a basic mathematical fact that 2β mod (2n- 1) = 1. Furthermore,
T mod (2n- I) = I where j is any non-negative integer. [0046] Thus, it follows that
A mod(2" - 1) = ( 4 + Ak_x 4- AL_2 + . . . + A^ A0) mod(2" - 1) . (3)
[0047] Therefore, given an adder circuit Vn 10 that implements the compulation X4-Y mod (2n-l) on two n-bit quantities X and Y to produce an n-bit output Z, the computation of A modulo (21M) may be implemented in a sequential fashion as suggested by Figure IA. The quantities Ao, Ai, A2, ..., Ak i, A^ may be supplied to the X input of the adder circuit Vn 10 in successive cycles of the clock signal CLK. The output 2 of the adder circuit Vn 10 may be fed back to the input Y so that the adder circuit Vn 10 implements the iterative computation:
ZJ = A^ ZJ i mod (2n-l) (4) for j=0, 1. 2, ... , k. The output Zk from the last cycle represents A mod (2n-l). Because addition operation (based on any modulus) is both commutative and associative, the order of presentation of the quantities Ao, Ai, A2, ..., Ak 1, A^ to the adder circuit Vn 10 does not matter so far as the final output is concerned. [0048] In some embodiments, a section extraction circuit SEC 50 may be provided to extract the quantities Ao, Ai, A2, ..., Ak-i, A^ from the binary word A and to present the quantities Ao, Ai, A2, ..., AU , A^ to the adder circuit Vn in successive clock cycles, e.g., as suggested in Figure I B.
[0049] The section extraction circuit SEC 50 may include a multiplexer 51, an m-bit register 52, a shift unit 53 and a control unit 54 as illustrated in Figure 1C. In a first clock cycle, the multiplexer 51 may initially select the m-bit binary word A and forward the binary word A to the m-bit register 52. Register 52 receives and stores the binary word A. The m-bit output of the register 52 is provided to the shift unit 53. The least significant n bits of the register output may be interpreted as the output of the section extraction unit SEC. The shift unit 53 receives the m-bit output of the register 52 and shifts the register output by n-bits to the right in order to generate a shifted value. In a second clock cycle, the control unit 54 directs multiplexer 51 to select the shifted value from the shift unit 53. Thus, the shifted value gets stored in register 52 and gets shifted again by shift unit 53. In a third clock cycle, the control unit 54 directs multiplexer 51 to select the doubly shifted value. In every clock cycle after the first clock cycle the control unit 54 may direct the multiplexer to select the output of the shift unit Therefore, in successive clock cycles, successive ones of the sections Ao, Ai, A2, ..., An, A^ will appear at the output of the section extraction unit SEC 50. The control unit 54 may receive the clock signal CLK and control the selection action of the multiplexer 51, the storage action of the register 52, and the shifting action of the shift unit 53. For example, the control unit may induce the register 52 to capture data on rising edges of the clock CLK and induce the shift unit
53 to perform the shifting action on falling edges of the clock CLK. The control unit
54 may reinitialize itself, in anticipation of the next binary word A to be processed, in response to the assertion of an initialization signal TNIT.
[0050] If nα is a multiple of n, the value (m-kn) equals zero, and thus, the quantity A^ is vacuous. Therefore, in this case, only the quantities Ao, Ai, Aj, ..., A^ 1 need be presented to the adder circuit Vn, and the computation of A mod (2n-l) may be completed in k computational cycles.
[0051] In one set of embodiments, the computation of A modulo (21M) may be implemented, e.g., in one clock cycle, by an adder tree formed from copies of the adder circuit Vn. Figure 2 A illustrates one embodiment of an adder tree 100 configured for the case m=35 and n=4. The adder tree 100 has four stages including eight copies of the adder circuit V4. In the first stage, adder circuits 101 , 102, 103 and
104 each receive a corresponding pair of the 4-bit quantities Ao, Ai, A2, ..., A? The 4-bit outputs of these adder circuits are fed to adder circuits 105 and 106 of the second stage. In particular, adder circuits 101 and 102 feed adder circuit 105, while adder circuits 103 and 104 feed adder circuit 106. The 4-bit outputs of adder circuits
105 and 106 feed adder circuit 107 of the third stage. The adder circuit 108 of the fourth stage receives the 4-bit output of adder circuit 107 and also receives the 3 -bit quantity Ag, the only quantity that didn't get consumed in the first stage. The 4-bit output of adder circuit 108 represents the result A mod (2 -1), i.e., A mod 15. [0052] In general, the number c of inputs to the adder tree is given by: c = \ m l n , where [^ denotes the ceiling of x. Furthermore, the number nL of levels in the adder tree is given by the expressions:
Figure imgf000011_0001
c
In other words, the adder tree depth ni, equals the ceiling of the base-2 logarithm of the ceiling of vain. For example, in the case illustrated in Figure 2A, m=35 and n=4.
Thus, c=9, d=3.17 and nL=4.
In general, whenever the number c is not even, one of the c quantities supplied as input to the adder tree will remain unconsumed in the first stage. This quantity is referred to herein as the "first stage remainder"'. In the adder tree 100 of Figure 2A, the quantity A% is the first stage remainder.
[0053] It is not essential that the consumption of the first- stage remainder be deferred until the last stage. For example, Figure 2B illustrates an embodiment of an adder tree 200 where the first-stage remainder (quantity Ag) is consumed by an adder circuit 207 in the third stage, Li the first two stages, the adder tree 200 has a structure similar to the structure of the adder tree 100. The quantity Ag and the output of adder circuit 106 are fed to adder circuit 207. The outputs of adder circuits 105 and 207 are fed to adder circuit 208.
[0054] Moreover, it is not essential that the last quantity (Ag in the examples above) be the first- stage remainder. In general, any of the quantities Ao, Ai, A; .., A0 1 can be the first-stage remainder. For example, Figure 3 A illustrates an embodiment of an adder tree 300 where the quantity AQ is the first-stage remainder. In the first stage, each of adder circuits 301, 302, 303 and 304 receive a corresponding pair of the quantities Ai3 Ai, A3, ..., Ag. Adder circuit 305 of the second stage is supplied with quantity Ao and the output of adder circuit 301 from the first stage. The outputs of adder circuits 305 and 306 are supplied to adder circuit 307. The outputs of adder circuit 302 and 307 are fed to adder circuit 308.
[0055] Furthermore, when c is even, there need not be a first-stage remainder, i.e., all the quantities may be consumed in the first stage. For example, Figure 3B illustrates an embodiment of an adder tree 350 configured for the case m=31 and n=4. Because c=ceiling(m/n)=8, each of the quantities AQ, AI, Az, A^, ..., A7 may be consumed in the first stage. Each of the adder circuits 351, 352, 353 and 354 receives a corresponding pair of the quantities Ao, Ai, A2, Aj, ..., A7. Adder circuit 355 receives the outputs of adder circuits 351 and 352. Adder circuit 356 receives the outputs of adder circuits 353 and 354. Adder circuit 357 receives the outputs of adder circuits 355 and 356.
[0056] In some embodiments, an adder tree may include only two copies of the adder circuit Vn. For example, Figure 3C illustrates an embodiment of an adder tree 360 configured for the case rn=21 and n=8. Adder tree 360 includes adder circuits 36] and 362. The adder circuit 361 receives the 8 -bit quantities Ao and Ai. The adder circuit 362 receives the 8 -bit output of the adder circuit 361 and also receives the 5 -bit quantity A2.
[0057] In some embodiments, an adder tree may include only one copy of the adder circuit Vn. For example, Figure 3D illustrates an embodiment of an adder tree configured for the case m=l ] and n=6, having only one adder circuit 370. Adder circuit 370 receives the quantities Ao and A1.
[0058] In the case that m is a multiple of n, the quantity Ai is vacuous since (m-kn) equals zero. Thus, expressions (1) and (3) reduce to:
A < m > - Ak_λ < n > Ak_2 < n > . . . A1 < n > A0 < n > , (5)
A mod(T - 1) = (A-i + Ak_2 + , , . + A1 + A0) mod(2B - 1) , (6) i.e., the vacuous quantity Ai is simply omitted. For example, Figure 4 illustrates an embodiment of an adder tree 400 configured for the case m=15 and n=3. Adder circuit 401 receives quantities Ao and Ai. Adder circuit 402 receives the quantities A3 and A4. Adder circuit receives the output of adder circuit 401 and the quantity A2. Adder circuit 404 receives the outputs of adder circuits 402 and 403. [0059] A wide variety of embodiments of adder trees consistent with expression (3), or with expression (6) in the case where m is a multiple of n, will be apparent to the reader in light of the various examples given herein.
[0060] As defined above, the adder circuit Vn implements the computation (X+Y) mod(2Η-l) on two n bit operands X and Y to produce an n-bit output Z. The adder circuit Vn may be realized as illustrated in Figure 5. The adder circuit Vn may include two n-bit adders 501 and 502. Each n-bit adder is configured to operate on two n-bit operands to produce an n-bit output, using wrap as the overflow operation. The n-bit operands X and Y are supplied to the adder 501. The output W<n> of the adder 501 may be supplied to the adder 502. Furthermore, the carryout bit from the adder 501 may be supplied to the adder 502. The output R<n> from the adder 502 is supplied to a circuit 503 for selectively mapping the state (2n-l) to zero and for passing all other states of the output R. Thus, the adder circuit Vn reports the result (X l Y) mod (2n-l). The circuit 503 may include a comparison unit 504 and a multiplexer 505. The comparison unit 504 may determine if the output R equals 2n-l and asserts the control signal CNTL if so. The control signal CNTL may be coupled to the select input of the multiplexer 505. If the control signal is asserted, the multiplexer 505 selects the "1" input which is tied to zero. If the control signal is not asserted, the multiplexer 505 selects the "0" input which is coupled to the output R of the adder 502. Thus, the circuit 503 passes all states of the output R except for the state R=2n-1; this exceptional state is mapped to zero. (The circuit 503 may be referred to herein as an exceptional-state mapping circuit or simply as a mapping circuit.) The output Z of the multiplexer 505 is the output of the adder circuit Vn.
[0061] Thus, the adder circuit Vn generates the output Z according to the relations: W < n > = (X t- Y) mod 2" (7) f W if X - Y < 2"
R < n > H (8)
[ (W -r l) if X ±Y > 2"
= (ψ -^ carry-out mod 2" (9) fo if R = 2" - I
Z < n > =\ J , (10)
[J? otherwise
[0062] In some embodiments, systems for computing A mod (2n-l) may be configured using copies of an adder circuit Gn as illustrated in Figure 6. Similar to the adder circuit Vn, the adder circuit Gr, includes two n-bit adders 601 and 602. However, in contrast to the adder circuit Vn, the adder circuit Gn does not include an exceptional-state mapping circuit such as circuit 503. The adder 601 receives the n-bit operands X and Y and produces an n-bit output W. The output W and the carryout signal from the adder 601 are provided to the adder 602. The adder 602 generates the output Z. Thus, the adder circuit Gn generates the output Z according to the relations: W < n > = (X T Y) mod 2" (11)
7. < n > - \ W if K + Y < r (12)
[ (W + \) if X + Y ≥ 2"
= (If - carryout mod 2" . (13)
[0063] Figure 7 illustrates one embodiment of a system 690 for computing A mod (2n-l ) including an adder tree 700. Adder tree 700 is configured using copies of adder circuit Gn instead of copies of adder circuit Vn. The adder tree 700 is configured for the case m=35 and n=4. Each of the adder circuits 701. 702, 703 and 704 receive a corresponding pair of the quantities Ao, A1, A2 ..., A7. Adder circuit 705 is provided with the outputs of adder circuits 701 and 702. Adder circuit 706 is provided with the outputs of adder circuits 703 and 704. Adder circuit 707 is provided with the output of adder circuit 706 and with the quantity Ag- Adder circuit 708 is provided with the outputs of adder circuits 705 and 707.
[0064] Note that the system 690 includes an exceptional -state mapping circuit 709 coupled to the output of adder tree 700 (i.e., the output of adder circuit 708) in order to complete the computation of A mod (2n-l). The mapping circuit 709 includes a control circuit 710 and a multiplexer 71 1. The adder circuit output Z is supplied to a control circuit 710 and to multiplexer 71 1. The control circuit 710 determines if the output Z equals (24-l) and drives the control signal CNTL accordingly. Thus, the multiplexer 711 selects the value zero when Z=24-l and selects the value Z otherwise. The output of the multiplexer 711 is the output of the system 690 and is equal to A mod (15).
[0065] The reader will observe that the structure of adder tree 700 is similar to the structure of adder tree 200 depicted in Figure 2B. To arrive at adder tree 700, one can imagine replacing the adder circuits V4 of adder tree 200 with adder circuits G4. However, to complete the computation of A mod (2n-l), system 690 includes the mapping circuit 709 coupled to the output of the adder tree 700. Recall that the difference between the adder circuit V4 and the adder circuit G4 is the presence of a mapping circuit. Thus, system 690 performs the mapping function once at the output, whereas adder tree 200 performs the mapping function in each adder circuit. Because, system 690 does not duplicate the mapping circuit, it occupies less silicon area and consumes less power than adder tree 200.
[0066] The reader should note that any system embodiment of the kind described above in connection with Figures 2A-B, 3A-D and 4, i.e., having an adder tree T composed of copies of adder circuit Vn, may be alternatively realized by a structurally analogous adder tree T' and a mapping circuit coupled to the output of the adder tree T1. where adder tree T' has the same structure of connections between adder circuit copies, but employs copies of adder circuit Gn instead of copies of adder circuit Vn. [0067] In some embodiments, a computer system may be configured to implement the computation of A mod (2n-l) in software. For example, a computer program may include instructions implementing the operations suggested by the following pseudo code: X=O;
For (1=0, Kceil(m/n), Ii-+) { p = min ( n*(m)-l , (m-l) );
Section=A[ p : n*I ];
X=Section+X;
If (X>2n-1) X=(X 1) mod (2n);
}
If(X==2n-l) X=O.
[0068] The notation "ceil(x)" denotes the ceiling function operating on the operand x. The notation "A[v:u]" represents the extraction Of (V-U+I) consecutive bits from the quantity A, i.e., the bits starting at the u* bit position and ending at the vth bit position of A. The 0th bit position designates the least significant bit of A. The final value of the variable X represents A mod (2n-l).
[0069] In one set of embodiments, a system for computing Λ mod (2n-l), where A is an m-bit quantity, where rn is an integer greater than or equal to two, where n is a positive integer less than or equal to m, may include a plurality 801 of adder circuits AC as suggested in Figure 8. Each of the adder circuits AC may be configured to operate on two n-bit operands in order to produce an n-bit output. The plurality of adder circuits may be coupled to form a tree structure. The quantity A is partitioned into a plurality of sections, where each of the sections includes up to n consecutive bits of the quantity A. Each of the sections is supplied to exactly one of the adder circuits in order to determine one of the two n-bit input operands of that adder circuit. Note, however, this does not imply that each of the adder circuits necessarily receives exactly one section. For example, in the embodiment of Figure 7, observe that adder circuit 701 receives two sections, adder circuit 707 receives exactly one section, and adder circuit 708 receives zero sections.
[0070] Each of the adder circuits AC may include a first n-bit adder 601 and a second n-bit adder 602, e.g., as suggested in Figure 6. The first n-bit adder may be configured to operate on the two n-bit operands in order to produce an intermediate n-bit result W. The second n-bit adder may be configured to operate on the intermediate n-bit result W and on a carryout signal from the first n-bit adder in order to produce the n- bit output Z.
[0071] The output of the adder circuit 802 corresponding to a root of the tree structure may be used in a wide variety of ways. For example, output of the adder circuit 802 may be used to perform data interleaving or deinterleaving. (See the more detailed description of interleaving/deinterleaving given below in connection with Figure
1OA.) As another example, the output of the adder circuit 802 may be used to perform encryption υr decryption of data.
[0072] In some embodiments, the system may also include a mapping circuit 805.
The mapping circuit 805 may be coupled to receive the output from an adder circuit
802 of the tree structure 801. The adder circuit 802 may correspond to a root of the tree structure 801 , The mapping circuit 805 may be configured to operate on the output of adder circuit 802 in order to map a state 2n-l to zero and to pass all other states of the adder circuit output Thus, the output of the mapping circuit 805 may equal the value A mod (2n-l).
[0073] The value A mod (2n-l ) may be used in a variety of ways. As suggested above, the value A mod (2n-l) may be used for perform data interleaving or deinterleaving. Alternatively, the value A mod (2n-l) may be used to perform data encryption or decryption.
[0074] Data flows through the tree structure from the section inputs towards the root adder circuit 802.
[0075] Various embodiments of the mapping circuit 805 are contemplated. In one embodiment, the mapping circuit may include a comparison unit and a multiplexer, e.g., as suggested by circuit 709 of Figure 7. The comparison unit 710 may be configured to determine if the output of the adder circuit 802 is equal to 2n-l and to assert a control signal CNTL in response determining that the adder circuit output is equal to 2n-l. The multiplexer 711 may be configured to select between the value zero and the adder circuit output based on the control signal.
[0076] If m is a multiple of n, it may be advantageous for each of the sections to be of length n bits. If m is not a multiple of n, it may be desirable to partition the quantity
A into k=floor(m/n) sections of length n and one section of length (m-kn). For example, the section containing the most significant bits of A may be the section of length (m-kn).
[0077] In some embodiments, the number of sections into which the quantity A is partitioned equals c=ceilingfm/n). The number of adder circuits in the tree structure may equal (c-1).
[0078] In some embodiments, the tree structure has a number of levels equal to the ceiling of the base-2 logarithm of the ceiling of m/n.
[0079] In some embodiments, n is a positive integer in the range [2,32].
[0080] In some embodiments, n is a power of two. For example, n rnay equal 2, 4, 8,
16, 32, etc.
[0081] In one set of embodiments, a system for computing A mod (2n-l), where A is an m-bit quantity, where m is an integer greater than or equal to two, where n is a positive integer less than or equal to m, may include an adder circuit, e.g., as suggested in Figure 9. The adder circuit 900 may be configured to operate on two n- bit inputs (X and Y) and to produce an n-bit output (Z). The output Z of the adder circuit may be coupled to a first input (Y) of the two inputs.
[0082] The adder circuit 900 may include a first n-bit adder and a second n-bit adder, e.g., as suggested in Figure 5 or Figure 6. The first n-bit adder may be configured to operate on the two n-bit operands (X and Y) in order to produce an intermediate n-bit result W. The second n-bit adder may be configured to operate on the intermediate n- bit result W and on a carryout signal from the first n-bit adder in order to produce the n-bit output Z.
[0083] A plurality of sections of the quantity A may be sequentially presented to a second input (X) of the two inputs of adder circuit 900 in a plurality of cycles of the clock signal respectively. Each of the sections may include up to n consecutive bits of the quantity A.
[0084] In some embodiments, the number of sections into which the quantity A is partitioned equals c=ceiling(m/n). Thus, the modulo operation may require c cycles to complete,
[0085] In one alternative embodiment, two sections may be presented to the adder circuit 900 in the first cycle, i.e., one section to the X input and one to the Y input. In succeeding cycles, sections are presented to the X input while the Y input is reserved for feedback from the output Z. In this alternative embodiment, the modulo operation may be completed in (c-1) cycles.
[0086] The output of the adder circuit 900 after a last of the plurality of cycles may be used in a variety of ways. For example, the adder circuit output may be used to perform data interleaving or deinterleaving. Alternatively, the adder circuit output may be used as part of a data encryption operation or a decryption operation . [0087] In some embodiments, the system may also include an extraction circuit configured to receive the m-bit quantity A, to extract the plurality of sections of the quantity A, and to supply the plurality of sections to the second input (X) in successive clock cycles respectively. Various embodiments of the extraction circuit are contemplated. In one embodiment, the extraction circuit may include a multiplexer, a register and a shift unit, e.g., as suggested in Figure 1C. The multiplexer 51 may be configured to select between a first input port U and a second input port V, where the first input port U is coupled to receive the m-bit quantity A, where the second input port V is coupled to receive an output of the shift unit 53. The register 52 may be coupled to an output of the multiplexer. The shift unit may be coupled to an output of the register. The lowest n significant bits of the register output may be provided as output to the adder circuit 900.
[0088] The quantity A may be partitioned into sections, each having at most n bits, in a wide variety of ways. For example, if m is a multiple of n. it may be advantageous for each of the sections to be of length n bits. If m is not a multiple of n, it may be desirable to partition the quantity A into k=fioor(m/n) sections of length n and one section of length (m-kn).
[0089] In some embodiments, the system also includes a mapping circuit configured to receive the n-bit output from the adder circuit 900, to operate on the adder circuit output to map a state 2n-l to zero and to pass all other states of the adder circuit output. See for example, the mapping circuit 709 of Figure 7. The output of the mapping circuit after a last of the plurality of cycles is equal to A mod (2n-l). As suggested above, the value A mod (21M) may be used in a variety of ways. For example, the value A mod (2a-l) may be used to perform data interleaving or deinterleaving. Alternatively, the value A mod (2n-l) may be used to perform data encryption or decryption.
[0090] In alternative embodiments, the adder circuit 900 may itself include a mapping circuit, e.g., as illustrated by the mapping circuit 503 in the adder circuit Vn of Figure
5. The mapping circuit may be configured to receive an n-bit result R generated by the second n-bit adder, to operate on the n-bit result R in order to obtain the n-bit output Z. The process of operating on the n-bit result may include mapping a state 2n-
1 to zero and passing all other states of the result R. Thus, for this set of alternative embodiments, the output of the adder circuit 900 is equal to A mod (2n-l).
[0091] In one set of embodiments, a method (e.g., a computer-implemented method) for computing A mod (2n-l). where A is an m-bit quantity, m is an integer greater than or equal to two, and n is a positive integer less than or equal to m, may involve the following actions, as illustrated in Figure JOA.
[0092] At 1010, the m-bit quantity A may be received (or generated by computation),
[0093] At 1012, a section of the quantity A may be extracted, where the section includes up to n consecutive bits of the quantity A.
[0094] At 1014, the section may be added to the value of a register, where the register is more than n bits in length.
[0095] At 1016, the register value may be incremented in response to a determination that the register value is greater than 2^-1 , where the increment operation is performed modulo 2n.
[0096] At 1018, a test may be performed to determine if all m bits of the quantity A have been consumed. If not, the method returns to 1012 for another repetition of the loop (including 1012, 1014 and 1016) on a next section of the quantity A. Thus, actions 1012, 1014 and 1016 may be repeated until the quantity A is exhausted.
[0097] If the test determines that all m bits of the quantity A have been consumed, the method proceeds with 1020.
[0098] At 1020, the register value may be set equal to zero if the register value equals
2n-l. After 1020, the register value equals A mod (2n-l),
[0099] The value A mod (2n-l) may be used in any of a wide variety of ways. In one embodiment, the value A mod (2°- J ) may be used to compute a read address. The read address may used to read data from a memory medium (e.g., a data buffer) as part of an interleaving (or deinterleaving) operation. For example, in order to interleave a block of N data symbols, the data symbols may be written into an input buffer in sequential order and then read out from the input buffer in an interleaved order. Iu one embodiment, the read addresses for the interleaved order may be computed according to the following algorithm:
For (A=O, A<N, A++) RdAddr=f(A), where f is a bijection (i.e., one-to-one function) on the set {0, 1, 2, ..., (N- 2), (N-l)}. The compulation of f(A) may involve the computation of A mod (2n-l). (See, e.g., section 3.1.3.1.8.1.1 of the following standard: "Physical Layer Standard for cdma2000 Spread Spectrum Systems", 3GPP2 C.S0002-D, Version 1.0, February 13, 2004.) The interleaved block of data may be transmitted through a channel. A receiver may then receive the interleaved block of data (possibly corrupted with noise) from the channel and perform a deinterleaving operation on the received data. The deinterleaving operation may similarly involve repeated computation of A mod (2n- 1) for different values of A.
[00100] Thus, the operations indicated in the method embodiment of Figure 1OA may be performed for each value in a sequence {AjJ of m-bit values in order to generate read addresses for a data interleaving (or deinterleaving) operation. [00101] In another embodiment, the value A mod (2n-l) may be used as part of a data encryption (or decryption) operation on a block of data. Methods for performing encryption (or decryption) using the value A mod (2n-l) are known in the field of encryption. A transmitter may transmit the encrypted data block through a channel (or store the encrypted data on a storage medium). A receiver may then receive the encrypted data block, possibly corrupted by noise, from the channel (or from the storage medium) and apply a decryption operation on the received block. The decryption operation may similarly involve the computation of A mod (2"-I). Note that the value (or values) of A used in the encryption operation is (are) not necessarily the same as the value (or values) of A used in the decryption operation. [00102] The quantity A may be partitioned into sections, each having at most n bits, in a wide variety of ways. For example, if m is a multiple of n, it may be advantageous for each of the sections to be of length n bits. Tf m is not a multiple of n, it may be desirable to partition the quantity A into k=floor(m/n) sections of length n and one section of length (m-kn).
[00103] In some embodiments, n is a positive integer in the range [2,32].
[00104] In some embodiments, n is a power of two. For example, n may equal 2, 4,
8, 16, 32, 64, 128, etc.
[00105] In various embodiments, the method may be enacted by a processor in response to the execution of program instructions stored in a memory. Tn one embodiment, the processor and memory are incorporated in a mobile phone.
[00106] In yet another set of embodiments, a method for computing A mod (2n-l), where A is an m-bit quantity, where m is an integer greater than or equal to two, where n is a positive integer less than or equal to m. may involve the following actions, as illustrated in Figure 1OB.
[00107] As illustrated at 1050, a number of addition operations may be performed in a sequence of stages. Each of the stages may include performing a corresponding subset of the number of addition operations in a parallel fashion. The subset of addition operations of each stage may receive corresponding input data and generate corresponding output data. The input data of each stage, except for a first of the stages, may include at least a portion of the output data of a previous one of the stages. (See Figures 2A-B, 3A-C, 4 and 7 for various examples of how the input data of a given stage may be supplied from one or more previous stages.)
[00108] The input data of the first stage may include a plurality of sections of the quantity A. Each of the sections may include at most n consecutive bits of the quantity A. (If a section is n bits long, the section may be directly provided as an input operand to one of the first stage addition operations. If a section is less than n bits long, the section may be padded with zeros in order to form an input operand.)
[00109] Each addition operation of said number of addition operations may include performing a first n-bit addition and a second n-bit addition. The first n-bit addition operates on two portions of the input data (of the stage to which the addition operation belongs). The second n-bit addition operates on an intermediate result and a carryout produced by the first n-bit addition. [00110] As illustrated at ] 055, either the value zero or the output data from a last of the stages is selected depending on a comparison of the value (2n-l) and the output data from the last stage. The selected value equals A mod (2n-] ).
[00111] In some embodiments, the last stage includes only one addition operation, and thus, the output data of the last stage comprises the output operand of that one addition operation.
[00112] In some embodiments, the method may include additional actions after performing actions 1050 and 1055, e.g., as illustrated in Figure H)C.
[00113] At 1057, a read address may be generated using the selected value.
[00114] At 1059, a data symbol may be read (i.e., accessed) from a data buffer using the read address.
[00115] Furthermore, in one embodiment, the m-bit quantity A may be varied through a range of values, and actions 1050 through 1059 may be performed for each value of the m-bit quantity A (in the range of values) in order to implement an interleaving operation (or a deinterleaving operation) on data symbols stored in the data buffer.
[00116] In alternative embodiments, the actions 1050 and 1055 may be performed as part of an encryption operation or a decryption operation on a block of data.
[00117] Figure 1 1 is a block diagram representing one set of embodiments of a computer system 1082. The computer system 1082 may include at least one cental processing unit CPU 1160 (i.e., processor) which is coupled to a host bus 1162. The
CPU 1160 may be any of various types, including, but not limited to, an x86 processor, a PowerPC processor, a CPU from the SPARC family of RISC processors, as well as others. A memory medium, typically including semiconductor RAM, and referred to herein as main memory 1166, may be coupled to the host bus 1162 by means of memory controller 1 164. The main memory 1166 may store programs operable to implement any or all or any portion of the various method embodiments described herein. The main memory may also store operating system software, as well as other software for operation of the computer system.
[00118] The host bus 1162 may couple to an expansion or input/output bus 1170 through a bus controller 1168 or bus bridge logic. In some embodiments, the expansion bus 1 170 may include slots for various devices such as a video card 1180, a hard drive 1182, storage devices 1190 (such as a CD-ROM drive, a tape drive, a floppy drive, etc.) and a network interface 1122. The video card 1 ] 80 may couple to a display device such as a monitor, a projector, or a head mounted display. The network interface 1122 (e.g., an Ethernet device) may be used to communicate with other computers through a network.
[00119] The computer system 1082 may also include one or more FQ devices 1 192 such as a mouse, a keyboard, one or more microphones, and one or more speakers, a touch sensitive pad, etc.
[00120] Embodiments of computer system 1082 targeted for use as a server computer may be more richly endowed with processor capacity (e.g., having multiple processors), memory capacity and network access bandwidth than embodiments targeted for use as a client computer. The client computer may include the mouse, keyboard, speakers and video card (or graphics accelerator), whereas a server computer does not necessarily include these items.
[00121] Various embodiments are described above for computing A mod (2n-l) in a sequential fashion using a single adder circuit or in a parallel fashion using an adder tree. The present invention contemplates combinations of these embodiments where the value A mod (2Λ-1) is computed partially in a sequential fashion and partially in a parallel fashion. For example, if the number c of sections of the quantity A is greater llian number rif of inputs to an adder tree, the c sections may be divided in groups, e.g.. groups of size at most (ni-1). The groups may be supplied to the adder tree in successive cycles. The output of the adder tree may be coupled to one of the nr adder tree inputs. The remaining (n[- 1 ) inputs may be configured to recei ve the (ni- 1 ) sections of each group. [00122] Any of various logic implementations may be used in the adder circuits and/or the tree structures of the embodiments described above.
[00123] Any of the various method embodiments disclosed herein (or any combinations thereof or portions thereof) may be implemented in terms of program instructions. The program instructions may be stored in (or on) any of various memory media. A memory medium is a medium configured for the storage of information. Examples of memory media include various kinds of magnetic media (e.g., magnetic tape or magnetic disk); various kinds of optical media (e.g., CD- ROM); various kinds of semiconductor RAM and ROM; various media based on the storage of electrical charge or other physical quantities; etc.
[00124] Furthermore, various embodiments of a system including a memory and a processor are contemplated, where the memory is configured to store program instructions and the processor is configured to read and execute the program instructions from the memory. In various embodiments, the program instructions encode corresponding ones of the method embodiments described herein (or combinations thereof or portions thereof).
[00125] Various embodiments may further include receiving, sending or storing program instructions and/or data implemented in accordance with the foregoing description upon a computer-accessible medium. Generally speaking, a computer- accessible medium may include storage media or memory media such as magnetic or optical media, e.g., disk or CD-ROM, volatile or non-volatile media such as RAM (e.g. SDRAM, DDR SDRAM, RDRAM, SRAM, etc.), ROM, etc. as well as transmission media or signals such as electrical, electromagnetic, or digital signals, conveyed via a communication medium such as network and/or a wireless link. [00126] The various methods as illustrated in the Figures and descπbed herein represent exemplary embodiments of methods. The methods may be implemented in software, hardware, or a combination thereof. The order of method actions may be changed, and various actions may be added, reordered, combined, omitted, modified, etc.
[00127] Various modifications and changes may be made as would be obvious to a person skilled in the art having the benefit of this disclosure. It is intended that the invention embrace all such modifications and changes and, accordingly, the above description to be regarded in an illustrative rather than a restrictive sense.

Claims

Claims
L A system for computing A mod (2n-l), wherein A is an m-bit quantity, wherein m is an integer greater than or equal to two, wherein n is a positive integer less than or equal to m, the system comprising: a plurality of adder circuits, wherein each of the adder circuits is configured to operate on two n-bit operands in order to produce an n-bit output, wherein the plurality of adder circuits are coupled to form a tree structure, wherein the quantity A is partitioned into a plurality of sections, wherein each of the sections includes up to n consecutive bits of the quantity A. wherein each of the sections is supplied to exactly one of the adder circuits in order to determine one of the two n-bit operands of that adder circuit, wherein each of the adder circuits includes: a first n-bit adder configured to operate on the two n-bit operands in order to produce an intermediate n-bit result; and a second n-bit adder configured, to operate on the intermediate n-bit result and on a carryout signal from the first n-bit adder in order to produce the n-bit output.
2. The system of claim 1 further comprising: a mapping circuit configured to receive the output from a first of the adder circuits, wherein the first adder circuit corresponds to a root of the tree structure, wherein the mapping circuit is configured to operate on the first adder output to map a state 2n- 1 to zero and to pass all other states of the first adder output.
3. The system of claim 2, wherein the mapping circuit includes a comparison unit and a multiplexer, wherein the comparison unit is configured to determine if said first adder output is equal to 2n-l and to assert a control signal in response to determining that the first adder output is equal to 2 '-1 , wherein the multiplexer is configured to select between the value zero and the first adder output based on the control signal.
4. The system of claim 1, wherein either: fa) m is a multiple of n, and each of the sections is n bits in length; or fb) m is not a multiple of n, each of the sections except for one is n bits in length, and the exceptional section has length equal to (m-zn) with z being a positive integer.
5. The system of claim 1, wherein the tree structure has a number of levels equal to the ceiling of the base-2 logarithm of the ceiling of m/n.
6. A system for computing A mod (2n-l), wherein A is an m-bit quantity, wherein m is an integer greater than or equal to two. wherein n is a positive integer less than or equal to m, the system comprising: an adder circuit, wherein the adder circuit is configured to operate on two n-bit inputs and to produce an n-bit output, wherein the output of the adder circuit is coupled to a first of the two inputs, wherein the adder circuit includes: a first n-bit adder configured to operate on the two n-bit operands in order to produce an intermediate n-bit result; and a second n-bit adder configured to operate on the intermediate n-bit result and on a carryout signal from the first n-bit adder in order to produce the n-bit output; wherein a plurality of sections of the quantity A are presented to a second, of the two inputs in a plurality of cycles respectively of a clock signal, wherein each of the sections includes up to n consecutive bits of the quantity A.
7. The system of claim 6 further comprising: an extraction circuit configured to receive the m-bit quantity A, to extract the plurality of sections of the quantity A, and to supply the plurality of sections to the second input of the adder circuit in successive clock cycles respectively.
8. The system of claim 7, wherein the extraction circuit includes a multiplexer, a register and a shift unit, wherein multiplexer is configured to select between a first input port and a second input port, wherein the first input port is coupled to receive the m-bit quantity A, wherein the second input port is coupled to receive an output of the shift unit, wherein the register to coupled to an output of the multiplexer, wherein the shift unit is coupled to an output of the register.
9. The system of claim 6, wherein cither:
(a) m is a multiple of n and each of the sections is n bits in length; or
(b) m is not a multiple of n, each of the sections except for one is n bits in length, and the exceptional section has length equal to (m-zn) with z being a positive integer.
10. The system of claim 6, wherein the number c of sections in said plurality of sections is equal to the ceiling of m/n.
11. The system of claim 10, wherein the system is configured to complete computation of A mod (2n- 1) in c of said cycles.
12. The system of claim 6 further comprising: a mapping circuit configured to receive the n-bit output from the adder circuit, to operate on the adder circuit output to map a state 2n-l to zero and to pass all other states of the adder circuit output.
13. The system of claim 6, wherein the adder circuit also includes: a mapping circuit configured to receive an n-bit result generated by the second n-bit adder, to operate on the n-bit result in order to obtain the n-bit output, wherein said operating includes mapping a state 2n-l to zero and passing all other states of the n-bit result.
wherein a plurality of sections of the quantity A are presented to a second of the two inputs in a plurality of cycles respectively of a clock signal, wherein each of the sections includes up to n consecutive bits of the quantity A.
14. A method for computing A mod (2n-l), wherein A is an m-bit quantity, wherein m is an integer greater than or equal to two, wherein n is a positive integer less than or equal to m, the method comprising:
(a) receiving the m-bit quantity A;
(b) extracting a section of the quantity A, wherein the section includes up to n consecutive bits of the quantity A;
(c) adding the section to a value of a register; (d) adding one to the register value if the register value is greater than 2M, wherein said adding of one is performed modulo 2";
(e) repeating (b), (c) and (d) until the quantity A is exhausted;
(f) setting the register value equal to zero if the register value equals 2n-l .
15. The method of claim 14 further comprising:
(g) generating a read address using the register value; and
(h) reading a data symbol from a data buffer using the read address.
16. The method of claim 15 further comprising: varying the no-bit quantity A through a range of values; and performing (a) through (h) for each value of the m-bit quantity A in order to implement an interleaving operation or a deinterleaving operation on data symbols stored in the data buffer.
17. The method of claim 14, wherein (a) through (f) are performed as part of an encryption operation or a decryption operation on a block of data.
18. The method of claim 14, wherein m is a multiple of n, wherein the section extracted in (b) is n bits in length.
19. A method for computing A mod (2n-l), wherein A is an m-bit quantity, wherein m is an integer greater than or equal to two, wherein n is a positive integer less than or equal to in, the method comprising: (a) performing a number of addition operations in a sequence of stages, wherein each of the stages includes performing a corresponding subset of the number of addition operations in a parallel fashion, wherein the subset of addition operations of each stage receives corresponding input data and generates corresponding output data, wherein the input data of each stage, except for a first of the stages, comprises at least a portion of the output data of a previous one of the stages, wherein the input data of the first stage includes a plurality of sections of the quantity A, wherein each of the sections includes at most n consecutive bits of the quantity A, wherein each of said number of addition operations includes performing a first n-bit addition and a second n-bit addition, wherein the second n-bit addition operates on an intermediate result and a carryout produced by the first n-bit addition;
(b) selecting either the value zero or the output data from a last of the stages depending on a comparison of the value (2n-l) and said output data from the last stage, wherein the selected value equals A mod (2n-l).
20. The method of claim 19, wherein the input data of one of the stages, other than the first stage, includes an additional section of the quantity A, wherein said additional section is not included in said plurality of sections.
21. The method of claim 19 further comprising: distributing the plurality of sections of the quantity A to the subset of addition operations of the first stage.
22. The method of claim 19 further comprising:
(c) generating a read address using the selected value; and
(d) reading a data symbol from a data buffer using the read address.
23. The method of claim 22 further comprising: varying the m-bit quantity A through a range of values; and performing (a) through (d) for each value of the m-bit quantity A in order to implement an interleaving operation or a deinterleaving operation on data symbols stored in the data buffer.
24. The method of claim 19, wherein (a) and (b) are performed as part of an encryption operation or a decryption operation on a block of data.
PCT/US2007/064370 2006-07-07 2007-03-20 Computation of a mod (2 n - 1) WO2008005592A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
US11/456,110 US7849125B2 (en) 2006-07-07 2006-07-07 Efficient computation of the modulo operation based on divisor (2n-1)
US11/456,110 2006-07-07

Publications (1)

Publication Number Publication Date
WO2008005592A1 true WO2008005592A1 (en) 2008-01-10

Family

ID=38326197

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/US2007/064370 WO2008005592A1 (en) 2006-07-07 2007-03-20 Computation of a mod (2 n - 1)

Country Status (4)

Country Link
US (1) US7849125B2 (en)
EP (1) EP1876523A1 (en)
CN (1) CN101021777B (en)
WO (1) WO2008005592A1 (en)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110145311A1 (en) * 2009-12-16 2011-06-16 Electronics And Telecommunications Research Institute Method and apparatus for modulo n operation
US8930431B2 (en) * 2010-12-15 2015-01-06 International Business Machines Corporation Parallel computation of a remainder by division of a sequence of bytes
US8984039B2 (en) 2012-02-06 2015-03-17 International Business Machines Corporation Residue-based error detection for a processor execution unit that supports vector operations
GB2537371B (en) 2015-04-13 2019-10-02 Imagination Tech Ltd Modulo calculation using polynomials
GB2538102B (en) 2015-05-08 2019-11-13 Imagination Tech Ltd Performing constant modulo arithmetic
GB2546352B (en) 2015-05-27 2018-04-11 Imagination Tech Ltd Efficient modulo calculation
US9841946B1 (en) * 2015-11-11 2017-12-12 Mbit Wireless, Inc. Method and apparatus for modulo operation
CN112363687A (en) * 2020-11-27 2021-02-12 Oppo广东移动通信有限公司 Integer modular operation method and device and terminal equipment

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0318957A2 (en) * 1987-11-30 1989-06-07 Fujitsu Limited Population counting in computer systems
FR2786579A1 (en) * 1998-11-30 2000-06-02 St Microelectronics Sa Invention relates to a procedure for determination of the remainder of the division of an 8 bit binary number N by a factor (22-1) corresponding to a whole power of 2 reduced by 1

Family Cites Families (91)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4686510A (en) 1983-03-25 1987-08-11 Baker Alan J Method of averaging a plurality of measured modulo values
US4598266A (en) 1984-09-24 1986-07-01 Gte Communications Systems Corporation Modulo adder
US4742520A (en) 1984-09-26 1988-05-03 Texas Instruments Incorporated ALU operation: modulo two sum
US4722067A (en) 1985-03-25 1988-01-26 Motorola, Inc. Method and apparatus for implementing modulo arithmetic calculations
US4742479A (en) 1985-03-25 1988-05-03 Motorola, Inc. Modulo arithmetic unit having arbitrary offset and modulo values
US4658094A (en) 1985-03-28 1987-04-14 Itt Corporation Encryption apparatus and methods for raising a large unsigned integer to a large unsigned integer power modulo a large unsigned integer
US4800524A (en) 1985-12-20 1989-01-24 Analog Devices, Inc. Modulo address generator
US4935867A (en) 1986-03-04 1990-06-19 Advanced Micro Devices, Inc. Signal processor memory management unit with indirect addressing using selectable offsets and modulo values for indexed address calculations
US4870607A (en) 1986-07-03 1989-09-26 Nec Corporation Error detection carried out by the use of unused modulo-m code
US4891781A (en) 1987-03-04 1990-01-02 Cylink Corporation Modulo arithmetic processor chip
US4833602A (en) 1987-06-29 1989-05-23 International Business Machines Corporation Signal generator using modulo means
GB2217882B (en) 1988-04-29 1992-06-10 Philips Electronic Associated Arithmetic apparatus
GB2217883B (en) 1988-04-29 1992-06-10 Philips Electronic Associated Arithmetic apparatus
US5038376A (en) 1989-10-04 1991-08-06 Teledyne Industries, Inc. Block substitution based encryption by a modulo 2 addition method and apparatus
DE68928980T2 (en) 1989-11-17 1999-08-19 Texas Instruments Inc Multiprocessor with coordinate switch between processors and memories
US5210710A (en) 1990-10-17 1993-05-11 Cylink Corporation Modulo arithmetic processor chip
US5249148A (en) 1990-11-26 1993-09-28 Motorola, Inc. Method and apparatus for performing restricted modulo arithmetic
US5233553A (en) 1991-03-06 1993-08-03 Chips And Technologies, Inc. Apparatus for performing modulo arithmetic with three-port adder
EP0504996B1 (en) 1991-03-22 1998-07-08 Koninklijke Philips Electronics N.V. Arithmetic unit for multiplying long integers modulo M and R.S.A. converter provided with such multiplication device
JPH04352230A (en) 1991-05-30 1992-12-07 Hitachi Ltd Computing element and microprocessor
US5289397A (en) 1991-07-22 1994-02-22 Itt Corporation High-speed modulo exponentiator device
ES2101124T3 (en) 1991-11-05 1997-07-01 Thomson Multimedia Sa METHOD, TRANSMITTER AND RECEIVER DEVICES FOR OPERATION BY MODULE.
US5384810A (en) 1992-02-05 1995-01-24 At&T Bell Laboratories Modulo decoder
US5257272A (en) 1992-04-15 1993-10-26 International Business Machines Corporation Time-varying modulo N trellis codes for input restricted partial response channels
US5381360A (en) 1993-09-27 1995-01-10 Hitachi America, Ltd. Modulo arithmetic addressing circuit
KR950015177B1 (en) 1993-12-06 1995-12-23 한국전기통신공사 Modulo-reduction method using pre-calculuted table
FR2718262B1 (en) 1994-03-31 1996-05-24 Sgs Thomson Microelectronics Modulo addressing buffer memory.
US5790443A (en) 1994-06-01 1998-08-04 S3 Incorporated Mixed-modulo address generation using shadow segment registers
US5493522A (en) 1994-09-21 1996-02-20 Northrop Grumman Corporation Fast arithmetic modulo divider
US5659700A (en) 1995-02-14 1997-08-19 Winbond Electronis Corporation Apparatus and method for generating a modulo address
US5633814A (en) 1995-10-26 1997-05-27 Advanced Micro Devices Non-modulo power of 2 frequency divider
US5664193A (en) 1995-11-17 1997-09-02 Sun Microsystems, Inc. Method and apparatus for automatic selection of the load latency to be used in modulo scheduling in an optimizing compiler
US5867711A (en) 1995-11-17 1999-02-02 Sun Microsystems, Inc. Method and apparatus for time-reversed instruction scheduling with modulo constraints in an optimizing compiler
US5809308A (en) 1995-11-17 1998-09-15 Sun Microsystems, Inc. Method and apparatus for efficient determination of an RMII vector for modulo scheduled loops in an optimizing compiler
US5719798A (en) 1995-12-22 1998-02-17 Lucent Technologies Inc. Programmable modulo k counter
JP3525209B2 (en) 1996-04-05 2004-05-10 株式会社 沖マイクロデザイン Power-residue operation circuit, power-residue operation system, and operation method for power-residue operation
US5794025A (en) 1996-05-09 1998-08-11 Maker Communications, Inc. Method and device for performing modulo-based arithmetic operations in an asynchronous transfer mode cell processing system
US5940863A (en) 1996-07-26 1999-08-17 Zenith Electronics Corporation Apparatus for de-rotating and de-interleaving data including plural memory devices and plural modulo memory address generators
KR19980052741A (en) 1996-12-24 1998-09-25 김광호 Modulo address generator and its method
KR100236536B1 (en) 1997-01-10 1999-12-15 윤종용 Modulo address generator
US5793660A (en) 1997-04-14 1998-08-11 Hewlett-Packard Company Circuit for finding m modulo n
US6047364A (en) 1997-08-27 2000-04-04 Lucent Technologies Inc. True modulo addressing generator
US6049858A (en) 1997-08-27 2000-04-11 Lucent Technologies Inc. Modulo address generator with precomputed comparison and correction terms
US6073228A (en) 1997-09-18 2000-06-06 Lucent Technologies Inc. Modulo address generator for generating an updated address
FR2769432B1 (en) 1997-10-03 2000-01-28 Thomson Csf MODULO VARIABLE FREQUENCY DIVIDER
US6064740A (en) 1997-11-12 2000-05-16 Curiger; Andreas Method and apparatus for masking modulo exponentiation calculations in an integrated circuit
US6341370B1 (en) 1998-04-24 2002-01-22 Sun Microsystems, Inc. Integration of data prefetching and modulo scheduling using postpass prefetch insertion
US6038318A (en) 1998-06-03 2000-03-14 Cisco Technology, Inc. Optimized machine computation of exponential functions and modulo functions
US6182104B1 (en) 1998-07-22 2001-01-30 Motorola, Inc. Circuit and method of modulo multiplication
US6900910B1 (en) 1998-09-16 2005-05-31 Texas Instruments Incorporated Modulo addressing for look up table screening for printing files in a page description language
US6304398B1 (en) 1998-09-24 2001-10-16 Seagate Technology Llc Dual modulo gray code positioning system
US6321247B1 (en) 1998-12-28 2001-11-20 Compaq Computer Corporation System and method for multiplication modulo (2N+1)
US6536001B1 (en) 1999-03-11 2003-03-18 Globespanvirata, Inc. Circuit and method for convolutional interleaving using a single modulo operation
US6707627B1 (en) 2000-03-03 2004-03-16 Cirrus Logic, Inc. Error checking in a disk drive system using a modulo code
US6671878B1 (en) 2000-03-24 2003-12-30 Brian E. Bliss Modulo scheduling via binary search for minimum acceptable initiation interval method and apparatus
US6584556B1 (en) 2000-03-28 2003-06-24 Analog Devices, Inc. Modulo address generation method and apparatus
DE10021920C1 (en) 2000-05-05 2001-07-26 Infineon Technologies Ag Data processing method for modulo calculation of division remainder has whole number represented by partial data words with calculation of argument via recursive steps
US6651247B1 (en) 2000-05-09 2003-11-18 Hewlett-Packard Development Company, L.P. Method, apparatus, and product for optimizing compiler with rotating register assignment to modulo scheduled code in SSA form
US6832370B1 (en) 2000-05-09 2004-12-14 Hewlett-Packard Development, L.P. Data speculation within modulo scheduled loops
GB0013355D0 (en) 2000-06-01 2000-07-26 Tao Group Ltd Parallel modulo arithmetic using bitwise logical operations
WO2002008885A1 (en) 2000-07-21 2002-01-31 Xebeo Communications, Inc. HIGH-SPEED PARALLEL-PREFIX MODULO 2n-1 ADDERS
US6448915B1 (en) 2000-08-31 2002-09-10 Xilinx, Inc. Modulo-M delta sigma circuit
US6978016B2 (en) * 2000-12-19 2005-12-20 International Business Machines Corporation Circuits for calculating modular multiplicative inverse
US6963645B2 (en) * 2000-12-19 2005-11-08 International Business Machines Corporation Method for implementing the chinese remainder theorem
US6760830B2 (en) 2000-12-29 2004-07-06 Intel Corporation Modulo addressing
US6728743B2 (en) 2001-01-04 2004-04-27 Mellanox Technologies Ltd. Modulo remainder generator
US6591213B1 (en) 2001-02-27 2003-07-08 Inovys Corporation Systems for providing zero latency, non-modulo looping and branching of test pattern data for automatic test equipment
US6604169B2 (en) 2001-06-01 2003-08-05 Microchip Technology Incorporated Modulo addressing based on absolute offset
US7194088B2 (en) 2001-06-08 2007-03-20 Corrent Corporation Method and system for a full-adder post processor for modulo arithmetic
US6973470B2 (en) 2001-06-13 2005-12-06 Corrent Corporation Circuit and method for performing multiple modulo mathematic operations
US20030065697A1 (en) 2001-08-29 2003-04-03 Shimman Patel Fast, iterative system and method for evaluating a modulo operation without using division
JP2003099250A (en) 2001-09-20 2003-04-04 Oki Electric Ind Co Ltd Register readout circuit and microprocessor
US7194089B2 (en) 2001-10-24 2007-03-20 International Business Machines Corporation Method for reducing a value modulo a shared secret
DE10200133B4 (en) 2002-01-04 2005-12-22 Infineon Technologies Ag Method and device for calculating modulo operations
US8149904B2 (en) 2002-01-24 2012-04-03 Broadcom Corporation Asymmetric digital subscriber line modem apparatus and methods therefor
US6993757B2 (en) 2002-05-06 2006-01-31 Sun Microsystems, Inc. Method and apparatus for multi-versioning loops to facilitate modulo scheduling
DE10223853B4 (en) 2002-05-28 2005-06-23 Technische Universität Braunschweig Carolo-Wilhelmina Method and integrated circuit for performing a multiplication modulo M
US6986131B2 (en) 2002-06-18 2006-01-10 Hewlett-Packard Development Company, L.P. Method and apparatus for efficient code generation for modulo scheduled uncounted loops
US20040003340A1 (en) 2002-06-26 2004-01-01 3Dsp Corporation Modulo arithmetic overflow control for viterbi decoder
US20040003022A1 (en) 2002-06-27 2004-01-01 International Business Machines Corporation Method and system for using modulo arithmetic to distribute processing over multiple processors
CN1230736C (en) * 2002-07-31 2005-12-07 清华大学 Montgomery analog multiplication algorithm for VLSI and VLSI structure of intelligenjt card analog multiplier
CN1247035C (en) * 2003-03-10 2006-03-22 大唐移动通信设备有限公司 Turbo code interswitch for G3 mobile communication standard protocol carried by programmable gate matrix
KR100458031B1 (en) * 2003-03-14 2004-11-26 삼성전자주식회사 Apparatus and method for performing a montgomery type modular multiplication
FR2853424B1 (en) * 2003-04-04 2005-10-21 Atmel Corp ARCHITECTURE OF COMBINED POLYNOMIAL AND NATURAL MULTIPLIERS
US20040221283A1 (en) 2003-04-30 2004-11-04 Worley Christopher S. Enhanced, modulo-scheduled-loop extensions
CA2433379A1 (en) 2003-06-25 2004-12-25 Ibm Canada Limited - Ibm Canada Limitee Modulo scheduling of multiple instruction chains
US7243118B2 (en) 2003-07-30 2007-07-10 Broadcom Corporation Method and apparatus for efficient derivation of modulo arithmetic for frequency selection
US7376890B2 (en) 2004-05-27 2008-05-20 International Business Machines Corporation Method and system for checking rotate, shift and sign extension functions using a modulo function
US7480380B2 (en) 2004-08-26 2009-01-20 International Business Machines Corporation Method for efficient generation of modulo inverse for public key cryptosystems
US20060048123A1 (en) 2004-08-30 2006-03-02 International Business Machines Corporation Modification of swing modulo scheduling to reduce register usage
US7444628B2 (en) 2004-08-30 2008-10-28 International Business Machines Corporation Extension of swing modulo scheduling to evenly distribute uniform strongly connected components

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0318957A2 (en) * 1987-11-30 1989-06-07 Fujitsu Limited Population counting in computer systems
FR2786579A1 (en) * 1998-11-30 2000-06-02 St Microelectronics Sa Invention relates to a procedure for determination of the remainder of the division of an 8 bit binary number N by a factor (22-1) corresponding to a whole power of 2 reduced by 1

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
RANADE A G ED - DEGROOT D INSTITUTE OF ELECTRICAL AND ELECTRONICS ENGINEERS: "INTERCONNECTION NETWORKS AND PARALLEL MEMORY ORGANIZATIONS FOR ARRAY PROCESSING", PROCEEDINGS OF THE INTERNATIONAL CONFERENCE ON PARALLEL PROCESSING. AUGUST 20 - 23, 1985, WASHINGTON, IEEE COMP.SOC.PRESS, US, August 1985 (1985-08-01), pages 41 - 47, XP000757117 *
SIVAKUMAR R ET AL: "VLSI design of a modulo-extractor", COMMUNICATIONS, COMPUTERS AND SIGNAL PROCESSING, 1991., IEEE PACIFIC RIM CONFERENCE ON VICTORIA, BC, CANADA 9-10 MAY 1991, NEW YORK, NY, USA,IEEE, US, 9 May 1991 (1991-05-09), pages 327 - 330, XP010039443, ISBN: 0-87942-638-1 *

Also Published As

Publication number Publication date
EP1876523A1 (en) 2008-01-09
US7849125B2 (en) 2010-12-07
CN101021777B (en) 2010-08-25
CN101021777A (en) 2007-08-22
US20080010332A1 (en) 2008-01-10

Similar Documents

Publication Publication Date Title
Öztürk et al. Low-power elliptic curve cryptography using scaled modular arithmetic
WO2008005592A1 (en) Computation of a mod (2 n - 1)
JP4955182B2 (en) Integer calculation field range extension
Shantz From Euclid's GCD to Montgomery multiplication to the great divide
EP0566498B1 (en) Digital signature device and process
US7945784B1 (en) Method and system to perform secret sharing
CN100527072C (en) Device and method for carrying out montgomery mode multiply
US20030140077A1 (en) Logic circuits for performing modular multiplication and exponentiation
WO2001093012A2 (en) Accelerated montgomery exponentiation using plural multipliers
Hasan Look-up table-based large finite field multiplication in memory constrained cryptosystems
KR20090017637A (en) Modular reduction using folding
Groszschaedl et al. Instruction set extension for fast elliptic curve cryptography over binary finite fields GF (2/sup m/)
KR102581403B1 (en) Shared hardware logic unit and method for reducing die area
Großschädl A bit-serial unified multiplier architecture for finite fields GF (p) and GF (2 m)
KR101925868B1 (en) Modular arithmetic unit and secure system having the same
US7627114B2 (en) Efficient modular reduction and modular multiplication
Parhami On equivalences and fair comparisons among residue number systems with special moduli
US7958180B2 (en) Multiplier engine
CN107463354B (en) ECC-oriented Montgomery modular multiplication circuit with variable double-domain parallelism
JP3913921B2 (en) Circuit for reciprocal of arbitrary element in finite field
Koppermann et al. Fast FPGA implementations of Diffie-Hellman on the Kummer surface of a genus-2 curve
Zimmermann et al. High-performance integer factoring with reconfigurable devices
WO2022115108A1 (en) An architecture for small and efficient modular multiplication using carry-save adders
KR100297110B1 (en) Modular multiplier
Liu et al. Multiprecision multiplication on ARMv8

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 07758879

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 2492/MUMNP/2008

Country of ref document: IN

NENP Non-entry into the national phase

Ref country code: DE

NENP Non-entry into the national phase

Ref country code: RU

122 Ep: pct application non-entry in european phase

Ref document number: 07758879

Country of ref document: EP

Kind code of ref document: A1