Summary of the invention
Technical problem to be solved by this invention is, a kind of block decoding method, decoder and receiving terminal are provided, and lacks the problem of unified decoding scheme for solving the existing coding of the piece for LTE system, realizes unified block decoding.
In order to address the above problem, the present invention proposes a kind of block decoding method, comprising:
The list entries of data to decode is adjusted into the laggard row data replacement of unified number of bits; Judge that according to the length of initial information whether the data after displacement need mask processing, if desired go mask processing;
For carrying out quick Hadamard transformation without data after going mask processing or going mask displacement afterwards; The matrix obtaining from quick Hadamard transformation, search out maximum; Carry out decoding output according to described maximum and corresponding rower, row mark thereof.
Wherein, the described list entries by data to decode is adjusted into unified number of bits, refers to the vector that is less than unified number of bits for list entries, and the part of not enough figure place is given to zero padding processing; Exceed the vector of unified number of bits for list entries, intercept from front to back unified number of bits.
Described list entries is the list entries of (32, O) coding, or the list entries of (20, A) coding.
Described unified number of bits is 32 number of bits.
Described block decoding method further comprises: after completing data replacement, directly deposit the basic sequence matrix of data after displacement in memory.After described displacement, to fall be mask basic sequence to the basic sequence square of data, only stores the mask subset in basic sequence in memory.
The described length according to initial information judges whether the data after displacement need mask processing, refers to whether the length that judges initial information is less than or equal to 6 bits and judges whether to exist mask:
If be less than or equal to 6 bits, do not go mask processing, directly carry out quick Hadamard transformation;
If be greater than 6 bits, go mask processing, after going mask to process, carry out again quick Hadamard transformation.
In the peaked step of described search:
If when initial information length L is more than or equal to 6 bit, in U × 2
mmatrix in search for, find out the element of absolute value maximum wherein as maximum, wherein U is unified number of bits, m=L-6;
If when initial information length k is less than 6 bit, in the vector of U × 1 front 2
k-1in individual element, search for the element of absolute value maximum as maximum, wherein U is unified number of bits.
The present invention also provides a kind of decoder, comprising:
Data replacement module, for receiving data to decode, is adjusted into the laggard line replacement of unified figure place by the list entries of data to be decoded;
Go mask module, in the time that the length of initial information is greater than 6 bit, the data after displacement are gone to mask processing;
Quick Hadamard transformation module, for receive the data the displacement that the length of initial information is less than or equal to 6 bits from data replacement module, or from going mask module to receive the data of removing mask, and received data are carried out to quick Hadamard transformation;
Maximum value search module, searches out maximum for the matrix obtaining from quick Hadamard transformation, exports rower and the row of this maximum and correspondence thereof and marks to decoding output module;
Decoding output module, for carrying out decoding output according to described maximum, rower, row mark.
The present invention also provides a kind of receiving terminal, and this receiving terminal comprises decoder, and described decoder comprises:
Data replacement module, for receiving data to decode, is adjusted into the laggard line replacement of unified figure place by the list entries of data to be decoded;
Go mask module, in the time that the length of initial information is greater than 6 bit, the data after displacement are gone to mask processing;
Quick Hadamard transformation module, for receive the data the displacement that the length of initial information is less than or equal to 6 bits from data replacement module, or from going mask module to receive the data of removing mask, and received data are carried out to quick Hadamard transformation;
Maximum value search module, searches out maximum for the matrix obtaining from quick Hadamard transformation, exports rower and the row of this maximum and correspondence thereof and marks to decoding output module;
Decoding output module, for carrying out decoding output according to described maximum, rower, row mark.
Block decoding method, decoder and receiving terminal that the present invention proposes, can be by (32, O) and the decoder of (20, A) two kinds of codings unite, for above-mentioned two kinds of decoders, by adjusting list entries, the laggard line replacement of unified number of bits, recycling FHT conversion realizes fast decoding, and the present invention is further, also can reduce memory space by the mask subset of only storing after displacement, be conducive to exploitation and realize.
Embodiment
For making the object, technical solutions and advantages of the present invention clearer, below in conjunction with accompanying drawing, the present invention is described in further detail.
Block decoding method provided by the present invention, decoder and receiving terminal, for (32, O), (20, A) decoded mode of two kinds of codings is unified, can be unified into a decoder and realize, saving resource, convenient exploitation realizes.
Block decoding method of the present invention, comprising:
The list entries of data to decode is adjusted into the laggard row data replacement of unified number of bits; Judge that according to the length of initial information whether the data after displacement need mask processing, if desired go mask processing;
For carrying out quick Hadamard transformation without data after going mask processing or going mask displacement afterwards; The matrix obtaining from quick Hadamard transformation, search out maximum; Carry out decoding output according to described maximum and corresponding rower, row mark thereof.
Wherein, the list entries of data to decode is adjusted into unified number of bits, refers to the vector that is less than unified number of bits for list entries, the part of not enough figure place is given to zero padding processing; Exceed the vector of unified number of bits for list entries, intercept from front to back unified number of bits.
Described list entries is the list entries of (32, O) coding, or the list entries of (20, A) coding.Described unified number of bits is 32 number of bits.
Described block decoding method further comprises: after completing data replacement, directly deposit the basic sequence matrix of data after displacement in memory.
As shown in Figure 2, shown the flow chart of realizing block decoding method in the present invention, described block decoding method comprises the steps:
Step 201, adjusts list entries, and the data to be decoded after adjusting are replaced;
Known according to the description in background technology, for the basic sequence of coding, obtained by a series of ranks displacement by the female code of RM, so for the data to decode receiving, for the correct use of Hadamard (hadamard) conversion FHT fast, first just to replace data to be decoded.For two kinds of piece encryption algorithms in LTE system, as shown in Figure 3, in figure, dash area represents the displacement of (20, A) decoding to the displacement relation of its correspondence, and whole sequence represents the displacement of (32, O) decoding.
In order to use unified Hadamard matrix to carry out quick Hadamard transformation in follow-up calculating, before replacing, need to adjust list entries, list entries is adjusted into unified number of bits, for example, the vector that is less than 32 bits for (20, A) decoding or similar list entries, should give zero padding processing by the part of 32 of list entries less thaies; For the vector that exceedes 32 bits for list entries, get first 32 and carry out decoding.
For the basic sequence matrix in the LTE system of describing in background technology, in the time of decoding, first the basic sequence matrix that completes displacement is directly deposited in for example, in memory (internal memory Memory), when decoding, directly read.
Owing to only having used mask basic sequence in decode procedure, preferably, only need rear seven row (mask subset) in the basic sequence diagram shown in storage map 1, the size that can reduce like this memory (for example internal memory Memory), reduces costs and system resource overhead.
Step 202, judges whether to exist mask, goes mask processing if exist;
Wherein, can by judging whether the length of initial information is less than or equal to 6 bits and judges whether to exist mask: if be less than or equal to 6 bits, while just showing to encode, this information is not subject to the impact of mask subset, and it goes without doing goes mask processing, can directly carry out quick Hadamard transformation; Otherwise if be greater than 6 bits, the processing that will remove mask, goes to carry out quick Hadamard transformation after mask processing again;
Step 203, quick Hadamard transformation, calculates the correlation vector of Hadamard matrix and input vector, and it has mainly utilized butterfly computation to reduce operand.
Have a lot of methods can be in the hope of the correlation vector of Hadamard matrix and input vector, but wherein quick Hadamard transformation be optimum the fastest.
Step 204, search maximum.For maximum value search, in decoding algorithm, need classification to process:
(1) for being more than or equal to the initial information length of 6 bits, peaked search is in 32 × 2 of correspondence
mif carried out in (initial information length is L, so m=L-6) matrix, find out wherein that element of absolute value maximum, export corresponding maximum and rower thereof and row and mark to decoding output module;
(2), for being less than the initial information length of 6 bits, first making its initial information length is k, then in 32 × 1 vector front 2
k-1in individual element, search for that element of absolute value maximum, export corresponding maximum and rower thereof and row and mark to decoding output module.
Step 205, decoding output.
Carry out decoding output according to the relevant parameter that carries out obtaining in the step of maximum value search (maximum and rower thereof and row mark) from step 204.Carry out the flow chart of the decoding output judgement that the concrete steps of decoding output can be shown in Figure 4.
As shown in Figure 4, shown the judgement flow chart that carries out decoding output according to maximum, rower, row mark.Wherein:
● according to maximum, can obtain the b of decoding output
0value.Concrete mode is: first judge that maximum, whether for just, if just, makes b
0=0, if negative, make b
0=1; This has just obtained the b of decoding output
0value;
● according to rower, can obtain the b of decoding output
1~b
5.Concrete mode is: first rower is converted to binary number, then carries out binary digit inverted order, using the binary digit of inverted order output as b
1~b
5;
● according to row mark, can obtain the b of decoding output
6~b
12.Concrete mode is: first row mark is converted to binary number, using the binary numeral after conversion as b
6~b
12;
● last, by b
0, b
1~b
5, b
6~b
12be combined as successively b
0~b
12as output decoded information, and output length equals raw information length.
Based on above-mentioned interpretation method, as shown in Figure 5, show a kind of decoder 500 of the present invention, this decoder comprises:
Data replacement module 501, for receiving data to decode, replaces data to be decoded.
In order to use unified Hadamard matrix to carry out quick Hadamard transformation, before replacing, the vector that is less than 32 bits for (20, A) decoding or similar list entries, should give zero padding processing by the part of 32 of list entries less thaies; For the vector that exceedes 32 bits for list entries, get first 32 and carry out decoding.
For two kinds of piece encryption algorithms in LTE system, as shown in Figure 3, in figure, dash area represents the displacement of (20, A) decoding to the displacement relation of its correspondence, and whole sequence represents the displacement of (32, O) decoding.
In the time of decoding, first the basic sequence matrix that completes displacement is directly deposited in for example, in memory (internal memory Memory), when decoding, directly read.Owing to only having used mask basic sequence in decode procedure, preferably, only need rear seven row (mask subset) in the basic sequence diagram shown in storage map 1, the size that can reduce like this memory (for example internal memory Memory), reduces costs and system resource overhead.
Go mask module 502, in the time that the length of initial information is greater than 6 bit, the processing that will remove mask to the data after displacement;
Quick Hadamard transformation module 503, be less than or equal to the data the displacement of 6 bits for the length that receives initial information from data replacement module 501, or from going mask module 502 to receive the data of removing mask, and received data are carried out to quick Hadamard transformation;
Maximum value search module 504, searches out maximum for the matrix obtaining from quick Hadamard transformation, exports rower and the row of this maximum and correspondence thereof and marks to decoding output module 505;
Decoding output module 505, for carrying out decoding output according to described maximum, rower, row mark.The concrete mode of decoding output can, referring to Fig. 4 and corresponding description, not repeat them here.
Based on above-mentioned decoder, the present invention also can provide a kind of receiving terminal with decoder shown in Fig. 5, for carrying out decoding output to receiving data, completes decode procedure.The decoder of this receiving terminal, before replacing, is less than the vector of 32 bits for (20, A) decoding or similar list entries, the part of 32 of list entries less thaies should be given to zero padding processing; For the vector that exceedes 32 bits for list entries, get first 32 and carry out decoding.So just can use unified Hadamard matrix to carry out quick Hadamard transformation, and further carry out decoding output according to quick Hadamard transformation result.Concrete decoding procedure can, referring to the detailed description about interpretation method shown in decoder shown in Fig. 5 and Fig. 2, not repeat them here.
With the example that is decoded as of (32, O), illustrate the application example of block decoding of the present invention below.
For the decoding of (32, O) in LTE, the sequence that is 8 for CQI raw information length, it through the sequence obtaining after (32, O) coding, modulation, plus noise, demodulation is:
[-0.3438 0.4688 -0.6250 -0.7500 0.6250 -0.8750
-0.5313 -0.5000 0.6875 -0.9063 0.4688 -0.2813
0.5313 -0.7188 -0.5938 -0.5625 0.9375 -0.6250
-0.6250 -0.5313 0.2813 -1.1563 -0.7813 -0.6250
0.5938 0.7500 -0.7188 0.8750 -1.0625 -1.0313
0.2188 0.8438]
The first step, carries out replacement Treatment to input vector, after above-mentioned input vector displacement, becomes:
[0.8438 -0.3438 0.2813 0.4688 -0.6250 -1.1563
-0.7500 0.6250 -0.7813 -0.8750 -0.5313 -0.6250
-0.5000 0.6875 -0.9063 0.5938 -0.5313 0.7500
0.4688 -0.2813 0.5313 -0.7188 -0.7188 0.8750
-0.5938 -0.5625 -1.0625 0.9375 -0.6250 -0.6250
-1.0313 0.2188]。
Second step, judges whether to exist mask, goes mask processing if exist.Because the length of initial information is 8, be greater than 6 bits, so will go to mask processing, 32 × 2
m(m=8-6=2) it is as follows that matrix removes the matrix that the result after mask is 32 × 4:
-0.8438 -0.8438 -0.8438 -0.8438
0.3438 0.3438 0.3438 0.3438
-0.2813 -0.2813 0.28l3 0.2813
-0.4688 -0.4688 -0.4688 -0.4688
0.6250 0.6250 -0.6250 -0.6250
1.1563 1.1563 1.1563 1.1563
0.7500 0.7500 0.7500 0.7500
-0.6250 0.6250 -0.6250 0.6250
0.7813 -0.7813 0.7813 -0.7813
0.8750 -0.8750 -0.8750 0.8750
0.5313 0.5313 -0.5313 -0.5313
0.6250 0.6250 0.6250 0.6250
0.5000 -0.5000 0.5000 -0.5000
-0.6875 0.6875 -0.6875 0.6875
0.9063 0.9063 -0.9063 -0.9063
-0.5938 0.5938 0.5938 -0.5938
0.5313 0.5313 -0.5313 -0.5313
-0.7500 0.7500 0.7500 -0.7500
-0.4688 0.4688 0.4688 -0.4688
0.2813 0.2813 -0.2813 -0.2813
-0.5313 0.5313 -0.5313 0.5313
0.7188 -0.7188 0.7188 -0.7188
0.7188 0.7188 0.7188 0.7188
-0.8750 0.8750 -0.8750 0.8750
0.5938 -0.5938 0.5938 -0.5938
0.5625 -0.5625 -0.5625 0.5625
1.0625 1.0625 -1.0625 -1.0625
-0.9375 -0.9375 0.9375 0.9375
0.6250 0.6250 0.6250 0.6250
0.6250 -0.6250 -0.6250 0.6250
1.0313 -1.0313 -1.0313 1.0313
-0.2188 0.2188 0.2188 -0.2188
The concrete mode of removing mask, by those skilled in the art are familiar with, does not repeat them here.
The 3rd step, quick Hadamard transformation.Result after conversion is that 32 × 4 matrix is as follows:
6.5625 4.6875 -1.0000 1.3750
6.5000 0.7500 -1.6875 -7.1875
3.6875 -5.1875 1.3750 -1.2500
-7.6250 -1.8750 1.1875 -3.8125
-1.6875 -6.1875 0.2500 -6.7500
-3.7500 1.1250 -0.9375 -5.5625
-0.1875 -1.4375 -2.0000 -0.2500
5.0000 -5.3750 2.8125 1.4375
-6.0000 6.0000 1.8125 -0.1875
-5.0625 -1.4375 -0.3750 5.2500
0.7500 4.0000 -0.4375 -5.6875
-0.5625 -0.1875
-0.2500
-5.5000 -1.3750 -2.1875 -5.3125
0.4375 -4.5625 -0.8750 5.8750
-3.3750 5.7500 -0.0625 3.8125
5.8125 0.3125 1.2500 -3.5000
0.6250 1.5000 -0.0625 -1.1875
-1.8125 -5.3125 0.3750 -5.6250
0.1250 -1.7500 -1.3125 2.3125
0.4375 -4.8125 -0.3750 -6.6250
0.7500 -7.0000 -1.9375 4.5625
-5.6875 -0.5625 2.5000 5.3750
-0.6250 -1.8750 -0.0625 -2.0625
-3.3125 7.3125 -0.1250 -0.7500
1.4375 -4.5625 -0.8750 4.8750
-0.2500 0.3750 -1.6875 -0.8125
3.0625 5.5625 0.7500 0
-5.3750 -1.2500 -0.0625 -4.6875
-6.1875 -3.0625 -1.5000 -2.8750
1.6250 1.6250 -0.8125 -0.8125
-1.4375 -3.0625 -0.7500 0.6250
-5.3750 -5.1250 0.9375 2.6875
The 4th step, search maximum, obtain maximum and relevant information.
Search for the matrix that in the 3rd step, the result after FHT conversion is 32 × 4, the element that therefrom finds its absolute value maximum is the position that square frame is irised out, and known its rower is 12, and row are designated as 3.
The 5th step, carry out decoding output according to maximum and relevant information.
Wherein, line number is 32, and the scope of rower is exactly 0~31, so adopt 5 binary representations, for row mark, has limited its columns can not exceed 4 according to algorithm, so row mark scope is 0~3, adopts 2 binary systems to represent.
In this example due to search-21.125 for negative value, if be approximately decided to be 1, so decoding Output rusults first place is 1; Its corresponding row is designated as 12, while it being carried out to Binary Conversion, 12-1=11 is converted to Binary Zero 1011, and then backward output comes 2nd~6; Its respective column is designated as 3, and while it being carried out to Binary Conversion, it is 7~8 of 10 Sequential outputs to that 3-1=2 is carried out to Binary Conversion, so obtain final decode results is:
[1 1 1 0 1 0 1 0]。
Suppose that the maximum that searches is for for example, on the occasion of (21.125), if be approximately decided to be 0, decoding Output rusults first place is 0, and rower is 12, and row are designated as 3, according to the method described above, can obtain final decode results and is:
[0 1 1 0 1 0 1 0]。
The foregoing is only embodiments of the invention, be not limited to the present invention, for a person skilled in the art, the present invention can have various modifications and variations.Within the spirit and principles in the present invention all, any amendment of doing, be equal to replacement, improvement etc., within all should being included in claim scope of the present invention.