Summary of the invention
Therefore the purpose of this invention is to provide a kind of rate-matched device that is used for code division multiple address communication system, it has rate-matched time weak point and reduces the advantage of system complex degree.
Above-mentioned being achieved through the following technical solutions of the present invention:
A kind of rate-matched device that is used for code division multiple address communication system comprises:
Channel encoder comprises Turbo encoder that information bit is handled according to one of Turbo coding, convolutional encoding or non-coded system respectively, convolution coder and coding pass not, and parallel output encoder code element;
Rate matching controller, it comprises Turbo coding hole knockout computing module and convolutional encoding or does not encode or Turbo coding and repetitive mode computing module, calculates the position and the number of repetition of punching and repeating under the different modes respectively; And
The bit collection device, the effective code element after its operating parameter according to channel encoder and rate matching controller output is implemented punching or repetitive operation and collected complete operation code element on the code stream.
At the above-mentioned rate-matched device that is used for code division multiple address communication system, described bit collection device comprises three serial barrel shift devices, and it deposits memory device in according to the effective code element of the parameter collection of rate matching controller and channel encoder output and according to set form.
At the above-mentioned rate-matched device that is used for code division multiple address communication system, position and number of repetition that described Turbo coding hole knockout computing module calculates punching and repeats according to following manner:
3a) the rate-matched error parameter is set at first time error current and punching/repetition ratio of expecting;
3b) adjust rate-matched error parameter and judge whether current code element implements punch operation;
3c) if punching, then current code element is carried out punch operation and no matter adjust the matching error parameter;
3d) judge whether to finish rate adaptation operating,, then finish to calculate if finish, otherwise, return step 3b).
At the above-mentioned rate-matched device that is used for code division multiple address communication system, described convolutional encoding or do not encode or position and number of repetition that Turbo coding and repetitive mode computing module calculate punching in the following manner and repeat:
Error through adjusting after the once-through operation before 4a) initialization is finished;
4b) whether the current code element of judging code stream 1 implements punching/repetitive operation, if implement, then this code element is implemented punching/repetitive operation and adjust the error of this code stream, otherwise, adjust the error of this code stream;
If 4c) code rate is not equal to 1, then to other code stream repeating step 4b successively);
4d) to step 4a) in finish before adjust through the error of adjusting after the once-through operation;
4e) judge whether to finish rate adaptation operating,, then finish to calculate if finish, otherwise, return step 4b).
In Wideband Code Division Multiple Access (WCDMA) communication system, system will will handle lot of data in a time interval.Rate-matched is a basic handling link in its data handling procedure.As adopt traditional rate-matched device will consume a large amount of time.After adopting this device, significantly improve the performance of rate-matched device, shortened the rate-matched time, helped improving the data handling capacity of system.
Spreading rate is 3.84MHz in the Wideband Code Division Multiple Access (WCDMA) communication system (WCDMA), if we come deal with data with 16 times of clock 61.44MHz of chip clock, promptly a time interval comprises 38400 * 16=61400 timeticks.If traditional rate-matched device can only be handled a Bit data at a timeticks and therefore adopt traditional rate-matched device, in a time interval, can only handle the data of a transmission channel at the next conventional rate coalignment of such clock.Therefore least ideally to satisfy the data service of the 2M of system requirements and handle needs 6 cover conventional rate coalignments composition hardware array parallel processings.And adopt this device, and can handle a plurality of data in the timeticks, adopt this device to handle transmission channel output needs
Transport channel data is handled required timeticks=type of service * time interval
Therefore handling required timeticks at transport channel data of foregoing situation is 31457 timeticks, and therefore the data service that can finish 2M in a time interval of rate-matched device of the present invention is handled.Be equivalent to reduce 5 cover rate-matched devices with respect to traditional rate-matched device.
Embodiment
Below the invention will be further described by accompanying drawing.
The structure of apparatus of the present invention mainly comprises three functional modules as shown in Figure 3; Channel encoder, rate matching controller and bit collection device.
Channel encoder is supported the convolutional encoding of 1/n speed, the turbo coding of 1/n speed and coded system not.The structure of channel encoder as shown in Figure 4, it is made up of three parts: turbo encoder, convolution coder and coding pass not.Channel encoder is encoded according to the parameter selection function module that microprogram control unit (MCU) provides, and by certain mode output symbol.Because the implementation structure of convolutional encoding and turbo coding is known in this area, therefore is not described in detail.
The punching under the various coded systems that rate matching controller support channel encoder is supported and the position calculation of repetition and the number of repetition calculate.Its structure is made up of two parts as shown in Figure 5 and is the algoritic module and the convolutional encoding of turbo coding hole knockout or does not encode or the algoritic module of turbo coding and repetitive mode.(the output symbol number as coding also is the number of symbols Nin of rate-matched input to the parameter that provides according to MCU, the error parameter of rate-matched ' lapse ', the output symbol number N out and the coded system of rate-matched), select a kind of algoritic module to determine on the corresponding code stream of current time whether code element is perforated or repeats, if current code element also will be determined the bit number that current code element should repeat for repeating.The cycle that code element is perforated in error parameter ' lapse ' the decision code stream.
The turbo coding is a systematic code, for being damages minimum and deciphered effect preferably in the link processing, will not carry out punch operation to first via code stream.
The algorithm of turbo coding hole knockout is as follows:
Lapse=lapse_ini; / * initialization error */for (i=1; I<=Nin/n; I++) { lapse-=lapse_bx; / * revises error */if (lapse<0)/* and judges the code element */{ repeat_punc=true that whether is perforated; / * code element punching */lapse+=lapse_ax; / * modification error */} else { repeat_punc=flase; / * code element reservation */} } |
Wherein x is the code stream sequence number that does not comprise system's code stream of coding output among the lapse_ax.Parameter l apse_ini is an initial error present and punching/repetition ratio of expecting.Lapse_ax, variable x is the sequence number of corresponding code stream among the lapse_bx, lapse_ax, the lapse_bx error is adjusted coefficient, and lapse_ax can be used for determining first element position that is perforated/repeats that lapse_bx is used to control the cycle of punching/repetition.
Below by Fig. 6 above-mentioned algorithm is further described.
As shown in Figure 6, at step 3a) in, the rate-matched error parameter is set at first time error current and punching/repetition ratio of expecting.Then, at step 3b) in, adjust the rate-matched error parameter and judge whether current code element implements punch operation.Then, at step 3c) in, if punching, then current code element is carried out punch operation and no matter adjust the matching error parameter, otherwise do not operate.At last, at step 3d) in, judge whether to finish rate adaptation operating, if finish, then finish to calculate, otherwise, return step 3b).
For convolutional encoding or do not encode or the algoritic module of turbo coding and repetitive mode, realize the characteristics of parallel running in order to make full use of hardware, improve processing speed, adopt following algorithm:
The if ((num=lapse_b/lapse_a of lapse_a>lapse_b); Residua=((n+1) * lapse_b) ÷ lapse_a; Test=lapse_a; Else (num=lapse_b/lapse_a; Residua=lapse_b ÷ lapse_a; Test=lapse_a; Lapse0=-residua; / * initialization error */for (i=0; I<Nin/n; I++) (if (lapse0<0) lapse1=lapse0+lapse_a-residua; Else lapse1=lapse0-residua; If (lapse0<0 ﹠﹠ lapse1<0) lapse2=lapse0+2*lapse_a-2*residua; Else if (lapse0<0 || lapse1<0) lapse2=lapse0+lapse_a-2 * residua; Else lapse2=lapse0-2*residua; If (lapse0<0 ﹠﹠ lapse1<0 ﹠﹠ lapse2<0) lapse3=lapse0+3*lapsea-3*residua; Else if ((lapse0<0 ﹠﹠ lapse1<0 ﹠﹠ lapse2>=0) || (lapse0<0 ﹠﹠ lapse1>=0 ﹠﹠ lapse2<0) | || (lapse0>=0 ﹠﹠ lapsel<0 ﹠﹠ lapse2<0)) lapse3=lapse0+2*lapse_a-3*residua; Else if (lapse0<0 || lapse1<0 || lapse2<0) lapse3=lapse0+lapse_a-3*residua; Else lapse3=lapse0-3*residua; If (lapse0<0) repeatnum0=num+1; / if if * is the number */else/* punching that repeats determine the to repeat */repeatnum0=num that judges whether to punch; If (lapse1<0) repeatnum1=num+1; Else repeatnum1=num; If (lapse2<0) repeatnum2=num+1; Else repeatnum2=num; If (n==1) lapse0=lapse1; / * revises error */else if (n==2) lapse0=lapse2 according to code rate; Else if (n==3) lapse0=lapse3; } |
Wherein 1/n is a channel coding rate.Parameter l apse_a, lapse_ax in the same source program of lapse_b meaning, the meaning of lapse_bx.Error through adjusting after the once-through operation before Lapse0 refers to finish, lapse1, lapse2, lapse3 refer to that respectively L is an adjustment error after the operation of 1,2,3 code streams by the code stream sequence number.Resdua is an intermediate variable, refers to the error amount that will adjust through an all after date of punching.
If the rate-matched mode is a hole knockout, then repeatnumx indication code stream sequence number is that whether code element is perforated on the code stream of x; If the rate-matched mode is a repetitive mode, then repeatnumx indication code stream sequence number is the number of times that code element is repeated on the code stream of x.This module is judged the number of effective code stream and is adjusted error according to code rate according to code rate 1/n.
Below by Fig. 7 above-mentioned algorithm is further described.
As shown in Figure 7, at step 4a) in, the error through adjusting after the once-through operation before initialization is finished.At step 4b) in, judge whether the current code element of code stream 1 implements punching/repetitive operation, if implement, then this code element is implemented punching/repetitive operation and adjust the error of this code stream, otherwise, the error of this code stream adjusted.Then at step 4c) in judge whether code rate equals 1, if equal 1, then change step 4e over to), judge whether to finish rate adaptation operating, if finish, then end calculating, otherwise, return step 4b); If be not equal to 1, then code stream 2 is implemented and step 4b with 3) the same processing.Then, at step 4d) in, to step 4a) in finish before adjust through the error of adjusting after the once-through operation.At last, at step 4e) in, judge whether to finish rate adaptation operating, if finish, then finish to calculate, otherwise, return step 4b).
The bit collection device is finished the punching or the repetitive operation of code element on each code stream, and code element effective behind the complete operation is collected.The bit collection device mainly is made up of three serial barrel shift devices.The parameter that the barrel shift device provides according to rate matching controller is (as the rate-matched mode, the number that repeats) and the effective code element of parameter (whether effective) collection that provides of channel encoder as current code element, and deposit memory device in according to set form, so that be next step data processing.
Several specific embodiment of the present invention is below described.
Adopt the example of the Turbo code rate coupling of hole knockout
This routine described rate-matched device is applicable to that channel coding method is the rate-matched device under the hole knockout of turbo coding.This example will be that 1/3 turbo is encoded to example with code rate.
According to embodiments of the invention, channel encoder includes the turbo encoder with use information bit is encoded, and the code element of turbo encoder output will be by average 3 road code streams that are separated into.Because the implementation structure of turbo encoder is known altogether in this area, no longer this is described in detail at this.In order to adapt to the characteristics of speed coalignment in this example, this example has been carried out special processing to the turbo encoder for tail bit output, Cai encoder is only being collected 3 above code elements to guarantee on current time 3 road code streams all effective code element output symbol (X
1k, X
2k, X
3k) and indicate current code element effectively (rmin_valid) to the bit collection device.
Rate matching controller is obtaining the number of symbols Nin that MCU provides coding to export, initial error lapse_ini, the error parameter lapse_a2 of second code stream, lapse_b2, the error parameter lapse_a3 of second code stream, behind lapse_b3 and the rate-matched mode rm_mode, whether the code element that the algoritic module by turbo coding hole knockout obtains in the corresponding code stream of current time will be perforated, and the notice of the parameter repeat_puncx by corresponding code stream bit collection device, wherein x is the code stream sequence number.
The bit collection device is collected the code element on the corresponding code stream of indication code element reservation after the operation indication that obtains rate matching controller.Complexity for conserve storage and reduced data are represented just abandons the current code element on the code stream that is marked as punching at this.For example rm_mode is punching, and the repeat_punc2 indication is true, and the sequence of symhols after then collecting is ... X
1k, X
3k
The bit collection device is pressed in the set form write storage device after having collected a certain amount of code element.
Adopt the example of the convolutional encoding rate-matched of hole knockout
This routine described rate-matched device is applicable to that channel coding method is the rate-matched device under the hole knockout of convolutional encoding.This example will be that 1/3 convolutional encoding is an example with code rate.
According to embodiments of the invention, channel encoder includes convolution coder with use information bit is encoded.Because the implementation structure of convolution coder is known altogether in this area, no longer this is described in detail at this.The enforcement structure of convolutional encoding itself is just exported the n road code stream corresponding with code rate 1/n uniformly.Coding back output symbol is labeled as (X
1k, X
2k, X
3k) and indicate current code element effectively (rmin_valid) to the bit collection device.
Rate matching controller is obtaining the number of symbols Nin that MCU provides coding to export, initial error lapse_ini, adjust error parameter lapse_a, after lapse_b and the rate-matched mode, by convolutional encoding or do not encode or whether code element that the algoritic module of turbo coding and repetitive mode obtains in the corresponding code stream of current time will be perforated, and the parameter repeat_puncx by corresponding code stream, repeatnumx notice bit collection device, wherein x is the code stream sequence number.If rm_mode is punching, repeatnumx equals 1, and then repeat_puncx is true.
The bit collection device is collected the code element on the corresponding code stream of indication code element reservation after the operation indication that obtains rate matching controller.Complexity for conserve storage and reduced data are represented just abandons the current code element on the code stream that is marked as punching at this.For example rm_mode is punching, and the repeat_punc3 indication is true, and the sequence of symhols after then collecting is ... X
1k, X
2k, X
1 (k+1)
The bit collection device is pressed in the set form write storage device after having collected certain data.
Adopt the embodiment of the rate-matched of repetitive mode
This example will be that 1/3 code rate is an example with code rate.
According to embodiments of the invention, channel encoder will include encoder according to the coding parameter selection use that MCU provides information bit will be encoded.Wherein convolutional encoding and turbo coding structure are equal to embodiment 1 and embodiment 2 described.Coding back output symbol is labeled as (X
1k, X
2k, X
3k) and indicate current code element effectively (rmin_valid) to the bit collection device.
Rate matching controller is obtaining the number of symbols Nin that MCU provides coding to export, initial error lapse_ini, adjust error parameter lapse_a, after lapse_b and the rate-matched mode, by convolutional encoding or do not encode or whether code element that the algoritic module of turbo coding and repetitive mode obtains in the corresponding code stream of current time will be perforated, and the parameter repeat_puncx by corresponding code stream, repeatnumx notice bit collection device, wherein x is the code stream sequence number.
The bit collection device is after the operation indication that obtains rate matching controller, and the barrel shift device repeats code element repeatnumx time fast according to the repeatnumx of corresponding code stream, and the code element after three barrel shift device displacements is collected.Be repetition as rm_mode, repeatnuml equals 1, and repeatnum2 equals 2, and it is X that repeatnum3 equals 1 sequence of symhols after the collection
1k, X
1k, X
2k, X
2k, X
2k, X
3k, X
3k
The bit collection device is pressed in the set form write storage device after having collected certain data.