Because the first request, the initial value of the shift registers of the encoders shall be all zeros, both the constituent encoders need to perform trellis termination after encoding one block of input bits. The action of terminating the trellis is performed by taking the last K-1 bits from the shift register of each encoder feedback to their selves after all information bits are encoded then all shift registers will return to zero. The switch in each constituent encoder should be switched to the lower position when terminating and the structure of each encoder is shown in Figure 4.3. These encoded tail bits are padded after the encoded information bits, and the transmitted bits for trellis termination shall be:
( 1), ( 1), ( 2), ( 2), ( 3), ( 3), ( 1), ( 1), ( 2), ( 2), ( 3), ( 3)
s K p K s K p K s K p K s K p K s K p K s K p K
x + x + x + x + x + x + x¢ + x¢ + x¢ + x¢ + x¢ + x¢ +
Figure 4.3: Constituent encoder for terminating the trellis
4.3 Interleaver
The 3GPP Turbo code internal interleaver is a block interleaver consisting of a rectangular matrix and its size is decided by the frame size of the input bits, K. The original message bits input to the interleaver row by row. If the input bits are not enough to filling the matrix, we need to add some redundant bits to fill it. Then we perform intra-row permutations and inter-row permutations of the rectangular matrix.
Finally, the bits in the matrix are read out column by column and pruning the
redundant bits we added before. We denote the bits input to the internal interleaver by
1, , ,...2 3 K
u u u u , where K is the integer number of the bits and takes one value of 40 £ K £ 5114.
4.3.1 Deciding the size of the rectangular matrix
First to all, we need to decide the number of the rows and the columns of the rectangular matrix according the following process:
(1) According to the equation (33), determining the number of rows of the rectangular matrix, R. The rows of rectangular matrix are numbered 0, 1, …, R - 1 from top to bottom
(2) Along with Table 4.1 and relationship shown below, we can determine the prime number, p, used in the intra-permutation and the number of columns of rectangular matrix, C. The columns of rectangular matrix are numbered 0, 1, …, C - 1 from left to right
if (481 £ K £ 530) then p = 53 and C = p.
else
Find minimum number p from Table 4.1 such that
(
+1)
´
£ R p
K ,
and determine C such that
1 if ( 1)
Table 4.1: List of prime number p and associated primitive root v
(3)Write the input bit sequence u u u1, , ,...2 3 uK into the R´C rectangular matrix row
tail of the input sequence such that yk =0 or 1 for k = K + 1, K + 2, …, R´C.
These dummy bits will be discarded when read the bits from the rectangular matrix after intra-row and inter-row permutations.
After the R´C rectangular matrix is filled with the input and dummy bits, we perform the intra-row permutations and inter-row permutations in turn.
Number of input bits K Number of rows R Inter-row permutation patterns
<T(0), T(1), …, T(R - 1)>
(40≦K≦159) 5 <4, 3, 2, 1, 0>
(160 ≦ K ≦ 200) or
(481≦K≦530) 10 <9, 8, 7, 6, 5, 4, 3, 2, 1, 0>
(2281 ≦ K ≦ 2480) or
(3161≦K≦3210) 20 <19, 9, 14, 4, 0, 2, 5, 7, 12, 18, 16, 13, 17, 15, 3, 1, 6, 11, 8, 10>
K = any other value 20 <19, 9, 14, 4, 0, 2, 5, 7, 12, 18, 10, 8, 13, 17, 3, 1, 16, 6, 15, 11>
Table 4.2: Inter-row permutation patterns for Turbo code internal interleaver
4.3.2 Intra-row and inter row permutations
After the bits input to the R´C rectangular matrix, the intra-row and inter-row permutations for the R´C rectangular matrix are performed stepwise by using the following algorithm with steps (1) – (6):
(1) Select a primitive root v from Table 4.1, which is indicated on the right side of the prime number p.
(2) Construct the base sequence s j( ) jÎ{0,1, ,Lp-2} for intra-row permutation as:
( )
number of input bits K.(5) Perform the i-th (i = 0, 1, …, R - 1) intra-row permutation as:
if (C = p) then
( )j =s((j´r)mod(p-1))
Ui i , j = 0, 1, …, (p - 2), and Ui(p - 1) = 0, where Ui(j) is the original bit position of j-th permuted bit of i-th row.
end if
( )j =s((j´r)mod(p-1))-1
Ui i , j = 0, 1, …, (p - 2),
where Ui(j) is the original bit position of j-th permuted bit of i-th row.
end if
(6) Perform the inter-row permutation for the rectangular matrix based on the pattern T
( )
i iÎ{0,1,L,R-1}, where T(i) is the original row position of the i-th permuted row.4.3.3 Output the bits from the rectangular matrix with pruning
After intra-row and inter-row permutations, the bits of the permuted rectangular matrix are denoted by 'y : k
The output of the Turbo code internal interleaver is the bit sequence read out column by column from the intra-row and inter-row permuted R´C rectangular matrix starting with bit y'1 in row 0 of column 0 and ending with bit y'CR in row R - 1 of column C - 1. The output is pruned by deleting dummy bits that were padded to the input of the rectangular matrix before intra-row and inter row permutations, i.e.
bits y'k that corresponds to bits yk with k > K are removed from the output. The bits output from Turbo code internal interleaver are denoted by x'1, x'2, …, x'K, where x'1
corresponds to the bit y'k with smallest index k after pruning, x'2 to the bit y'k with second smallest index k after pruning, and so on. The number of bits output from Turbo code internal interleaver is K and the total number of pruned bits is: R C K× - . The interleaving flow chart after deciding R, C is shown in Figure 4.4.
Figure 4.4: Interleaving flow chart
_____________________________________________________________________
Chapter 5
Design Considerations
_____________________________________________________________________
The 3GPP turbo encoders are constructed by two identical encoders; therefore, we can use only one decoder to decode the received sequence serially and iteratively.
In this thesis, the turbo decoder uses only one decoder and only one ACS processor to calculate the forward and backward state metrics for low complexity. When designing the hardware of the decoder, we need to discuss and consider about several issues as follows:
1. Decoding algorithm selection.
2. Memory saving method selection.
3. Decision of the block length.
4. The analyses of fixed-point representations for calculations.