This application claims the benefit under 35 U.S.C. § 119(a) of a Korean Patent Application, Serial No. 2006-108268 filed in the Korean Intellectual Property Office on Nov. 11, 2005, the entire contents of which is hereby incorporated by reference.
1. Field of the Invention
The present invention generally relates to a Linear Feedback Shift Register (LFSR). More particularly, the present invention relates to a method and apparatus for generating a pseudorandom binary sequence by quickly calculating a state of an LFSR used for code generation in a communication system using an LFSR.
2. Description of the Related Art
An LFSR refers to a circuit for generating a pseudorandom binary sequence of a binary bitstream sequenced using linear feedback. In this circuit, the contents of multiple shift registers are individually shifted according to a clock cycle. Output values and exclusive logic OR operation values of the shift registers are simultaneously applied as inputs to the shift registers. The LFSR is widely used to encrypt or synchronize data for transmission. The LFSR, for example, is applied to a Pseudo Noise (PN) generator in a Code Division Multiple Access (CDMA) mobile communication system such as a CDMA-2000 system or Universal Mobile Telecommunication System (UMTS).
Various techniques to reduce power consumption have been applied to terminals in the CDMA mobile communication system. An example of one of these techniques is a sleep-mode operation. A method for reducing power consumption in the sleep mode has also been considered. A clock for driving an LFSR included in the PN generator is provided by a Temperature Compensated Crystal Oscillator (TCXO) that operates at high speeds. In the sleep mode, the TCXO operates at low speeds and the power of the LFSR is shut down, thereby reducing power consumption. For example, in a CDMA-2000 1× system, a long PN code is generated by a high-speed 42-stage LFSR operating at a speed of 1.2288 Mchip/sec and in the sleep mode, the power of the LFSR is shut down and the elapsed amount of time is counted using a low-speed clock instead of a high-speed clock. At this time, if the terminal repeats sleep and wake-up operations according to a fixed cycle, a state of the LFSR to be used after the wake-up may be calculated using a mask pattern that advances a state of the LFSR by the number of chips corresponding to the sleep time.
If the LFSR wakes up from the sleep mode according to a fixed cycle, the devices illustrated in
Referring to
If the device illustrated in
Referring to
To map a state of the LFSR to elements of GF(2n), a primitive element α of GF(2n) may be defined as a root that satisfies an LFSR connection polynomial. Immediately prior to feedback, a register may be an MSB in the LFSR using a Galois connection and registers are sequentially S3, S2, S1, and S0 from the MSB in a 4-stage LFSR, when mapping is performed as follows:
α3 is (S3, S2, S1, S0)=(1, 0, 0, 0)
α2 is (S3, S2, S1, S0)=(0, 1, 0, 0)
α1 is (S3, S2, S1, S0)=(0, 0, 1, 0)
α0 is (S3, S2, S1, S0)=(0, 0, 0, 1),
In this case, an element of GF(2n) can be expressed by linear combination of the basis. Thus, the current binary state of the LFSR is mapped to a specific element of GF(2n), namely β, as a linear combination of the basis and a 1-chip shift of the LFSR is equivalent to “β·α”.
Referring to
According to the method of
Accordingly, there is a need for an improved system and method for generating a pseudorandom binary sequence in a communication system so that a state of a Linear Feedback Shift Register (LFSR) may be calculated quickly.
An aspect of exemplary embodiments of the present invention is to address at least the above problems and/or disadvantages and to provide at least the advantages described below. Accordingly, an aspect of exemplary embodiments of the present invention is to provide a method and apparatus for generating a pseudorandom binary sequence in a communication system, in which a state of a Linear Feedback Shift Register (LFSR) after a random time can be calculated quickly.
To achieve the above and other objects, there is provided a method for generating a code after a random time in a communication system using an n-stage binary Linear Feedback Shift Register (LFSR). The method comprises defining an element indicating the current state value of the LFSR in a finite field GF(2n), performing a 2r-th power operation and a multiply operation with respect to a characteristic polynomial of the LFSR when n=rs in the GF(2n) where r and s are selected values, and repeating the 2r-th power operation and the multiply operation s times to calculate a new state value of the LFSR after the random time, thereby generating the code.
To achieve the above and other objects, there is provided an apparatus for generating a code after random time in a communication system using an n-stage binary Linear Feedback Shift Register (LFSR), the apparatus comprises a first shift register logic for performing a 2r-th power operation with respect to a characteristic polynomial comprising elements indicating the current state value of the LFSR when n=rs in a finite field GF(2n) when the characteristic polynomial is expressed with elements of the GF(2n) and r and s are selected values, and a second shift register logic for performing a multiply operation with respect to the result of the 2r-th power operation by shifting the LFSR. Wherein the first shift register logic and the second shift register logic repeat the 2r-th power operation and the multiply operation s times to calculate a new state value of the LFSR after the random time, thereby generating the code.
Other objects, advantages, and salient features of the invention will become apparent to those skilled in the art from the following detailed description, which, taken in conjunction with the annexed drawings, discloses exemplary embodiments of the invention.
The above and other exemplary objects, features and advantages of certain exemplary embodiments of the present invention will be more apparent from the following description taken in conjunction with the accompanying drawings, in which:
Throughout the drawings, the same drawing reference numerals will be understood to refer to the same elements, features and structures.
The matters defined in the description such as a detailed construction and elements are provided to assist in a comprehensive understanding of the embodiments of the invention. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the invention. Also, descriptions of well-known functions and constructions are omitted for clarity and conciseness.
A new algorithm and hardware structure for quickly calculating a state of an LFSR used as a Pseudorandom Noise (PN) generator of a mobile communication after random time according to the principle of an exemplary embodiment of the present invention will be suggested.
According to an exemplary embodiment of the present invention, a square-and-multiply method that can be implemented for a short period of time, i.e., 2n chip time, without referring to memory and a device implemented with the square-and-multiply method is proposed. The square-and-multiply method, which will be described with reference to
According to another exemplary embodiment of the present invention, a power-and-multiply method is proposed in which a 2r-th power operation and some multiply operations are performed in the case of r|n by improving the direct multiply method used on a finite field similar to that of
A. Square-and-Multiply Method
The following description, with reference to
If an initial value of an n-stage LFSR using Galois connection is not 0, a state of the LFSR that is output after the LFSR′s shifting corresponds to all elements of GF(2n) except for 0 based on one-to-one correspondence. For example, when the primitive element of GF(24) is α, if (0010) among the states of the LFSR corresponds to the primitive element α, a state (α3α2α0) of the LFSR can be expressed as follows:
α3α3+α2α2+α1α1+α0ε Eelements of GF(24) (1)
When it is assumed that α3α3+α2α2+α1α1+α0=αx, a state of the LFSR after t chips, which means a state of the LFSR after t shifts, can be expressed as follows:
To express a state of αx after t chips is equivalent to expressing Equation (2) with a linear combination of α3, α2, α, and 1, as follows:
When a state of αx after t chips is expressed as illustrated in Equation (3), (α′3 α′2 α′1 α′0) is a state of the LFSR after t chips.
For example, for a 4-stage LFSR, αx+t when t=t0+t12+t222+t323 can be calculated by repeating a square operation and a multiply operation by α as follows:
((((αx)2αt
In Equation (4), a second term in the middle portion uses a feature that an element β in the GF(2n) is equal to β2
Referring to
As in Equation (4), for the 4-stage LFSR, αx+t in a case in which t=t0+t12+t222+t323 can be calculated by repeating the square operation and the multiply operation by α. The multiply operation has the same result as that of an LFSR using a Galois connection that is shifted once, which can be implemented with the logic of a shift register as illustrated in
In contrast, the square operation can be performed as follows. If the characteristic polynomial of the LFSR using the Galois connection in which elements of GF(24) are expressed is x4+x+1 as in
In Equation (5), since the first equality is (b3α3)2+(b2α2)2+(b1α)2+(b0)2 and b3, b2, b1, and b0 are equal to 0 or 1, it can be expressed as the second equality. In addition, in Equation (5), since α6=α3+α2 and α4=α+1, Equation (5) can be expressed as Equation (6) which can be implemented with the logic of a shift register as illustrated in
β2=b3α3+(b3+b1)α2+b2α+(b2+b0) (6)
αxαt=((((αx)2αt
Referring to
The shift register S1 receives the output of the exclusive logic OR operator 70 and outputs the received output according to a clock CLK. A logic AND operator 59 receives the output of the shift register S1 and the output of the logic OR operator 54. The logic AND operator 59 a logic AND operation with respect to the received outputs. An exclusive logic OR operator 71 receives an output of the logic AND operator 59, an output of a logic AND operator 60, an output of a logic AND operator 66 and performs an exclusive logic OR operation with respect to the received outputs. The logic AND operator 60 receives the output of the shift register S2 and the output of the logic AND operator 53 and performs a logic AND operation with respect to the received outputs. The logic AND operator 66 receives a result of an exclusive logic OR operation with respect to the outputs of the shift registers S1 and S2 and the output of the logic AND operator 63 and performs a logic AND operation with respect to the received result and output.
The shift register S2 receives an output of the exclusive logic OR operator 71 and outputs the received output according to a clock CLK. The logic AND operator 61 receives the output of the shift register S2 and the output of the logic OR operator 54. The logic AND operator 61 also performs a logic AND operation with respect to the received outputs. An exclusive logic OR operator 72 receives the output of the logic AND operator 61, the output of the logic AND operator 62, and the output of the logic AND operator 67 and performs an exclusive logic OR operation with respect to the received outputs. The logic AND operator 62 receives the output of the logic AND operator 53 and the output of the shift register S3 and performs a logic AND operation with respect to the received outputs. The logic AND operator 67 receives the output of the shift register S3 and the output of the logic AND operator 63 and performs a logic AND operation with respect to the received outputs. The shift register S3 receives the output of the exclusive logic AND operator 72 and outputs the received output according to a clock CLK.
The logic AND operator 53 receives the output of the logic AND operator 51 and an enable signal Enb. The logic AND operator 53 then performs a logic AND operation with respect to the received output and enable signal Enb. The logic OR operator 54 receives the output of the logic AND operator 52 and an inverted enable signal. The logic OR operator then performs a logic OR operation with respect to the received output and inverted enable signal. The logic AND operator 52 receives a selection signal FbMux and an output of a flip-flop t3 and performs a logic OR operation with respect to the received selection signal and output. The logic AND operator 51 receives the selection signal FbMux and the output of the flip-flop t3 that passes through an inverter and performs a logic AND operation with respect to the received selection signal and output. Flip-flops t3, t2, t1, and t0 that are connected in series operate according to the selection signal FbMux.
The logic AND operators 63 through 67 are used for a square operation and the flip-flops t3, t2, t1, and to and the logic AND operators 51 and 52 are used for a multiply operation.
Referring to
B. Power-and-Multiply Method
The following description with reference to
(1) When n=rs for an n-stage LFSR, a 2r-th power operation and a multiply operation are performed.
(2) The 2r-th power operation and the multiply operation are repetitively performed.
(3) To reduce complexity of the 2r-th power operation, α2
According to an exemplary implementation, a value that is previously stored in a table in the form of an n-tuple vector is used as a α2
According to an exemplary embodiment of the present invention, a state of an LFSR may be quickly calculated by using a 4-th power operation instead of a square operation when n=4. Equation (7) below illustrates a process of calculating a state of an LFSR using a 22(=4)-th power operation when n=4.
αxαt=((αx)2
When β=b3α3+b2α2+b1α+b0 and biε{0,1}, the 4-th power operation with respect to β is expressed as follows:
Since α12=α3+α2+α+1, α8=α2+1, and α4=α+1, Equation (8) can be expressed as follows:
β4=b3α3+(b3+b2)α2+(b3+b1)α+(b3+b2+b1+b0) (9)
The logic of a shift register for the 4-th power operation is illustrated in
As another example, a process of calculating a state of an LFSR using a 23(=8)-th power operation when n=12 can be expressed as follows:
αxαt=((αx)2
According to Equation (10), the 23-th power operation is performed four times.
According to an exemplary implementation, the processing flow of the power-and-multiply method by which a state of an n-stage LFSR is calculated is illustrated in
Referring to
For the 2r-th power operation, a bitwise exclusive logic OR operation y=y⊕Aj is performed for all j for 0≦j≦n−1 only when bi=1 in steps 416 through 418.
After every 2r-th power operation, a shift operation β=(β<<1)modf(x) by tp(≦2r−1) is performed in steps 419 through 422. f(x) in step 421 indicates a characteristic polynomial satisfying f(α)=0. If y represent a state of LFSR, step 421 corresponds to the same operation as shift the LFSR by one chip or y=y·α.
In step 423, the controller increases (i) by 1. Such an operation of the controller is repeated until it is determined that (i) is not less than s in step 424. If it is determined that (i) is not less than s, such as, (i) is equal to or greater than s in step 424, the controller writes a PN state corresponding to β 425 and terminates its operation.
The operation according to the processing flow described above loops s·(n+2r−1) times in the worst case and s·(n+2r−1)/2 times on the average. In other words, a method for calculating a state of an LFSR using a power-and-multiply method according to an exemplary embodiment of the present invention can allow more rapid and efficient calculation than a method according to the prior art. Moreover, although the state of the LFSR is mapped to elements of GF(2n), which are expressed as binaries, in the foregoing exemplary embodiment of the present invention, it may also be mapped to elements of GF(pn), which are expressed as p-adic numbers. It is obvious to those skilled in the art that the state of the LFSR is expressed with p-adic numbers based on the foregoing exemplary embodiment of the present invention and thus a detailed description thereof will not be provided.
In case of representing a state of the LFSR as p-adic numbers, an apparatus for generating a code according to an exemplary embodiment of the present invention comprises a first shift register logic(not depicted) for performing a pr-th power operation with respect to a characteristic polynomial indicating the current state value of the LFSR when n=rs in a finite field GF(pn) when the characteristic polynomial is expressed with elements of the GF(pn) and r and s are selected values, and for performing a bitwise exclusive OR operation with respect to an n-tuple vector αP
As an application of an exemplary embodiment of the present invention, a long code PN generator in which n=42 in an IS-95 and Code Division Multiple Access (CDMA)-2000 system can be considered.
As described above, an exemplary embodiment of the present invention suggests a method for calculating a state of an m-sequence generator (PN generator) constructed in the form of an LFSR. An exemplary embodiment of the present invention can be applied to, for example, a CDMA terminal. The CDMA terminal repeats operations of stopping a PN generator to reduce power consumption in the sleep mode and waking up from the sleep mode after a predetermined amount of time to receive a message. In order for the CDMA terminal to receive a message after waking up from the sleep mode, the state of the internal memory of the PN generator must be changed to a state that advances the elapsed time from the stop state. To this end, an exemplary embodiment of the present invention can be used.
Thus, an exemplary embodiment of the present invention may increase the rate and efficiency of the calculation of a state of an LFSR after a random time than the prior art.
While the present invention has been shown and described with reference to certain exemplary embodiments thereof, it will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the invention. For example, an exemplary embodiment of the present invention can be used in any application field for predicting or calculating the states of registers of an LFSR for a PN generator after a random given time t (or t shifts).
Number | Date | Country | Kind |
---|---|---|---|
2005-108268 | Nov 2005 | KR | national |