The technical field of this invention is forward error correction.
Receivers capturing data can do so more efficiently if the data has been encoded allowing forward error correction. The Viterbi decoder uses the Viterbi algorithm for decoding a bitstream that has been encoded using Forward Error Correction based on a Convolutional code. The Viterbi algorithm is highly resource-consuming, but it does provide maximum likelihood decoding.
Viterbi decoders employ Trellis decoding to estimate the most likely sequence of events that lead to a particular state. U.S. patent application Ser. No. 12/496,538 filed Feb. 1, 2009 entitled “METHOD AND APPARATUS FOR CODING RELATING TO FORWARD LOOP” describes faster decoding in Viterbi decoders by employing 2 bits of the Trellis decoding to be performed using DSP instructions called R4ACS Radix-4 Add Compare Select (RACS4) and Radix-4 Add Compare Decision (RACD). This invention deals with the implementation of this class of DSP instructions.
Turbo codes are a type of forward error correction code with powerful capabilities. These codes are becoming widely used in many applications such as wireless handsets, wireless base stations, hard disk drives, wireless LANs, satellites, and digital television. A brief overview of Turbo decoders is summarized below.
A functional block diagram of a turbo decoder is shown in
The MAP decoders 102 and 103 compute the extrinsic information as:
where: R1n=(R0, R1, . . . Rn-1) denotes the received symbols. The MAP decoders also compute the a posteriori probabilities:
Here Sn refers to the state at time n in the trellis of the constituent convolutional code.
The terms in the summation can be expressed in the form
Pr(xn=i,Sn=m′,Sn-1=m)=αn-1(m)γni(m,m′)βn(m′) (3)
where the quantity
γni(m,m′)=Pr(Sn=m′,xn=i,Rn|Sn-1=m) (4)
is called the branch metric, and
an(m′)=Pr·(Sn=m′,R1n) (5)
is called the forward (or alpha) state metric, and
β(m′)=Pr(Rn+1n|Sn=m′) (6)
is called the backward (or beta) state metric.
The branch metric depends upon the systematic, parity, and extrinsic symbols. The extrinsic symbols for a given MAP decoder are provided by the other MAP decoder at inputs 109 and 110. The alpha and beta state metrics are computed recursively by forward and backward recursions given by
The slicer 107 completes the re-assembling of the output bit stream x0 . . . xn-1 108.
The block diagram of the MAP decoder is shown in
Both the alpha state metric block 202 and beta state metric block 203 calculate state metrics. Both start at a known location in the trellis, the zero state. The encoder starts the block of n information bits (frame size n=5114) at the zero state and after n cycles through the trellis ends at some unknown state.
The mapping of this task of computing the branch metrics and adding to the previous state metrics, to a class of DSP instructions (T4MAX/T2MAX) is outside the scope of this invention. The current invention deals with the efficient implementation of this class of DSP instructions.
One of the main sources of latency in computer arithmetic is the propagation of carries in the computation of a sum of two or more numbers. This is a well-studied area, which is not explored here except to note that the best algorithms for addition require a number of logic levels equal to:
levels=2+log2*(width) (9)
where: width is the number of bits representing the numbers to be added.
The three inputs can be any three bits, while the two outputs are the sum S and carry C0 resulting from the addition of these three bits. These are computed based on the following logical equations:
S=a⊕b⊕c (10)
C0=(a*b)+(b*c)+(c*a) (11)
The main advantage of using the 3:2 circuit is that equations (10) and (11) can typically be computed with a logic depth of no greater than 2. Thus it allows for faster computation of the sum of three numbers by preventing the carry from propagating. Therefore, given three numbers which need to be added together, rather than sequentially computing a+b=x, and then x+c, with a resulting delay
delay=2*(2+log2*(width)) (12A)
one can process a+b+c through a 3:2 CSA compressor followed by an adder to achieve a total delay of:
delay=4+log2*(width) (12B)
The savings in the number of logic level delays becomes even more pronounced when the width of the operands involved is large.
The present invention makes possible the optimization and re-use of hardware in the implementation of R4ACS Radix-4 Add Compare Select (RACS4) and Radix-4 Add Compare Decision (RACD) both classes of instructions for Viterbi decoders and T4MAX/T2MAX Turbo decoders using carry save arithmetic. Successful provision for these instructions requires merging the computation of summation terms and implementing an efficient method of computing.
The invention solves these issues and merges the R4ACS/R4ACD instructions with a complete reuse of the hardware that is required for the implementation of T2MAX/T4MAX instructions. The hardware required by both classes of instructions is optimized by efficiently employing carry save arithmetic.
The merged hardware includes a configurable three input arithmetic logic unit that can perform four arithmetic operations used by the max instructions. This invention uses 2's complement arithmetic and selective inversion to perform the four arithmetic operations a+b+c, a+b−c. a−b+c and a−b−c. These computations are used on inner terms of a max4 operation to facilitate circuit reuse in performing the operations in WiMAX radix-4 turbo decoders. A preferred embodiment employs carry-save adders in the three input arithmetic logic unit.
These and other aspects of this invention are illustrated in the drawings, in which:
R4ACS/R4ACD instructions used for implementing Viterbi decoding involve the following arithmetic computation:
R=max4*(a1+b1+c1,a2+b2−c2,a3−b3+c3,a4−b4−c4) (13)
T2MAX/T4MAX Instructions used for Turbo decoders involve instructions requiring the following arithmetic computation:
R=max4*(x1+y1+z1,x2+y2+z2,x3+y3+z3,x4+y4+z4) (14)
where: each of the terms compared can be N bits wide in general.
The following are the main issues in merging the two classes of instructions; merging the computation of summation terms (a2+b2−c2), (x2+y2+z2), (a3−b3+c3) and (x3+y3+z3); implementing an efficient method of computing for (a4−b4−c4); and merging this computation with (x4+y4+z4).
The present invention solves both of these issues and successfully merges the two classes of instructions. Furthermore, our invention optimizes the hardware required by both classes of instructions by efficiently employing carry save arithmetic.
The first term a 411 is 2's complement value and is a direct input to 2's complement adder 401 used to generate an intermediate result S 409. The second term b 412 passes through multiplexer 403, which generates b or the complement of b and passes the result to input 408 of adder 401. The third term c 413 is passes through multiplexer 404 to generate c or the complement of c and passes the result to input 407 of adder 401. Adder 402 with inputs 407 and 409 generates the final result y 410. The signals selb 405 and selc 406 control the 2:1 multiplexers 403 and 404 respectively. The signals cin1414 and cin2415 are the carry-in values to the least significant bit positions of the respective adder circuits. By appropriately setting the values of these signals as shown in Table 1, one can generate any of the four terms required by the Viterbi instructions.
These settings are based on the following simple Boolean equation for computing the 2's complement:
−x=(˜x)+1 (15)
where: ˜x is the bit-wise complement of an N bit wide signal x; and −x is its additive inverse.
However, the approach of
The basic idea behind the generation of the first three terms in this approach is similar to the implementation in
a−b−c=a+((˜b)+1)+((˜c)+1) (16)
The signal cin2 can be set to provide the binary 1 that is required for generating the 2's complement of one of the inputs. The N-bit wide carry vector k generated by the 3:2 CSA circuits needs to be shifted to the left by one, prior to combining with the sum vector m, based on arithmetic weight. This leaves the carry bit from the 3:2 CSA circuit in the lowest bit position as an unused input. The signal cin1 is used to drive this input to add in the extra binary 1 that is required to generate the 2's complement for the other input. Thus all four terms required by the Viterbi instructions can be obtained using the hardware described in
The total area consumed by the N 3:2 Carry Save circuits is typically much less than the N-bit wide adder that they replace, if one had chosen a carry-look-ahead or parallel-prefix adder which is optimized for performance. On the other hand, if one chooses an adder architecture based on chip area considerations (e.g. a ripple-carry adder), the delay through a 3:2 Carry Save circuit is much smaller in comparison. More important, this delay is constant and is independent of the width N of the operands involved, leading to even greater efficiency of this approach with regards to area and performance, as the width N of the operands increases.
The implementation of the MAX* computation function (such as noted above) in WiMAX CTC/3GPP radix-4 decoders is hardware intensive. Likewise, the hardware requirements in the implementation of certain low density parity check (LDPC) functions can be quite large. When designing circuits that implement both functions, it advantageous to minimize and efficiently reuse hardware in order to limit overall area and power requirements. This invention allows efficient reuse of the hardware required to implement both the MAX* and LDPC functions. Typically, the MAX* computation in the WiMAX decoders requires the following arithmetic computation:
The MINST implementation for LDPC functions requires the following computation:
These two functions appear to be different since the nature of comparison of the threshold operands in the MINST is different from the computation of the terms in the max4 function of the MAX* function. This ordinarily implies that the hardware required to implement them cannot be shared. This invention further describes a manner for sharing hardware to implement these two functions.
The invention involves the following simple transformation to the MINST computation. The MINST function can be rewritten as:
This transforms the inner decisions in the range determinations of steps 7 and 8 into three input arithmetic operations with a compare to zero. Thus each term for the threshold comparison now resembles one of the three input arithmetic operations used in the max4 function almost exactly. The compare to zero portion of each inner decision is indicated by the three input ALU carry output 520. Much of the hardware required to implement these two functions can now be shared. This is an important area and power saving since each of the terms involved in this computation can be N bits wide in general.
Circuit 730 completes the range comparisons of steps 7 and 8. AND gate 731 forms the AND function of step 7 from the Carry1 and Carry2 values. Multiplexer 732 completes the “If . . . then . . . else” operation of step 7 by selecting value for offset1 if the range condition is satisfied and selecting 0 otherwise. AND gate 735 forms the AND function of step 8 from the Carry3 and Carry4 values. Multiplexer 736 completes the “If . . . then . . . else” operation of step 8 by selecting value for offset2 if the range condition is satisfied and selecting 0 otherwise.
The calculation of min in steps 1 and 2 is not on the critical path and thus can be done separately. Final ALU 740 performs the operation z=min+offset1−offset2 of step 9. This could be preformed by a further pass through three input ALU 610 or two passes through a normal two input ALU.
The final arithmetic operation (z=min+offset1−offset2) may be further simplified. Each of offset1 and offset2 can individually be “0” or “value” depending upon the respective range determinations. Their difference (offset1−offset2) is thus either be “0”, “value” or “−value”. Table 3 list these conditions.
Multiplexer 822 takes advantage of 2's complement arithmetic and equation (15) to execute the subtraction by inversion and injection of a carry into ALU 830. ALU 830 performs the addition of min to form the result z.
The major advantage of this embodiment of the invention is that rearranging the inner calculations of the range decisions of steps 7 and 8 permits reuse of three input ALU 610 for performing the MINST function.
Compared to other solutions to the same problem, this solution offers better performance than other solutions requiring comparable chip area. In addition, reduced chip area can be achieved when compared with other solutions offering comparable performance. The solution offers efficient performance while keeping area requirements low. These benefits are further enhanced as the size of the operands involved increases, leading to greater scalability of this approach.
Number | Name | Date | Kind |
---|---|---|---|
4799190 | Douglas et al. | Jan 1989 | A |
4918636 | Iwata et al. | Apr 1990 | A |
5144577 | Linnenberg | Sep 1992 | A |
5418795 | Itakura et al. | May 1995 | A |
20030110198 | Park | Jun 2003 | A1 |
20080263123 | Penzes | Oct 2008 | A1 |
Number | Date | Country | |
---|---|---|---|
20130179483 A1 | Jul 2013 | US |