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:
Spread spectrum value mapping table and IQ road signal map table under A, setting and initialization quaternary PSK QPSK data-modulated and the 16 quadrature amplitude modulation QAM data-modulated;
The fixed-length bits that B, the user data that will send are confirmed by modulation system is divided, and between the binary system and the decimal system, does the system conversion;
C, under the spread spectrum coefficient length of current use; Each spread spectrum code value to frequency expansion sequence carries out (1-spread spectrum code value)/2 computings; And with result of calculation and through the user data addition after division and the conversion process; Afterwards with addition result as under be marked in the spread spectrum value 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 said 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, said each spread spectrum value mapping table, each I road signal and Q road signal map table are respectively an array, corresponding six arrays of said mapping table.
In the such scheme, the said fixed-length bits of step B is confirmed according to modulation system; Said fixed-length bits is dibit or four bits.
In the such scheme, step C is said 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 said current modulation system of using of step D is as the QPSK modulation system or be the 16QAM modulation system; The said 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,
Said mapping table is provided with mould and determines, and is used to be provided with spread spectrum value mapping table and IQ road signal map table under also initialization QPSK modulation and the 16QAM modulation;
Said user data processing module, the fixed-length bits that the user data that is used for sending is confirmed by modulation system is divided, and between the binary system and the decimal system, does the system conversion, and the user data after the conversion is delivered to the spread processing module;
Said spread processing module; Be used under the spread spectrum coefficient length of current use; Each spread spectrum code value to frequency expansion sequence carries out (1-spread spectrum code value)/2 computings; With result of calculation with receive through division and conversion process after the user data addition, and with addition result as under be marked on mapping table and be provided with in the spread spectrum value mapping table in the module and table look-up, obtain spread spectrum after numerical value deliver to the modulation treatment module;
Said 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, said spread processing module further comprises spread spectrum value computing module, addition module, table look-up module; Said 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 result of calculation is delivered to addition module; Said 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; Said 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 generate mapping table, make and when spread processing, only need use lookup table mode; Can accomplish 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, corresponding, the spread processing process then need be done 8*32*2=512 multiplication or logic selection computing; 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 through tabling look-up; When data-modulated, table look-up through twice 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 select computing to be converted into the computing of tabling look-up multiplying or logic, table look-up and select arithmetic speed much fast, particularly in the chip that the hardware accelerator of tabling look-up is arranged, implement convenient, quick than multiplying or logic; 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, accomplish original multiplying through tabling look-up by the different modulating mode; Obtain the I road in the modulation, Q road signal value also obtains through 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, said mapping table is respectively the mapping table under the QPSK modulation, the mapping table under the 16QAM modulation.
It is as shown in Figure 1 that the present invention carries out the method for signal modulation and spread processing, may further comprise the steps:
Step 11: the mapping table under also initialization QPSK modulation and the 16QAM modulation is set;
In this step; Can realize mapping table through array; Mapping table is divided into spread spectrum value mapping table and IQ road signal map table two type; 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 Qpsk_MapIvalue [4], the Qpsk_MapQvalue [4] of following I road signal value of QPSK modulation and Q road signal value, and the Qam16_MapIvalue [16], the Qam16_MapQvalue [16] that are used to search following I road signal value of 16QAM modulation and Q road signal value.
In the practical application, mapping table can realize that also like chained list, storehouse or the like, method for using is identical with array through other modes.
In this step, said initialization mapping table is according to currently used agreement, accomplishes like the mapping relations of the corresponding modulation system of defined in the WCDMA agreement, combines the process of instantiation explanation initialization mapping table below respectively.
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, for the user data of dibit 00 expression, its user data is 0 through the decimal system numerical value that moves to left after one; 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 with QPSK modulation mapping relations (the spread spectrum code value is 1) in 11 (real number value is 3), i.e. 1->3 of identical IQ value (I=0, Q=-1) are arranged.
Because in actual use, only using the spread spectrum code value is 1 QPSK modulation mapping relations.Preceding two numerical value of Qpsk_MapTable [8] like this, have just been drawn.
In like manner, for the user data of dibit 01 expression, its user data is 2 through the decimal system numerical value that moves to left after one, 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, its user data is 4 through the decimal system numerical value that moves to left after one, 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, its user data is 6 through the decimal system numerical value that moves to left after one, 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 accomplished the initial work of Qpsk_MapTable [8] 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
Adopt and the identical processing mode of QPSK modulation mapping, just fixed-length bits becomes four bits by dibit, can draw the initialization value of Qam16_MapTable [32]: 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 said QPSK modulation mapping relations, press I, the pairing numerical value of Q again, can draw:
Qpsk_MapIvalue[4]={0,1,-1,0};
Qpsk_MapQvalue[4]={1,0,0,-1};
In like manner,, press I, the pairing numerical value of Q, can draw according to said 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 said divides processing by fixed-length bits, is that the binary system user data that will send is divided into fixed-length bits in order; Said 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 confirms 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 result of calculation and step 12 through division and conversion process after the user data addition, 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 accomplished spread processing.
Here, said fixed-length bits is modulated to dibit for QPSK; Be modulated to four bits for 16QAM.Accordingly, saidly in corresponding spread spectrum value mapping table, table look-up, modulation is in Qpsk_MapTable [8], to search for QPSK, and modulation is in Qam16_MapTable [32], to search for 16QAM.
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 said 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 among Qpsk_MapIvalue [4], the Qpsk_MapQvalue [4]; Perhaps table look-up in [16], can obtain I road and the signal value on Q road under the QPSK modulation system or under the 16QAM modulation system at Qam16_MapIvalue [16], Qam16_MapQvalue.
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,
Said 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, said mapping table comprises spread spectrum value mapping table and IQ road signal map table two type;
Said 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.
Said 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 result of calculation with receive through division and conversion process after the user data addition, 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 further be divided into spread spectrum value computing module, addition module, table look-up module; Said 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; Said 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; Said 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.
Said 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 said mapping also is to be provided with in the corresponding mapping table in the module to mapping table to table look-up.
Modulation of the present invention and spread processing are accomplished at transmitting terminal; Corresponding to modulation of the present invention and spread processing; Can adopt existing demodulation to expand at receiving terminal and handle, also can correspondingly adopt lookup table mode completion demodulation to expand and handle, promptly pre-set mapping table; When demodulation expands, table look-up, repeat no more here.
The above is merely preferred embodiment of the present invention, is not to be used to limit protection scope of the present invention.