Background technology
Turbo decoder is widely used in many wireless telecommunications systems, along with the development of wireless communication technique, improving constantly of message transmission rate, also more and more higher to the requirement of the real-time decoding performance of Turbo decoder, this just requires constantly to reduce decoding delay, improves the throughput of Turbo decoding.
Turbo decoder is branch transition tolerance, forward state metric, backward state measurement, log-likelihood ratio to the data computation sequence that a frame length is N.
Fig. 1 shows Log-MAP algorithm coding sequences, and as shown in Figure 1, Log-MAP algorithm is that the log-domain of MAP algorithm realizes, and its calculation procedure is as follows:
From k=0, according to following formula Branch Computed metric
Wherein, claim γ to be branch metric parameter, k is time index, and m is state subscript, and σ is constant, x
kfor channel observation sequence, y
kfor verification sequence, p is
prior information.
When k=0, initialization forward path tolerance A, and utilize according to following formula
calculate from k=0 to k=N-1 and store forward path tolerance
Here, α is claimed to be forward path metric parameter.
When k=N-1, to path metric B after initialization, and utilize according to following formula
calculate from k=N-2 to k=0 and store backward path metric
Here, β is claimed to be forward path metric parameter.
According to following formula from k=0 to k=N-1 computing information bit log-likelihood ratio LLR:
External information L is calculated according to LLR
e:
Using external information as the prior information calculated during next iteration, loop iteration computing said process to reaching maximum iterations, and is made according to the LLR in last iterative process and is adjudicated output accordingly.
Wherein, max
*(x, y)=ln (e
x+ e
y)=max (x, y)+ln (1+e-
| x-y|), comprise maximizing computing and correction function f (x)=ln (1+e
-x) computing.
When carrying out Turbo decoding, often needing first frame data all to be received, just can start decoding.Because the length of frame data equals the size of interleaver, if so when interleaver sizes is very large, decoding delay can be very long, and the memory space of needs is very large, can limit decoding efficiency.
Use sliding window algorithm, effectively can improve the problems referred to above.The main thought of sliding window algorithm is: the data of a frame are divided into isometric subframe, claims each subframe to be a window.First the forward state metric α of bifurcation state tolerance γ and first window of the first two window is calculated.The initial value of the backward state measurement of the second window is set as the probable value such as, then initial value when the invalid β value gone out using second last grid computing of sliding window calculates effective β as first sliding window, backstepping goes out effective β value in first window each grid moment.γ, α, the β value of such first window have had, and just can calculate the likelihood ratio LLR of first window.So calculate effective β of second and the 3rd sliding window successively.
For sliding window algorithm, as long as ensure that length of window is 5 to 8 times of used convolution code constraint length, just can ensure that the loss of decoding performance is less.
Common sliding window bring considerable influence can to system decodes performance, and the backward induction method of its reason mainly β is affected.For the decode procedure of non-windowing, system starting and ending state is all fixed as zero, therefore the initial value of α, β can be determined, and after windowing, although α is unaffected, β when segmentation backward induction method, but due to this breakpoint place state fail to understand, cause the correct probability of β to decline, thus affect the performance of whole decode system.The length of sliding window is shorter, and segmentation is more, and the incorrect probability of introducing is also larger, and systematic function is also poorer.
If the length deviation of sliding window is comparatively large, then can cause in the process of flowing water, waste in the wait of much time between the sliding window of difference, thus decoding delay is increased, decoding performance declines, as shown in Figure 2.
Embodiment
Be clearly and completely described the technical scheme in the embodiment of the present invention below in conjunction with accompanying drawing, obviously, described embodiment is only the present invention's part embodiment, instead of whole embodiments.Based on embodiments of the invention, those of ordinary skill in the art, not making the every other embodiment obtained under creative work prerequisite, belong to the scope of protection of the invention.
Fig. 4 is outline flowchart Turbo decoding code block being slided to the method that window divides of the present invention.As shown in Figure 4, the method comprises:
Step S1, determine the size of Turbo decoding code block.
Step S2, according to the permissible variation between the size of described Turbo decoding code block and sliding window size, determine size and the number of the sliding window processed needed for described decoding code block, to reduce the time delay processing described decoding code block.
The sliding window marked off is divided into 3 classes, the sliding window of the first kind refers to the sliding window that divided size is identical with preset value, the sliding window of Equations of The Second Kind refers to that the deviation of divided size and preset value equals the sliding window of permissible variation just, and the sliding window of the 3rd class refers to the sliding window of the deviation of divided size and preset value within the scope of permissible variation.
Concrete, in a kind of embodiment, step S2 is first according to the size of Turbo decoding code block, determine the size of the sliding window of the first kind, then according to the permissible variation between the size of the sliding window of the first kind and sliding window length, the size of the sliding window of the first kind, the sliding window of Equations of The Second Kind and the sliding window of the 3rd class and corresponding number is determined.
The choosing method of the size of the sliding window of the first kind described in step S2 is: the product of the permissible variation between the sliding window sum calculated according to the sliding window size of the described first kind and described sliding window length should be more than or equal to the half of the sliding window size of the described first kind, the pass of the permissible variation namely between the size of the sliding window of the described first kind and described code block length and described sliding window length is: CB_SIZE/SW_SIZE0* δ >=SW_SIZE0/2, wherein, SW_SIZE0 is the size of the sliding window of the described first kind, CB_SIZE is the size of described code block, δ is the permissible variation between described sliding window length, wherein, SW_SIZE0 is positive integer, then, the sliding window sum calculated according to the sliding window size of the described first kind should be less than or equal to the maximum sliding window number of setting, if the described total number of sliding window is not more than the maximum sliding window number of setting, then carry out sliding window according to the total number of sliding window calculated to divide, if the described total number of sliding window is greater than the maximum sliding window number of setting, then again choose the size of the sliding window of the described first kind, and calculate the sliding total number of window and remaining bits size.
After determining the sliding window size of the first kind, also calculate the size of sliding window total number Num and remaining bits Len.
Specifically, the preset value of the sliding window length of several optional first kind can first be determined.This preset value can by Turbo decoder according to specific environment Lookup protocol or pre-set by technical staff.Such as: the sliding window length of the first kind can be set to 16,32,64,128 or the set of random number composition.
In the practical application of Turbo decoder, a kind of execution mode is, for the code block of given length, the sliding window length of the first kind of selection and the sliding window number finally determined are inversely.Namely, in the process of sliding window division, the sliding window length of the first kind of selection is shorter, then the number of sliding window is more, and the incorrect probability of introducing is larger, and systematic function is also poorer.Further, the scope residing for code block length, carries out the selection sliding window length, can limit sliding window number in certain scope.Such as, larger code block can choose a larger sliding window size of the first kind, and makes sliding window sum be less than maximum sliding window number.
Permissible variation between sliding window length according to the size Lookup protocol of sliding window or manually can be arranged by technical staff.In the practical application of Turbo decoder, the permissible variation arranged between different sliding window length can be adjusted to the code block of different length.Such as: the permissible variation between sliding window length can be set to 4.
A kind of execution mode is, according to the permissible variation between the size of described code block and sliding window length, code-aiming block carries out cutting, determines the sliding window size that this code block of Turbo decoder process divides and number, ensure that the length variation between each sliding window is limited in the scope of the permissible variation of setting.Compared with prior art, the time delay of Turbo decoder in decode procedure can be reduced in, thus reach the object improving decoding throughput.
In a kind of embodiment, the pass of the sliding size of window of the first kind and the sliding window size deviation of code block size and permission is:
SW_SIZE0*SW_SIZE0≤2*CB_SIZE* δ, wherein, SW_SIZE0 is the size of the sliding window of the described first kind, and CB_SIZE is the size of described code block, and δ is the sliding window size deviation of described permission.
Fig. 5 is particular flow sheet Turbo decoding code block being slided to the method that window divides of the present invention.As shown in Figure 5, step S2, for each handled code block, performs following steps:
Step S201, size according to described code block, determine the size of the sliding window of the first kind and total sliding window number.
Wherein, described SW_SIZE0 should be less than or equal to
round downwards.
The sliding window size SW_SIZE of the described first kind and code block length and the pass of total number Num of sliding window tentatively determined are:
namely slide the size of window according to described code block size and the first kind, total number Num of the sliding window tentatively determined equals rounding of CB_SIZE/SW_SIZE0 downwards.Further, the value of the size SW_SIZE0 of the sliding window of the described first kind should be positive integer, and the value of the sliding window size deviation δ of described permission also should be positive integer.
Such as: the permissible variation that Turbo decoder is arranged between sliding window is 4, detects CB_SIZE=5120, then
The size can getting SW_SIZE0 is 64.Then total number of sliding window is
Step S202, judge described in the total number Num of sliding window tentatively determined whether be greater than maximum sliding window number Num_max, if the total number Num of this cunning window is greater than maximum sliding window number, then perform step S203, if the total number Num of this cunning window is not more than maximum sliding window number, then perform step S204.
Step S203, chooses the size of the sliding window of the described first kind again.
Such as: the maximum sliding window number that Turbo decoder is arranged is 40, the current code block size preparing process of acquisition is 5120, and the sliding window length chosen is 64, then the total number of sliding window calculated is 80, is greater than the maximum sliding window number of setting.Therefore, sliding window number can be set to maximum sliding window number 40, then the size of sliding window
or the size directly choosing sliding window is 160, then the sliding total number of window is
Step S204, calculates the length Len of remaining bits.
Wherein, the pass of the length Len of the sliding window size SW_SIZE0 of the described first kind, described code block size CB_SIZE and remaining bits is: Len=CB_SIZE%SW_SIZE0, as shown in Figure 3.Fig. 3 is that the sliding window of code-aiming block carries out the pre-schematic diagram divided.
Step S205, whether the size of the remaining bits described in judgement is greater than the permissible variation δ between sliding window, if so, then performs step S207, if not, then performs step S206.
Step S206, is incorporated into the length Len of remaining bits on previous sliding window, as shown in Figure 6.
Concrete, the size SW1_SIZE arranging the sliding window of the first kind is SW_SIZE0, and the number Num1 of the sliding window of the first kind is Num-1; The size SW2_SIZE of the sliding window of Equations of The Second Kind is SW_SIZE0+Len, and the number Num2 of the sliding window of Equations of The Second Kind is 1.
Step S207, whether the size of the remaining bits described in judgement is greater than Num* δ, if so, then performs step 510, if not, then performs step 509.
Step S208, divides Len, on the sliding window before adding to, as shown in Figure 7.
Concrete, the sliding number of window of Equations of The Second Kind and the size of remaining bits have following relation: Num2=Len/ δ.
Wherein, the number Num2 of the sliding window of described Equations of The Second Kind equals rounding of Len/ δ downwards.The size SW2_SIZE of the sliding window of described Equations of The Second Kind is SW_SIZE0+ δ.
If Len can not be divided exactly by δ, then there is the sliding window of the 3rd class.
Wherein, the size SW3_SIZE of the sliding window of described 3rd class is SW_SIZE0+Len-Num2* δ, and the number Num3 of the sliding window of described 3rd class is 1.The size SW1_SIZE of the sliding window of the described first kind is SW_SIZE0, and the number Num1 of the sliding window of the first kind is Num-Num2-1.
Further, if Len can be divided exactly by δ, then there is not the sliding window of the 3rd class.
The size SW1_SIZE of the sliding window of the described first kind is SW_SIZE0, and the number Num1 of the sliding window of the first kind is Num-Num2.
Step S209, whether the size of the remaining bits described in judgement is greater than SW_SIZE0-δ, if so, then performs step S211, if not, then performs step S210.
Step S210, takes out partial bit, adds on Len, as shown in Figure 8 from sliding window before.
Concrete, number Num2 and the remaining bits of the sliding window of described Equations of The Second Kind have following relation:
Wherein, the number of Num2 rounds up for (SW_SIZE0-δ-Len)/δ, and the size SW2_SIZE of the sliding window of Equations of The Second Kind is SW_SIZE0-δ.
If (SW_SIZE0-Len-δ) can not be divided exactly by δ, then there is the sliding window of the 3rd class.
The size SW3_SIZE of the sliding window of described 3rd class is Len+Num2* δ, and the number Num3 of the sliding window of the 3rd class is 1.The size SW1_SIZE of the sliding window of the described first kind is SW_SIZE0, and the number Num1 of the sliding window of the first kind is Num-Num2-1.
Further, if (SW_SIZE0-Len-δ) can be divided exactly by δ, then there is not the sliding window of the 3rd class.
The size SW1_SIZE of the sliding window of the described first kind is SW_SIZE0, and the number Num1 of the sliding window of the first kind is Num-Num2+1.
Step S211, is directly considered as the sliding window of Equations of The Second Kind, as shown in Figure 9 by Len.
Wherein, the size SW0_SIZE arranging the sliding window of the described first kind is SW_SIZE0, and the number Num0 of the sliding window of the first kind is Num.The size SW1_SIZE of the sliding window of Equations of The Second Kind is Len, and the number Num1 of the sliding window of Equations of The Second Kind is 1.
In the present invention at the appointed time, determine that the code block that each code block of described Turbo decoder process carries out divides successively, and successively decoding is carried out to each code block, wherein, the sliding window of a decoding code block institute foundation divides the code block division being this code block of determined described Turbo decoder process and carrying out, to reduce decoding delay, improve decoding throughput.
Originally method Turbo decoding code block being slided to window division provided, can according to the permissible variation between the size of code block and sliding window length, code-aiming block carries out cutting, determine the sliding window size that this code block of Turbo decoder process divides and number, ensure that the length variation between each sliding window is limited in the scope of the permissible variation of setting.Compared with prior art, the present invention can be reduced in the time delay of Turbo decoder in decode procedure, thus reaches the object improving decoding throughput.
The present invention also provides a kind of sliding window of Turbo decoding to divide device, and as shown in Figure 10, this device comprises:
Code block size acquisition module 1, for determining the size of Turbo decoding code block.
Processing module 2, for according to the permissible variation between the size of described decoding code block and sliding window size, determines to process the sliding window size needed for described code block and number, to reduce the time delay processing described decoding code block.
Sliding window to Turbo decoding provided by the invention divides device, can according to the permissible variation between the size of code block and sliding window size, determine by processing module 2 the sliding window that each code block of decoding carries out, thus the size deviation between each sliding window is limited within the scope of the permissible variation of setting.Compared with prior art, the present invention can be reduced in the time delay in Turbo decoder flowing water decode procedure, thus reaches the object improving decoding throughput.
Further, described processing module 2 comprises:
The first kind sliding window size computing unit 21, for according to the permissible variation between code block length and sliding window length, determines the sliding window size of the first kind, and calculates final sliding window sum and remaining bits number.
Wherein, the sliding window size SW_SIZE0 of the described first kind should be less than or equal to
round downwards, the pass of the number of the size of described SW_SIZE0 and code block length and sliding window is:
Further, the described first kind sliding window size computing unit 21, can also detect the described total number of sliding window and whether be greater than maximum sliding window number.If be not more than, then carry out sliding window according to the total number of sliding window calculated and divide.If be greater than, then again choose the size of the sliding window of the described first kind, and calculate the sliding total number of window and remaining bits size.
Sliding window division unit 22, for according to described sliding window sum and remaining bits number, determines size and the number of dissimilar sliding window.
Further, described sliding window division unit 22, can also according to the permissible variation between the sliding window length of the first kind arranged and sliding window length, and code-aiming block carries out cutting, and the length variation between each sliding window is limited in the scope of the permissible variation of setting.
Decoding unit 23, for carrying out decoding according to the described code block of the sliding window after division.
Further, described decoding unit 23 is also for carrying out decoding to each code block successively, and wherein, it is determined according to described sliding window division unit that the sliding window that decoding code block carries out divides, to reduce the time delay of Turbo decoder in flowing water decode procedure.
Described processing module 2, also at the appointed time, determines that the sliding window that each code block of described Turbo decoder process carries out divides successively.
Wherein, the sliding window of a decoding code block institute foundation divides the code block division being this code block of described processing module determined described Turbo decoder process and carrying out.
Device Turbo decoding code block being slided to window division that the present embodiment provides, can according to the sliding window size deviation of the size of code block and permission, determine that the sliding window that each code block of Turbo decoder for decoding carries out divides by processing module, thus the length variation between each sliding window is limited within the scope of the permissible variation of setting.Compared with prior art, the present invention can be reduced in the time delay in Turbo decoder flowing water decode procedure, thus reaches the object improving decoding throughput.
Each embodiment in this specification all adopts the mode of going forward one by one to describe, between each embodiment identical similar part mutually see, what each embodiment stressed is the difference with other embodiments.Especially, for apparatus embodiments, because it is substantially similar to embodiment of the method, so description is fairly simple, relevant part illustrates see the part of embodiment of the method.
The above; be only the specific embodiment of the present invention, but protection scope of the present invention is not limited thereto, is anyly familiar with those skilled in the art in the technical scope that the present invention discloses; the change that can expect easily or replacement, all should be encompassed within protection scope of the present invention.