A kind of method and device that generates the GOLD sequence
Technical field
The present invention relates to a kind of mobile communication system technology, specially refer to the method and the device that generate the GOLD scramble sequence in a kind of 3-G (Generation Three mobile communication system).
Background technology
In mobile communication system, can use pseudo random sequence (being called for short the PN sequence) with the binary digit message elder generation scrambling that information source produces usually, transmit again, the purpose of Chu Liing mainly is like this:
1, randomness realizes the encryption of communication channel;
Binary digit message and the very long pseudo random sequence exclusive-OR of one-period with information source produces so just can become former message impenetrable another sequence.Have only the same pseudo random sequence of use could recover former transmission content at receiving terminal.
2, spread-spectrum and realize CDMA communication according to orthogonality;
According to the shannon capacity formula, we can utilize yard bandwidth of expanding communication channel, have reached Utopian channel capacity.If cross-correlation coefficient very little (nearly orthogonal) between the employed sign indicating number resource then can be realized using between the user of different orthogonal sign indicating number not interfering with each other, on same frequency range, just may realize sending simultaneously many signals like this, the realization CDMA communication.
3, disordering data sequence and descrambling
In the digital communication system, as the distance of swimming (occurring 0 or 1 continuously) of appearance 1 or 0 is excessive continuously in the prime information, then will influence bit synchronous foundation and maintenance, the anti-interference under this kind situation is relatively poor simultaneously.Easily form and crosstalk.At this moment we can upset the prime information sequence and the sequence that forms similar white noise statistical property is transmitted.
Wherein, described pseudo random sequence has the fundamental characteristics of the random sequence of being similar to, and is a kind ofly to seem to be at random but be actually clocklike periodically binary sequence.In mobile communication system, the most frequently used PN sequence is maximum length linear code sequence (being called for short the m sequence), is produced by the linear feedback shift device, is characterized in having periodically and pseudo-randomness.
The GOLD sequence is a kind of sign indicating number sequence based on the m sequence, is usually used in the scrambling process of mobile communication system, and the GOLD sequence has better auto-correlation and their cross correlation, and the sequence number of generation is many.The autocorrelation of Gold sequence is not as the m sequence, and cross correlation is better than m sequence.
Method for scrambling in the mobile communication system is, for each code word, bit stream
(wherein
Be the amount of bits of the code word q of the physical channel transmission on each subframe) and binary pseudo-random sequence c
q(n) carry out scrambling, press the bit after following formula generates scrambling
Wherein,
In the LTE system, the length that is used for the scrambling process is M
PNPseudo random sequence GOLD sequence c (n) account form is as follows:
c(n)=(x
1(n+N
C)+x
2(n+N
C))mod2
x
1(n+31)=(x
1(n+3)+x
1(n))mod2
x
2(n+31)=(x
2(n+3)+x
2(n+2)+x
2(n+1)+x
2(n))mod2
Wherein, N
CBe an initial value of setting according to demand, x
1And x
2Be two kinds of m sequences, x
1(n) be x
1The n position of sequence, x
2(n) be x
2The n position of sequence, n=0,1,2 ..., M
PN-1.
x
1The initial value of sequence is x
1(0)=1, x
1(n)=0, n=1,2 ..., 30, x
2The initial value of sequence can pass through
Calculate and obtain n-0,1,2 ..., 30, wherein, c
InitFor calculating x
2The parameter of sequence initial value, the value of this parameter depends on the application of this pseudo random sequence.
The method that prior art generates the GOLD sequence is as shown in Figure 1:
1, at first with x
1Sequence and x
231 initial values of sequence, order is saved in two 31 grades of feedback shift register Register1[30 respectively: 0] and Register2[30: 0] in, Register1[n]=x
1(n), Register2[n]=x
2(n), n=0,1,2 ..., 30;
2, judge that whether shift count i is more than or equal to N
C, if, with Register1[0] and Register2[0] in value carry out the i-N that XOR obtains c (n) sequence
CThe position;
3, with Register1[0] in value and Register1[3] in value carry out XOR and handle;
4, each bit among the Register1 is moved to right one, the result of step 3 is saved in Register1[30];
5, with Register2[0] and Register2[1], Register2[2], Register2[3] in value carry out XOR and handle;
6, each bit among the Register2 is moved to right one, the result of step 5 is saved in Register2[30];
8, repeated execution of steps 2 to 7, up to shift count i=M
PN-1+N
C
The bit of a c (n) sequence is only calculated in the each displacement of method of prior art generation GOLD sequence, and like this, a clock cycle can only generate the bit of a c (n) sequence at most, needs M at least at least and will generate whole c (n) sequence
PN-1+N
CThe individual clock cycle, it is excessive to generate whole sequence required time expense.
Summary of the invention
In view of this, the invention provides a kind of method and device of the GOLD of generation sequence, to solve the excessive problem of sequence rise time expense that prior art exists.
Technical scheme of the present invention is:
A kind of method that generates the GOLD sequence comprises,
Step 1, two 31 grades of feedback shift registers of use are preserved x respectively
1Sequence and x
231 bits of original values of sequence;
Step 2, as acquired x
1Sequence and x
2Sequence length is more than or equal to N
CThe time, the figure place of preserving in the shift register is not less than N
CX
1The x of sequence and identical bits
2The parallel XOR of sequence bits generates corresponding c (n);
Step 3, utilize 31 x in the feedback shift register
1The sequence bits parallel computation obtains x
1Follow-up 28 bits of sequence utilize 31 x in the feedback shift register
2The sequence bits parallel computation obtains x
2Follow-up 28 bits of sequence;
Step 4, with acquired x
1Sequence and x
2High 31 of sequence are stored in the respective feedback shift register respectively in proper order;
Repeated execution of steps 2~4 is up to generating M
PNIndividual c (n) sequence bits position.
Wherein, described c (n) sequence is the GOLD sequence of required calculating, x
1Sequence and x
2Sequence is for calculating two required maximum length linear code sequences of GOLD sequence, N
CBe an initial value of setting according to demand, M
PNLength for c (n) sequence of required calculating.
Described step 2 further comprises:
If the x that preserves in the feedback shift register
1Sequence and x
2The sequence median is higher than N
CNumber of bits less than 28, with the x that preserves in the feedback shift register
1Sequence and x
2The sequence median is higher than N
CBit carry out buffer memory respectively;
If the x that preserves in the feedback shift register
1Sequence and x
2The sequence median is higher than N
CNumber of bits more than or equal to 28, with high 28 x that preserved of feedback shift register
1Sequence and x
2Sequence respectively with the x of buffer memory
1Sequence and x
2Sequence is spliced, the x that splicing is obtained
1Low 28 and the x of sequence
2Low 28 XORs that walk abreast of sequence calculate and obtain c (n) sequence corresponding positions, spliced x
1Sequence and x
2The sequence remaining bits is carried out buffer memory respectively.
Described step 2 further comprises:
If the x that preserves in the feedback shift register
1Sequence and x
2The sequence median is higher than N
CNumber of bits less than 28, with the x that preserves in the feedback shift register
1Sequence and x
2The sequence median is higher than N
CThe bit XOR that walks abreast calculate to obtain c (n) sequence corresponding positions;
Otherwise with high 28 x that preserved of feedback shift register
1Sequence and x
2The sequence XOR that walks abreast calculate to obtain c (n) sequence corresponding positions.
The present invention also provides a kind of device of the GOLD of generation sequence simultaneously, comprising:
Two 31 grades of feedback shift register Register1 and Register2; x
1The sequence computing module, x
2The sequence computing module, c (n) sequence computing module; Buffer 1 and buffer 2;
Wherein, described x
1The sequence computing module, x
2The sequence computing module, c (n) sequence computing module comprises 28 XOR computing units respectively;
Described Register1 is used to preserve x
1Sequence is respectively with described x
1The sequence computing module is connected with described buffer 1, sends the x that preserves among the Register1
1Sequence is given described x
1Sequence computing module and described buffer 1;
Described Register2 is used to preserve x
2Sequence is respectively with described x
2The sequence computing module is connected with described buffer 2, sends the x that preserves among the Register2
2Sequence is given described x
2Sequence computing module and described buffer 2;
Described x
1The data that the sequence computing module sends Register1 are carried out 28 tunnel parallel XORs calculating and result of calculation are fed back to described Register1;
Described x
2The data that the sequence computing module sends Register2 are carried out 28 tunnel parallel XORs calculating and result of calculation are fed back to described Register2;
Described buffer 1 is connected with described c (n) sequence computing module respectively with described buffer 2, sends x
1Sequence and x
2Sequence is to described c (n) sequence computing module;
Described c (n) sequence computing module is with x
1Sequence and x
2The corresponding bit position of the sequence XOR that walks abreast obtains corresponding c (n) sequence bits position.
GOLD sequence computational methods of the present invention and device have adopted 28 tunnel parallel computation x
1Sequence, x
2Sequence and c (n) sequence is once calculated and can be generated 28 GOLD sequence bits, has reduced to calculate the time overhead of GOLD sequence, has improved the computational speed of GOLD sequence.
Description of drawings
Accompanying drawing 1 is that prior art generates GOLD sequence method schematic diagram
Accompanying drawing 2 is that the present invention generates x
1The sequence method schematic diagram
Accompanying drawing 3 is that the present invention generates x
2The sequence method schematic diagram
Accompanying drawing 4 is that the present invention generates c (n) sequence method schematic diagram
Accompanying drawing 5 is method flow diagrams that the specific embodiment of the invention 1 generates the GOLD sequence
Accompanying drawing 6 is method flow diagrams that the specific embodiment of the invention 2 generates the GOLD sequence
Accompanying drawing 7 is structure drawing of device that the present invention generates the GOLD sequence
Among the figure, 201,301,401 is the XOR computing unit.
Embodiment
For clearly demonstrating technical scheme of the present invention, provide preferred embodiment below and be described with reference to the accompanying drawings.
Specific embodiment 1
The method that present embodiment generates the GOLD sequence is as shown in Figure 5:
1, with x
131 initial value x of sequence
1(0)~x
1(30) order is saved in the Register1[0 of 31 grades of feedback shift register Register1: 30] in, with x
231 bit initial values x of sequence
2(0)~x
2(30) order is saved in the Register2[0 of 31 grades of feedback shift register Register2: 30] in;
2, relatively k with
Size, if
Execution in
step 3, if
Execution in
step 4, if
Execution in
step 5, wherein k is that
step 6 is carried out number of times,
For rounding operation downwards;
3 and be about to Register1[n] and Register2[n] carry out XOR, obtain the low 30-(N of c (n) sequence
C-28 * k) Bit datas, execution in step 5, wherein, n=N
C-28 * k ..., 30;
4 and be about to Register1[n] and Register2[n] carry out XOR, obtain follow-up 28 Bit datas of c (n) sequence; Wherein, n=3,4,5 ..., 30;
The method of generation c (n) sequence as shown in Figure 4;
5, judge that whether the bit number of acquired c (n) sequence is more than or equal to M
PN, if execution in step 8, otherwise execution in step 6;
6 and be about to Register1[i] and Register1[i+3] value in the register carries out XOR and obtains x
1Follow-up 28 Bit datas of sequence; And be about to Register2[i] and Register2[i+1], Register2[i+2], Register2[i+3] in value carry out XOR, obtain x
2Follow-up 28 Bit datas of sequence; Wherein, i=0,1,2 ..., 27;
7, the data among the Register1 are moved to right 28 in proper order, with 28 bit x of this XOR acquisition
1Sequence order is stored in Register1[3: 30] in; Data among the Register2 are moved to right 28 in proper order, with 28 bit x of this XOR acquisition
2Sequence order is stored in Register2[3: 30] in; Execution in step 2;
Generate x in step 6~7
1The method of sequence generates x as shown in Figure 2
2The method of sequence as shown in Figure 3, in the present embodiment, to x
1Sequence and x
2Sequence has respectively used 28 XOR computing units to realize once parallel 28 x of generation
1Sequence subsequent bits and 28 x
2The sequence subsequent bits;
8,0~M of c (n) sequence of output acquisition
PN-1, finish this and generate GOLD sequence process.
Specific embodiment 2
The method flow of the generation GOLD sequence of present embodiment is as shown in Figure 6:
Step 1 is identical with specific embodiment 1;
2, relatively k with
Size, if
Execution in
step 3, if
Execution in
step 4, if
Execution in step 7, wherein k is that step 8 is carried out number of times,
For rounding operation downwards;
3, with Register1[n] in data be saved in the buffer 1, Register2[n] be saved in the buffer 2, execution in step 7, wherein, n=N
C-28 * k ..., 30;
4, with Register1[n] in data and the data in the buffer 1 splice, export low 28 bits of spliced data, wherein, n=3 ..., 30;
Wherein, described joining method is for data that will preserve in the buffer low level as the splicing data, with Register1[n] in data as the high position of splicing data.
5, with Register2[n] in data and the data in the buffer 2 splice, export low 28 bits of spliced data, wherein, n=3 ..., 30;
Wherein, described joining method is for data that will preserve in the buffer low level as the splicing data, with Register1[n] in data as the high position of splicing data.
6 and be about to each Bit data of step 4 output and carry out XOR with the same bits bit data that step 5 is exported, calculate corresponding 28 bit c (n) sequences;
The method of generation c (n) sequence as shown in Figure 4;
7, judge that whether the bit number of acquired c (n) sequence is more than or equal to M
PN, if execution in step 10, otherwise execution in step 8;
8, identical with specific embodiment 1 step 6;
9, identical with specific embodiment 1 step 7;
Generate x in step 8~9
1The method of sequence generates x as shown in Figure 2
2The method of sequence as shown in Figure 3, in the present embodiment, to x
1Sequence and x
2Sequence has respectively used 28 XOR computing units to realize once parallel 28 x of generation
1Sequence subsequent bits and 28 x
2The sequence subsequent bits;
10,0~M of c (n) sequence of output acquisition
PN-1, finish this and generate GOLD sequence process.
Specific embodiment 3
Present embodiment is a kind of preferred implementation that the present invention generates GOLD sequence device, and its apparatus structure comprises as shown in Figure 7:
Two 31 grades of feedback shift register Register1 and Register2; x
1The sequence computing module, x
2The sequence computing module, c (n) sequence computing module; Buffer 1 and buffer 2;
Wherein, described x
1The sequence computing module, x
2The sequence computing module, c (n) sequence computing module comprises 28 XOR computing units respectively;
Described Register1 is used to preserve x
1Sequence is respectively with described x
1The sequence computing module is connected with described buffer 1, sends the x that preserves among the Register1
1Sequence is given described x
1Sequence computing module and described buffer 1;
Described Register2 is used to preserve x
2Sequence is respectively with described x
2The sequence computing module is connected with described buffer 2, sends the x that preserves among the Register2
2Sequence is given described x
2Sequence computing module and described buffer 2;
Described x
1The data that the sequence computing module sends Register1 are carried out 28 tunnel parallel XORs calculating and result of calculation are fed back to described Register1;
Described x
2The data that the sequence computing module sends Register2 are carried out 28 tunnel parallel XORs calculating and result of calculation are fed back to described Register2;
Described buffer 1 is connected with described c (n) sequence computing module respectively with described buffer 2, sends x
1Sequence and x
2Sequence is to described c (n) sequence computing module;
The x that described c (n) sequence computing module sends over described buffer 1 and described buffer 2
1Each bit of sequence and x
2The same bits position of the sequence XOR that walks abreast obtains corresponding c (n) sequence bits position.
The above is the preferred embodiments of the present invention only, is not limited to the present invention, and obviously, those skilled in the art can carry out various changes and modification and not break away from the spirit and scope of the present invention the present invention.Like this, if of the present invention these are revised and modification belongs within the scope of claim of the present invention and equivalent technologies thereof, then the present invention also is intended to comprise these changes and modification interior.