Summary of the invention
In view of this, main purpose of the present invention is to provide a kind of method and device that carries out signal modulation and spread processing, can optimize the modulation and the spread processing process of signal, reduces the processing time, and reduces taking of resource.
For achieving the above object, technical scheme of the present invention is achieved in that
The invention provides a kind of method of carrying out signal modulation and spread processing, comprising:
Mapping table under A, setting and initialization quaternary PSK QPSK data-modulated and the 16 quadrature amplitude modulation QAM data-modulated;
B, the user data that will send are divided by fixed-length bits, and do the system conversion;
C, under the spread spectrum coefficient length of current use, each spread spectrum code value is carried out (1-spread spectrum code value)/2 computings, and with result of calculation with through division and conversion process after the user data addition, afterwards with addition result as under be marked in the mapping table and table look-up, obtain the numerical value behind the spread spectrum;
Numerical value shines upon by the modulation system of current use behind D, the spread spectrum that step C is obtained, obtains the signal value on I road and Q road respectively.
Wherein, step B specifically comprises: the binary system user data that will send is divided into fixed-length bits in order, and the fixed-length bits of being divided is moved to left one, changes into metric user data again.
In the such scheme, the described mapping table of steps A comprises: be used to search spread spectrum value mapping table that the QPSK modulation is worth behind the spread spectrum down, be used to search the spread spectrum value mapping table that the 16QAM modulation is worth behind the spread spectrum down; Be respectively applied for and search the QPSK modulation IQ road signal map table of I road signal value, Q road signal value down, be respectively applied for and search the 16QAM modulation IQ road signal map table of I road signal value, Q road signal value down.
Wherein, described each spread spectrum value mapping table, each I road signal and Q road signal map table are respectively an array, corresponding six arrays of described mapping table.
In the such scheme, the described fixed-length bits of step B is determined according to modulation system; Described fixed-length bits is dibit or four bits.
In the such scheme, step C is described in mapping table, table look-up into: according to the modulation system of current use, in corresponding spread spectrum value mapping table, search.
In the such scheme, the described current modulation system of using of step D is as the QPSK modulation system or be the 16QAM modulation system; The described mapping of step D is specially: numerical value is searched at the IQ road signal map table that is used for searching under QPSK modulation or the 16QAM modulation as subscript behind the spread spectrum that step C is obtained.
The present invention also provides a kind of device that carries out signal modulation and spread processing, and comprising: mapping table is provided with module, user data processing module, spread processing module and modulation treatment module; Wherein,
Described mapping table is provided with module, is used to be provided with the mapping table under also initialization QPSK modulation and the 16QAM modulation;
Described user data processing module, the user data that is used for sending is divided by fixed-length bits, and does the system conversion, and the user data after the conversion is delivered to the spread processing module;
Described spread processing module, be used under the spread spectrum coefficient length of current use, each spread spectrum code value is carried out (1-spread spectrum code value)/2 computings, with the user data addition after result of calculation and process division of receiving and the conversion process, and with addition result as under be marked on mapping table and be provided with in the corresponding mapping table in the module and table look-up, obtain spread spectrum after numerical value deliver to the modulation treatment module;
Described modulation treatment module is shone upon numerical value behind the spread spectrum that obtains by the modulation system of current use, obtain the signal value on I road and Q road respectively.
Wherein, described spread processing module further comprises spread spectrum value computing module, addition module, table look-up module; Described spread spectrum value computing module is used under the spread spectrum coefficient length of current use, and each spread spectrum code value is carried out (1-spread spectrum code value)/2 computings, and operation result is delivered to addition module; Described addition module, with result of calculation with receive through division and conversion process after the user data addition, and addition result delivered to table look-up module; Described table look-up module is responsible for tabling look-up and is obtained numerical value behind the spread spectrum, and delivers to the modulation treatment module.
Method and the device that carries out signal modulation and spread processing provided by the present invention, on up link and down link, with the processing that the modulation and the spread spectrum of signal data are done reverse order, the laggard line data modulation treatment of promptly advanced line data spread processing; And the multiplying in the spread processing is calculated in advance, and generation mapping table, make and when spread processing, only need use lookup table mode, can finish original multiplying in the spread spectrum process, so, remove the multiplying of data, not only accelerated the processing speed of modulation and spread spectrum, also reduce the use of hardware resource, made the entire process process be in the optimization state.
For concreteness relatively, suppose that a user data 16bit is long, spread spectrum coefficient (SF) is 32, adopts the QPSK modulation system to modulate.Use traditional treatment method, data-modulated need use 8 mappings to obtain 8 I, Q numerical value, and corresponding, the spread processing process then needs to do 8*32*2=512 multiplying; And use processing method of the present invention, the spread processing process only need be done after some simple logical operations can obtain data behind the spread spectrum by tabling look-up, table look-up by twice when data-modulated afterwards and just can obtain I, Q numerical value, total number of times of tabling look-up is 8*32*3=768 time.Like this, just multiplying is converted into the computing of tabling look-up, it is more faster than multiplying speed to table look-up, and particularly implements convenient, quick in the chip that the hardware accelerator of tabling look-up is arranged; And the size of tabling look-up is also very little, and table is long between 4~32, and therefore realization speed of the present invention is faster, efficient is higher, take resource still less, and the entire process flow process is more optimized.
Embodiment
Basic thought of the present invention is: to the advanced line data spread processing of the signal that will send, laggard line data modulation treatment; And the multiplying in the spread processing is calculated in advance, and generate corresponding mapping table, when spread processing, finish original multiplying by tabling look-up by the different modulating mode; Obtain the I road in the modulation, Q road signal value also obtains by tabling look-up respectively, so, speed is accelerated greatly.
Here, described different modulating mode can be the QPSK modulation system, also can be the 16QAM modulation system; Accordingly, described mapping table is respectively the mapping table under the QPSK modulation, the mapping table under the 16QAM modulation.
The method that the present invention carries out signal modulation and spread processing may further comprise the steps as shown in Figure 1:
Step 11: the mapping table under also initialization QPSK modulation and the 16QAM modulation is set;
In this step, can realize mapping table by array, mapping table is divided into spread spectrum value mapping table and IQ road signal map table two class, specifically, spread spectrum value mapping table comprises: be used to search the Qpsk_MapTable[8 that is worth behind the spread spectrum under the QPSK modulation] and be used to search the Qam16_MapTable[32 that is worth behind the spread spectrum under the 16QAM modulation]; IQ road signal map table comprises: be used to search the QPSK modulation Qpsk_Ma pIvalue[4 of I road signal value and Q road signal value down], Qpsk_MapQvalue[4], and be used to search the 16QAM modulation Qam16_MapIvalue[16 of I road signal value and Q road signal value down], Qam16_MapQvalue[16].
In the practical application, mapping table can realize that also as chained list, storehouse or the like, using method is identical with array by other modes.
In this step, described initialization mapping table is according to currently used agreement, finishes as the mapping relations of the corresponding modulation system of defined in the WCDMA agreement, below respectively in conjunction with the process of instantiation explanation initialization mapping table.
With current use agreement is the WCDMA agreement, Qpsk_MapTable[8]=0,3,1,2,2,1,3,0} is an example, and its concrete generation method is, according to the QPSK modulation mapping relations of WCDMA agreement defined is:
00->I=0,Q=1;
01->I=1,Q=0;
10->I=-1,Q=0;
11->I=0,Q=-1;
When the spread spectrum code value was 1, above-mentioned QPSK modulation mapping relations were constant; When the spread spectrum code value was-1, above-mentioned QPSK modulation mapping relations became:
00->I=0,Q=-1;
01->I=-1,Q=0;
10->I=1,Q=0;
11->I=0,Q=1;
So, user data for dibit 00 expression, the decimal system numerical value of its user data through moving to left after one is 0, when the spread spectrum code value is 1, spread spectrum value computing module operation result is 0, equals 0 again with after the metric user data addition, and this is 0 just corresponding in the QPSK modulation mapping relations (the spread spectrum code value is 1), 00 (real number value is 0), i.e. 0->0 of I=0, Q=1.
When the spread spectrum code value is-1, spread spectrum value computing module operation result is 1, equal 1 again with after metric user data 0 addition, this is 1 just corresponding in the QPSK modulation mapping relations (the spread spectrum code value is-1), I=0, Q=-1 modulate 11 (real number value is 3), i.e. 1->3 that identical IQ value (I=0, Q=-1) is arranged in the mapping relations (the spread spectrum code value is 1) with QPSK.
Because in actual use, only using the spread spectrum code value is 1 QPSK modulation mapping relations.Like this, just drawn Qpsk_MapTable[8] preceding two numerical value.
In like manner, for the user data of dibit 01 expression, the decimal system numerical value of its user data through moving to left after one is 2, when the spread spectrum code value is 1 or-1, can draws corresponding relation respectively and is: 2->1 or 3->2.For the user data of dibit 10 expression, the decimal system numerical value of its user data through moving to left after one is 4, when the spread spectrum code value is 1 or-1, can draws corresponding relation respectively and is: 4->2 or 5->1.For the user data of dibit 11 expression, the decimal system numerical value of its user data through moving to left after one is 6, when the spread spectrum code value is 1 or-1, can draws corresponding relation respectively and is: 6->3 or 7->0.So far, just finished Qpsk_MapTable[8] initial work of array.
Be the WCDMA agreement with current use agreement again, Qam16_MapTable[32]={ 0,12,1,13,2,14,3,15,4,8,5,9,6,10,7,11,8,4,9,5,10,6,11,7,12,0,13,1,14,2,15,3} is an example, and its concrete generation method is, according to the 16QAM modulation mapping relations of WCDMA agreement defined is:
0000->I=0.4472,Q=0.4472
0001->I=0.4472,Q=1.3416
0010->I=1.3416,Q=0.4472
0011->I=1.3416,Q=1.3416
0100->I=0.4472,Q=-0.4472
0101->I=0.4472,Q=-1.3416
0110->I=1.3416,Q=-0.4472
0111->I=1.3416,Q=-1.3416
1000->I=-0.4472,Q=0.4472
1001->I=-0.4472,Q=1.3416
1010->I=-1.3416,Q=0.4472
1011->I=-1.3416,Q=1.3416
1100->I=-0.4472,Q=-0.4472
1101->I=-0.4472,Q=-1.3416
1110->I=-1.3416,Q=-0.4472
1111->I=-1.3416,Q=-1.3416
Adopting and the identical processing mode of QPSK modulation mapping, is that fixed-length bits becomes four bits by dibit, can draw Qam16_MapTable[32] initialization value: Qam16_MapTable[32]={ 0,12,1,13,2,14,3,15,4,8,5,9,6,10,7,11,8,4,9,5,10,6,11,7,12,0,13,1,14,2,15,3}.
Further, according to described QPSK modulation mapping relations, press the pairing numerical value of I, Q again, can draw:
Qpsk_MapIvalue[4]={0,1,-1,0};
Qpsk_MapQvalue[4]={1,0,0,-1};
In like manner,, press the pairing numerical value of I, Q, can draw according to described 16QAM modulation mapping relations:
Qam16_MapIvalue[16]={0.4472,0.4472,1.3416,1.3416,0.4472,0.4472,1.3416,1.3416,-0.4472,-0.4472,-1.3416,-1.3416,-0.4472,-0.4472,-1.3416,-1.3416};
Qam16_MapQvalue[16]={0.4472,1.3416,0.4472,1.3416,-0.4472,-1.3416,-0.4472,-1.3416,0.4472,1.3416,0.4472,1.3416,-0.4472,-1.3416,-0.4472,-1.3416}。
Step 12: the user data that will send is divided by fixed-length bits, and does the system conversion;
Because the user data that will send is a binary data, and the data of carrying out spread processing are decimal data, and therefore, this step is described divides processing by fixed-length bits, is that the binary system user data that will send is divided into fixed-length bits in order; Described system conversion process is specifically: earlier the fixed-length bits of being divided is moved to left one, change into metric user data again.
Here, the regular length of bit determines that according to modulation system for the QPSK modulation, fixed-length bits is a dibit; For the 16QAM modulation, fixed-length bits is four bits.
Step 13: under the spread spectrum coefficient length of current use, each spread spectrum code value to current use carries out (1-spread spectrum code value)/2 computings, and with the user data addition after result of calculation and division of step 12 process and the conversion process, afterwards, with addition result as under be marked in the corresponding spread spectrum value mapping table and table look-up, obtain the numerical value behind the spread spectrum, this step can be finished spread processing.
Here, described fixed-length bits is modulated to dibit for QPSK; Be modulated to four bits for 16QAM.Accordingly, describedly table look-up in corresponding spread spectrum value mapping table, modulation is at Qpsk_MapTable[8 for QPSK] in search, modulation is at Qam16_MapTable[32 for 16QAM] in search.
Step 14: under the spread spectrum coefficient length of current use, numerical value shines upon by the modulation system of current use behind the spread spectrum that step 13 is obtained, and obtains the signal value on I road and Q road respectively.
Here, the described current modulation system of using is as the QPSK modulation system or be the 16QAM modulation system.
Accordingly, numerical value shines upon concrete processing by the modulation system of current use and is exactly behind the spread spectrum that step 13 is obtained: numerical value behind the spread spectrum that step 13 is obtained, as under be marked on Qpsk_MapIvalue[4], Qpsk_MapQvalue[4] in, perhaps at Qam16_MapIvalue[16], Qam16_MapQvalue[16] in table look-up, can obtain under the QPSK modulation system or 16Q AM modulation system under the I road and the signal value on Q road.
For realizing the method for above-mentioned signal modulation and spread processing, the present invention also provides the device of a kind of signal modulation and spread processing, and comprising: mapping table is provided with module, user data processing module, spread processing module and modulation treatment module; Wherein,
Described mapping table is provided with module, is used to be provided with the mapping table under also initialization QPSK modulation and the 16QAM modulation; Here, described mapping table comprises spread spectrum value mapping table and IQ road signal map table two class;
Described user data processing module, the user data that is used for sending is divided by fixed-length bits, and does the system conversion, and the user data after the conversion is delivered to the spread processing module;
Here, described division and conversion process are specially: the binary system user data that will send is divided into fixed-length bits in order, and the fixed-length bits of being divided is moved to left one, changes into metric user data again.
Described spread processing module, be used under the spread spectrum coefficient length of current use, each spread spectrum code value is carried out (1-spread spectrum code value)/2 computings, with the user data addition after result of calculation and process division of receiving and the conversion process, and with addition result as under be marked on mapping table and be provided with in the corresponding mapping table in the module and table look-up, obtain spread spectrum after numerical value deliver to the modulation treatment module;
This spread processing module can be further divided into spread spectrum value computing module, addition module, table look-up module; Described spread spectrum value computing module is responsible under the spread spectrum coefficient length of current use, and each spread spectrum code value is carried out (1-spread spectrum code value)/2 computings, and operation result is delivered to addition module; Described addition module, with result of calculation with receive through division and conversion process after the user data addition, and addition result delivered to table look-up module; Described table look-up module is responsible for tabling look-up and is obtained numerical value behind the spread spectrum, and delivers to the modulation treatment module.
Described modulation treatment module is shone upon numerical value behind the spread spectrum that obtains by the modulation system of current use, obtain the signal value on I road and Q road respectively; Here, the described mapping also is to table look-up in mapping table is provided with corresponding mapping table in the module.
Modulation of the present invention and spread processing are finished at transmitting terminal, corresponding to modulation of the present invention and spread processing, can adopt existing demodulation to expand at receiving terminal handles, also can correspondingly adopt lookup table mode to finish demodulation and expand processing, promptly pre-set mapping table, when demodulation expands, table look-up, repeat no more here.
The above is preferred embodiment of the present invention only, is not to be used to limit protection scope of the present invention.