BACKGROUND OF INVENTION1. Field of the Invention[0001]
The present invention relates to an electronic device, and more specifically to an electronic scrambler/de-scrambler and related method for generating a scrambling sequence.[0002]
2. Description of the Prior Art[0003]
Modern communications systems have developed rapidly and become a fixture of the information age. Mobile (or cellular) phones are a prime example of how new technology can change people's lives. Mobile phones offer an inexpensive and convenient way to stay in touch with family, friends, and colleagues. The popularity of mobile phones has led to widespread use, which has created a demand for new functionality and associated advances in technology.[0004]
Recently, industry and standardization groups have developed the code division multiple access specification (cdma2000) for third generation (3G) wireless communication systems. The cdma2000system offers expanded functionality to mobile phones such as capabilities for sending pictures, Internet access, and expanded voice functionality.[0005]
A key element in most communications devices, including 3G mobile phones, is a scrambler/de-scrambler. A scrambler encodes data so that it can be safely transmitted. From the base station transmitter path, the channel interleaved symbols are scrambled before being fed into a subpacket symbol selection device. A source unit uses a scrambler to scramble data, and then transmits the scrambled data to a destination unit that uses a similar scrambler to descramble the data. The de-scrambler needs to generate the same scrambling sequence as the scrambler. The subpacket symbol selection selects a scrambled sequence start from an Fk value, wherein k is the subpacket index and the Fk value ranges from 72 to 7776 in steps of 24 (i.e. 72, 96 . . . 7752, 7776). According to cdma2000, the Fk value depends on a host of parameters including: an index of a subpacket being scrambled, a number of bits in an encoder packet (a plurality of subpackets), a number of 32-bit Walsh channels indexed by subpacket, a number of 1.25 ms slots for a subpacket, and a modulation order of each subpacket. All of these parameters and how they correlate are well known to those working in the cdma2000 field and are prescribed by the relevant cdma2000 specifications. If an unintended destination unit receives the scrambled data, it is likely that the unintended destination cannot readily descramble or understand the data. Encrypting data using a scrambler serves to protect privacy and commercial interests of data transmissions.[0006]
Consider a typical 17-tap linear[0007]feedback shift register10 as shown in FIG. 1 that is used in a forward packet data channel (F-PDCH) of cdma2000 as a scrambler to generate a scrambling sequence. Thescrambler10 comprises a series of connected registers D1-D17 and an exclusive OR (XOR)gate12 connected to outputs of the registers D14 and D17. Output of theXOR gate12 is input into the register D1 providing feedback giving the scrambler10 a generator sequence of h (D)=D17+D14+1. After the registers D1-D17 have been set with an initial state, the scrambler is clocked so that the D17 register outputs the scrambling sequence. The scrambling sequence is used to encode data bits of a communications signal, which in the case of the F-PDCH of cdma2000 means XORing the scrambling sequence with interleaver output symbols.
For the F-PDCH of cdma2000 the operation of the[0008]scrambler10 is as follows. Thescrambler10 is first initialized to an initial state of [D17 . . . D1]=[1 b15b14b13b12b11b10b9b8b7b6b5b4b3b2b1b0] where the b15, b14, b13, b12, b11, b10, b9, b8, b7, b6, b5, b4, b3, b2, b1, b0, b5,b4, b3, b2, b1, and b0bits are from a long code mask prescribed in the cdma2000specification. That is, register D17 is set to “1”, register D16 is set to b15, and so on with register D1 being set to b0. Next, thescrambler10 is clocked a number of times to generate a scrambling sequence at the output of the register D17. A de-scrambler using the same 17-tap linearfeedback shift register10 must be clocked between 72 and 7776 times to properly set the states of the registers D1-D17 for a particular subpacket. Once this state is reached, the de-scrambler is clocked repeatedly to output the desired scrambling sequence, being the same as that of thescrambler10.
When the de-scrambler is being clocked by the Fk value it is in a non-performing mode. Naturally, slower overall performance caused by this is more pronounced with higher Fk values. Slower performance of the de-scrambler affects the entire surrounding system and can introduce bottlenecks into otherwise streamlined systems. As it is desirable to avoid delay and increase data transfer rates in mobile phones and other communications systems, the scrambler as described above lacks efficiency. Prior art solutions to this problem include increasing the clock speed of the scrambler, which tends to introduce errors into a transmission.[0009]
SUMMARY OF INVENTIONIt is therefore a primary objective of the claimed invention to provide a scrambler and related method that can quickly step though a sequence of unnecessary intermediate states to solve the problems of the prior art.[0010]
Briefly summarized, the claimed invention includes an X-tap linear feedback shift register having X registers, a multiplexer having outputs connected to the registers; of the X-tap linear feedback shift register, and a plurality of logic gates connected to inputs of the multiplexers defining a generator sequence. Through the multiplexer, the plurality of logic gates provide parallel input to the X-tap linear feedback shift register that allows for an n-step shift operation of the X-tap linear feedback shift register. Also through the multiplexer, the X-tap linear feedback shift register can perform a single shift operation and can be loaded with a predetermined state.[0011]
According to the claimed invention, a method provides a series-parallel linear feedback shift register capable of performing a single step shift operation, performing an n-step shift operation, and being loaded with initial values. The method further loads the series-parallel linear feedback shift register with initial values, performs a predetermined number of n-step shift operations with the series-parallel linear feedback shift register, and performs a predetermined number of single step shift operations with the series-parallel linear feedback shift register. The method finally outputs contents of the series-parallel linear feedback shift register as the scrambling sequence while performing at least a portion of the predetermined number of the single step shift operations.[0012]
It is an advantage of the claimed invention that the multiplexer offers the X-tap linear feedback shift register three-mode functionality so that the shift register can be initialized, shifted by n-steps, and the shifted by a single step.[0013]
It is a further advantage of the claimed invention that a desired point in the generator sequence can be reached more quickly in proportion to the size of the n-step shift operation.[0014]
These and other objectives of the claimed invention will no doubt become obvious to those of ordinary skill in the art after reading the following detailed description of the preferred embodiment that is illustrated in the various figures and drawings.[0015]
BRIEF DESCRIPTION OF DRAWINGSFIG. 1 is a block diagram of a 17-tap linear feedback shift register used as a scrambler according to the prior art.[0016]
FIG. 2 is a block diagram of a scrambler according to a first embodiment of the present invention.[0017]
FIG. 3 is a block diagram of a scrambler according to a second embodiment of the present invention.[0018]
FIG. 4 is a flowchart of a method for generating a scrambling sequence according to the present invention.[0019]
DETAILED DESCRIPTIONAlthough the present invention will be described in the context a scrambler used in the forward packet data channel (F-PDCH) of cdma2000, this is not limiting. For example, the present invention applies equally to a de-scrambler, which is a similar device differing mainly by direction of application. Furthermore, the present invention can be applied to other communications systems where data scrambling is required such as computer networks, and further to data encryption in general.[0020]
Please refer to FIG. 2 illustrating a block diagram of a[0021]scrambler20 according to a first embodiment of the present invention. Thescrambler20 comprises ashift register22 having a plurality of registers D1-DN. Thescrambler20 further includes a plurality oflogic gates26 connected to output of the registers D1-DN of theshift register22, and amultiplexer28 for routing output of thelogic26 to inputs of the registers D1-DN of theshift register22. The plurality oflogic gates26 comprises two sets oflogic gates26aand26b. Thelogic26aprovides themultiplexer28 with output of the registers D1-DN that allows for a single bit shift of theshift register22 according to a predetermined generator sequence. Conversely, thelogic gates26bprovide themultiplexer28 with output of the registers D1-DN that allows for an n-step shift of theshift register22 following the predetermined generator sequence. Themultiplexer28, as determined according to setting of selection ends, can select between output oflogic26a,logic26b, or a predetermined initial state and load the registers D1-DN with the corresponding states. Output of thescrambler20 is taken from the register DN of theshift register22.
The[0022]scrambler20 can be operated according to the following procedure. First, themultiplexer28 is set to accept an initial state that is then set in the registers D1-DN. Then, themultiplexer28 is set to accept output from thelogic gates26bto change the states of the registers D1-DN for advancing theshift register22 by n steps according to the generator sequence for a predetermined number of n-steps. Finally, the selection ends of themultiplexer28 are set so that output oflogic26ais fed into registers D1-DN and a scrambling sequence is output from theshift register22 as the scrambler is clocked.
The structures of the
[0023]logic26aand
26bdetermine how the
shift register22 behaves, and specifically define the predetermined generator sequence. For example, according to the F-PDCH of cdma2000, the quantity of registers D
1-DN is seventeen (numbered D
1-D
17) and the one-bit-
shift logic26ais an XOR gate that XORs output of the fourteenth and seventeenth registers D
14, D
17 (see FIG. 1) as feedback for the first register D
1. This is equivalent to a 17-tap linear feedback shift register describing a generator sequence of h(D)=D
17+D
14+1. Such logic can be described by a feedback matrix:
wherein each row defines an on-state (binary “1”) of a corresponding one of the registers D[0024]1-D17 of the shift register22 (i.e. the first row to D1, the seventeenth row to D17), with each binary “1” indicating which register(s) D1-D17 (by column number) provide an output to an XOR gate that supplies input to each register. For example, the first row of H1 indicates that the output of register D14 and D17 are XORed then input to register D1; the second row indicates that the output of register D1 is input to register D2; the third row indicates that the output of register D2 is input to register D3; and so on, wherein the last row indicates that the output of register D16 is input to register D17.
Continuing the example, the
[0025]logic26baccording to the F-PDCH of cdma2000 provides an n-step shift of 24 bits. This is equivalent to performing twenty-four single bit shifts according to the matrix H
1, and can be described by the matrix H
124(H
1 to the power of 24):
Thus, the[0026]logic26bis significantly more complicated than thelogic26a, however, it can still be realized with XOR gates arranged according to the matrix H124. For example, the first row of H124indicates that the output of register D5 and D11 are XORed then input to register D1; the second row indicates that the output of register D6 and D12 are XORed then input to register D2; the third row indicates that the output of register D7 and D13 are XORed then input to register D3; and so on, wherein the last row indicates that the output of register D7 and D10 are XORed then input to register D17.
Generally, the[0027]shift register22 of thescrambler20 outputs a scrambling sequence as defined by the generator sequence of thelogic26a. The scrambling sequence can be quickly stepped through by n-steps to reach a desired point according to thelogic26b. Additionally, the registers D1-DN of theshift register22 can be loaded with predetermined states. Themultiplexer28 controls these three functions of thescrambler20 to generate a desired scrambling sequence.
Please refer to FIG. 3 showing a block diagram of a scrambler
[0028]30 according to a second embodiment of the present invention. The scrambler
30 includes registers D
1-D
17 each having an input, an output, and enable and clock ends. The outputs of the registers D
1-D
17 are denoted as b
0-b
16. The scrambler
30 further includes two sets of two-input multiplexers illustrated as multiplexers
32,
32″ and
34. Output of each
multiplexer34 is to a corresponding register D
1-D
17. Input to each
multiplexer34 is output of a corresponding multiplexer
32,
32″ and a bit of a predetermined long code mask (LCM). Each multiplexer
32 accepts input from a previous register and input from a
XOR gate36, which XORs output of registers according to the H
124matrix previously described. The multiplexer
32″ accepts input from a
XOR gate36 similar to each multiplexer
32 and further from a
XOR gate36″ corresponding to the matrix H
1. For example, the register D
4 outputs a state b
3, can accept input b
2 from the previous register D
3, can further accept a XORed result of the outputs b
7, b
13 from registers D
8, D
14, and can finally accept a bit of the LCM. To clarify, all registers D
2-D
17 are connected to a
multiplexer34, which is connected to a multiplexer
32 that accepts input from an
XOR gate36; and the register D
1 is connected to a
multiplexer34, which is connected to a multiplexer
32″ that accepts input from
XOR gates36,
36″. As can be seen in FIG. 3, the registers D
1-D
17 can function as a 17-tap linear feedback shift register for shifting a single bit, a 17-tap linear feedback shift register having parallel inputs that enable a jump of 24 bits, and can be set with a predetermined state or LCM depending on setting of the multiplexers
32,
32″, and
34. Table 1 summarizes the operating modes of the scrambler
30 in relation to the input-to-output selection at the multiplexers
32,
32″, and
34.
| TABLE 1 |
| |
| |
| Selected input at | Selected input at | |
| MUXs 32, 32′ | MUXs 34 | Mode |
| |
| 0 | 0 | 1 bit shift |
| 0 | 1 | Load LCM |
| 1 | 0 | Jump 24bits |
| 1 | 1 | Load LCM |
| |
The scrambler[0029]30 further includes a countdown counter38 and control logic40. The control logic40 comprises OR gates arranged so that a “run” input enables the registers D1-D17, a “load” input sets themultiplexers34 to load the registers D1-D17 with the LCM bits, and a clock “clk” input synchronizes operation of the registers D1-D17 with the counter38. The control logic40 can further output a “run 24 steps” bit to indicate that the scrambler is performing a 24-bit jump. The counter38 is a 9-bit counter, 9 bits being selected for the F-PDCH of cdma2000 so that 324 jumps (29=512>324) of 24 bits can be made to reach the 7776th state of the scrambler30. The counter38 accepts a 9-bit input “FKD24” (Fk divided by 24) which has a binary value ranging from 3 to 324 corresponding to states 72 to 7776. The logic40 ensures that as the counter38 counts down, the multiplexers32,32″, and34 are set for the scrambler30 to jump 24 bits. The scrambling sequence is output b16 from register D17.
An example will now be described to clarify the second embodiment. If a subpacket symbol selection device selects a scrambling sequence to start from an Fk value of 120, the “load” signal is initially set to “1”, which allows the[0030]multiplexers34 to load the registers D1-D17 with the LCM bits before the “load” signal is set back to “0”. Next, instead of clocking the registers D1-D17 for 120 times to get to the starting bit of the scrambling sequence of that particular subpacket symbol, the “FKD24” signal is provided with a value equal of 5 (120/24) which sets the “run 24 steps” signal to “1” and causes the multiplexers32,32″ to output the data at their inputs “1”. Thus, the scrambler30 operates under the “Jump 24 bits” mode and executes the first 24-bit jump. The countdown counter38 then counts down from 5 to 4 in the next clock cycle, the “run 24 steps” signal still remains at “1” and another 24-bit jump is executed. The scrambler30 operates under the “Jump 24 bits” mode for 5 clock cycles until the output of the countdown counter38 counts down to zero which resets the “run 24 steps” signal to “0”. At this stage, the output of register D17 (which is b16) is the starting bit of the scrambling sequence of that particular subpacket symbol (of Fk=120), and from here on, the scrambler30 operates under the “1 bit shift” mode and generates the scrambling sequence bit by bit (clock by clock) at b16.
In both embodiments the[0031]logic26,36, and36″ can be realized with XOR gates as described, however, other similarly functioning logic could be substituted. Similarly, themultiplexers28,32,32″, and34 are described as such for convenience and in practical application could be switching circuits, logic gates, or similar devices. Additionally, themultiplexers28,32,32″, and34 could be of different forms that still provide the functionality described. For instance, each pair of two-input multiplexers32,34 in the second embodiment could easily be replaced with one three-input multiplexer. Furthermore, when the present invention is applied to cases other than the cdma2000 example above, the inputs to the logic gates, structures of the control logic and counter, the predetermined initial value (LCM), and the output taken would be different than those described.
Please refer to FIG. 4 showing a flowchart of a method for generating a scrambling sequence according to the present invention. The method is described in conjunction with the scrambler[0032]30 as follows:
Step[0033]100: Start;
Step[0034]102:
Select input “1” of the[0035]multiplexers34 as the output for loading the initial state or LCM into the registers D1-D17;
Step[0036]104:
Set the counter[0037]38 to a predetermined number (3-324) of 24-bit shifts and set the multiplexers32,32″, and34 to states “1”, “1”, and “0” respectively to perform a 24-bit shift of the registers D1-D17 according to the generator sequence;
Step[0038]106: Perform a 24-bit shift by clocking the registers D1-D17 and the counter38;
Step[0039]108: Decrement the state of the counter38 by one;
Step[0040]110:
Is the state of the counter[0041]38 equal to zero? If it is, go on to step112; if not, return to step106;
Step[0042]112:
Set the multiplexers[0043]32,32″ to the state “0” (multiplexers34 are already set to “0”) to perform a single bit shift of the registers D1-D17 according to the generator sequence;
Step[0044]114:
Perform a single bit shift by clocking the registers D[0045]1-D17, where the scrambling sequence is output from the register D17;
Step[0046]116:
Is the end of the scrambling sequence reached? If it is, go to step[0047]18; if not, return to step114;
Step[0048]118: End.
The end of the scrambling sequence is determined by a component or user external to the scrambler[0049]30. In cdma2000 this is determined by a packet length of information to be scrambled. Naturally, the method as described could be similarly used with thescrambler20.
In contrast to the prior art, the present invention can load registers with initial values, generate a series of n-step jumps of a generator sequence, and generate a single step output of the generator sequence as a scrambling sequence. Where the prior art scrambler must be advanced linearly in single steps to reach a desired state, the present invention scrambler can be quickly advanced though parallel input. Considering the above-mentioned cmda2000 example. If the prior art scrambler is to reach an Fk value of 5088, it must undergo at least 5088 clock cycles. In contrast, the present invention in the same example would merely have to undergo 212 clock cycles, and thus is 24 times faster. Thus, the present invention scrambler offers the improvement of high-speed performance.[0050]
Those skilled in the art will readily observe that numerous modifications and alterations of the device may be made while retaining the teachings of the invention. Accordingly, the above disclosure should be construed as limited only by the metes and bounds of the appended claims.[0051]