1. Field of the Invention
The present invention relates generally to a Viterbi decoder and a Viterbi decoding method used in a maximum likelihood decoding method of a convolutional code used in a digital data communication system.
2. Description of the Prior Art
The need for reliable data transfer is becoming more and more important in today's digital world. When transferring data bits over a channel, the Viterbi algorithm is widely used for reducing the effects of noise that may corrupt a data stream. The Viterbi algorithm belongs to a large class of error correcting codes known as convolution codes.
An example of a simple convolutional encoder 20 is depicted in
The number of bits that can be connected to a modulo-2 adder to influence the encoding of one output bit is called the “constraint length.” In this document the constraint length is represented by the variable “K.” Encoder 20 has a constraint length K=3 because 3 bits-22, 28, and 30—are used to compute output bits 24. The selected connections between information bits 22, 28, and 30 and modulo-2 adders 32 and 34 may be described by equations called “generator polynomials.” A set of generator polynomials are represented herein as G[p:0][K-1:0], where (p-1)-number of polynomials G are used, and each polynomial includes (K-2) bits (because it is assumed that the input bit is always connected to a modulo-2 adder). In the example of
If convolutional encoder 40 is configured to operate in a recursive encoding mode, bit REC 50 is set to 1 and feedback polynomial GF[K-2:0] 52 is specified to determine connections between shift register 46 and modulo-2 adders 54.
By selecting the proper generator polynomials, encoder 40 can be configured for constraint lengths K from 4 to 9 (i.e., 4<=K<=9). For example, for K=7, Gi[7] and Gi[6] are set to 0 in each generator polynomial. In a preferred embodiment of encoder 40, N sets of generator polynomials 44 and modulo-2 adders 48 may be used in parallel to produce various 1/N code rates, such as ½ to ⅙ (i.e., 2<=N<=6).
At the receiver of a digital data message, a Viterbi decoder may be used to decode the encoded stream of information bits by finding the maximum likelihood estimate of the transmitted sequence. Viterbi decoders are commonly used to decode the convolutional codes used in wireless applications. And other applications of forward error correcting codes and Viterbi decoders include CD and DVD players, high-definition TV, data-storage systems, satellite communications, and modem technologies.
The trellis diagram depicted in
The Viterbi algorithm is comprised of two routines-a metric update and a traceback. The metric update accumulates distances in code space for all states based on the current input symbol using the state transitions represented by the trellis diagram (similar to
As shown in the block diagram of Viterbi decoder 70 in
The problem of branch metric computation depends upon the generator polynomials and the state bits of the trellis butterfly for the current ACS operation. To find a branch label for one branch, the decoder hardware essentially implements the encoder function with the user supplied generator polynomials and a hypothetical input bit.
Therefore, it should be apparent that there is a need for an improved Viterbi decoder that efficiently calculates branch labels using fewer encoder cycles, less circuitry, and smaller silicon area.
In a convolutional decoder according to an embodiment of the invention, eight branch labels for branches in two trellis butterflies are calculated using a single output of an encoder. For a group of four consecutive states, Si, Si+1, Si+2, and Si+3, state Si+3 is loaded into a convolutional encoder and the convolutional encoder input bit is set to 1. The output bits of the convolutional encoder are used as a branch label in a first trellis butterfly. A branch label in the second trellis butterfly is calculated with a formula in a branch label calculator using the convolutional encoder output bits as an input to the formula. The remaining branch labels are calculated from the convolutional encoder output and the branch label output from the branch label calculator. Selected bits of the branch labels are used to address a small branch metric register file.
For decoding a recursive code, a second formula is substituted for the formula used in a non-recursive system.
For a more complete understanding of the present invention, and the advantages thereof, reference is now made to the following descriptions taken in conjunction with the accompanying drawings, in which like numbers designate like parts, and in which:
With reference now to the drawings, and in particular with reference to
In a preferred embodiment, the number of polynomials p 104 may be limited to three distinct polynomials. Therefore, if the code rate is greater is than ⅓, some generator polynomials are repeated so that a selected polynomial is used to produce more than one output bit 120. The code rate is preferably from ½ to ⅙, inclusive. Constraint length K 108 is preferably from four to nine, inclusive. State bits 112 set the bits in the shift register, or memory locations, such as bits S0-S7 shown in shift register 46 in
In a Viterbi decoder, branch labels are calculated for every node in the decoding trellis at each unit of time. For each trellis butterfly, one label may be calculated and the remaining three labels may be easily derived.
As shown by the arrow pointing to lower trellis butterfly 128, output bits 120 may be used as branch label 144′ for branch 144.
According to an important aspect of the present invention, branch is labels are calculated for a selected group of four states in a trellis diagram. As shown in
k=j+2((K-2)−1)
The first state in the group of four, Si 150, is preferably selected by a modulo-4 counter. In order to calculate branch label 144′ associated with the fourth state Si+3 156 in the group of four, convolutional encoder 100 is loaded with parameters 102, including input bit 110 equal to 1, to produce output bits 120, which are used as branch label 144′ (which is also BL7) for branch 144. The remaining branch labels 138′ through 142′ in butterfly 128 may be calculated or derived from branch label 144′. For example, branch label 138′ is the same as branch label 144′, and branch labels 140′ and 142′ are the inverse of branch label 144′.
To obtain branch labels 130′-136′ in trellis butterfly 126, output bits 120 are used as inputs to branch label calculator 170, which outputs bits 172 that are used as branch label 136′. Once branch label 136′ is known, the remaining branch labels 130′-134′ of trellis butterfly 126 may be derived or calculated as follows: branch label 130′ is the same as branch label 136′ and branch labels 132′ and 134′ are the inverse of branch label 136′.
Thus, using the symbols BL0-BL7, BL3 is related to BL7 by a function executed within branch label calculator 170. The following equations show the relationships between the branch labels of two butterfly trellises 126 and 128.
BL4=BL7
BL5=BL6={overscore (BL7)}
BL3=f(BL7)
BL0=BL3
BL1=BL2={overscore (BL3)}
An important advantage of the present invention is that branch labels for two butterfly trellises may be calculated using one output cycle of one convolutional encoder. This is accomplished by using combinatorial logic within branch label calculator 170 to implement a formula for a bit-wise calculation of a branch label of a second butterfly using a branch label of a first butterfly. As shown in
The inputs to branch label calculator 170 are output bits 122 from convolutional encoder 100 and bit REC 106, which indicates whether or not convolutional encoder 100 is operating in a recursive or non-recursive mode. The outputs of branch label calculator 170 are output bits 172, which are equivalent to the output of convolutional encoder 100 if it had been set to state 152 with a 1 applied at input bit 110. These output bits may also be referred to as “the branch label for the input equals 1 transition from state Si+1 to state Sk.”
By calculating output bits 172 from bits 120, the decoder can calculate 8 branch labels in a single cycle of one convolutional encoder 100. In a typical Viterbi decoder application, a convolutional decoder 100 would be loaded with parameters 102 at least twice to produce two sets of output bits 120 in order to calculate branch labels for two butterfly trellises. By using branch label calculator 170, the number of encoder cycles can be reduced by one-half, thereby saving the space needed to provide a second parallel convolutional encoder, or alternatively reducing the time needed for two encoding cycles to calculate the two branch labels.
The formulas and high-level logic used to implement the formulas of branch label calculator 170 are shown in
Since the encoder is set in the recursive encoding mode, bit 190 is taken from feedback polynomial GF 192 from the (K-3) bit position, which for K=9 is the sixth bit of feedback polynomial GF 192. When REC bit 120 is true, multiplexer 174 selects the output of exclusive or gate 180 and outputs V′i, one of the bits in output bits 172.
If REC bit 120 is false, the non-recursive mode is selected, and multiplexer 174 selects the output of exclusive or gate 194, which executes the formula for calculating bit V′i for an encoder set to a non-recursive mode. Inputs to exclusive or gate 194 are the (K-3)-bit 196 of the ith generator polynomial 188. In the example shown for calculating V′0, generator polynomial 188 is G0. And for K=9, the sixth bit is selected, wherein the bits in G0 188 are numbered from zero in ascending order from the left.
Similar to formula 176, bit 198 is a selected bit Vi 120 corresponding to the bit V′i being calculated. As shown in
With reference now to
Convolutional encoder 100 also receives inputs from encoder parameters 304. These encoder parameters are similar to encoder parameters 102 shown in
Convolutional encoder 100 outputs bits V0-V2, which represent the branch label or branch word for a particular branch or transition in the butterfly. Bits V0-V1, the least significant bits of the branch label, are stored in register 306. The output of register 306 is used to provide a two-bit address for branch metric register file 308. Register file 308 is a dual port memory that simultaneously receives two addresses shown as “@A” and “@B”. Multiplexer 310 selects bits V1V0 or the inverse of V1V0, depending upon the state of V2, which selects address @A as the output of multiplexer 310.
Output bits V1V0 are also input into branch label calculator 312, which is the same as branch label calculator 170 shown in
Note that through addresses @A and @B, the lower two bits (least significant two bits) of Vi and Vi′, and their inverses, supply all address bits needed to access the 4×16 register file 308. Register file 308 is used to store information needed to recreate 8 branch metrics for all transitions in two trellis butterflies. The branch metrics are stored as combinations of four- or eight-bit soft decisions.
The output of register file 308 is provided at outputs A and B, which are each 16 bits wide and connected to registers BMH 316 and register BML 318. BMH is the branch metric value stored at address @A and BML is the branch metric value stored at address @B. Registers 316 and 318 hold these branch metric values for use in calculations in add-compare-select unit 320. Add compare select unit 320 also receives inputs V2 and V2′ from registers 322 and 324, respectively. Note that V2′ is calculated by branch label calculator 312′, which is the same as to branch label calculator 170 shown in
Add-compare-select unit 320 adds or subtracts the branch metrics stored in registers BMH 316 and BML 318 to a previously calculated state metric to calculate first and second state metrics. The first and second state metrics are then compared, and the best state metric is saved for the next iteration of state or path metric calculations. The addition or subtraction of BMH 316 is controlled by the state of V2 and the addition or subtraction of BML 318 is controlled by the state of V2′. The output of add-compare-select unit 320 is stored in result FIFO 326. Add-compare-select unit 320 stores additional data in registers 328 and 330.
With reference now to
As illustrated, data receiver includes receiver and a demodulator 402, Viterbi decoder 404, data output unit 408, and optionally output device 410. Receiver and demodulator 402 typically receives an analog signal and uses an A to D converter to produce a stream of data bits. Such data bits are encoded with a convolutional encoder similar to encoder 40 shown in
Viterbi decoder 404 receives data from receiver and demodulator 402 and uses a Viterbi algorithm to decode the data stream. To produce a stream of information bits. In accordance with the present invention, Viterbi decoder 404 includes branch label calculator 406, which may be implemented as shown in
Viterbi decoder 404 outputs information bits to data output unit 408. Data output unit 408 formats the information bits or user data and provides the proper electrical and mechanical data interface. For example, data output unit 408 may provide a USB interface, an Ethernet interface, a fire wire interface, or other custom data bus interface.
Output device 410 may be used to provide a human data interface, such as a screen or an audio output. For example, if data receiver 400 is a cellular telephone, output device 410 may be implemented with a screen and an earpiece speaker to provide the user with both audio and video data.
The foregoing description of a preferred embodiment of the invention has been presented for the purpose of illustration and description. It is not intended to be exhaustive or to limit the invention to the precise form disclosed. Obvious modifications or variations are possible in light of the above teachings. The embodiment was chosen and described to provide the best illustration of the principles of the invention and its practical application, and to enable one of ordinary skill in the art to utilize the invention in various embodiments and with various modifications as are suited to the particular use contemplated. All such modifications and variations are within the scope of the invention as determined by the appended claims when interpreted in accordance with the breadth to which they are fairly, legally, and equitably entitled.