This example implements a hard decision based Viterbi decoder on an FPGA bitstream file. It retreives decoded bitstream data from the FPGA and pushes data back to the FPGA.
Viterbi decoders are used in systems where data are transmitted and subject to errors before reception. For example, wireless transmissions are prone to error before reception so it is typically seen in applications like digital video, radio, mobile communication, and satellite communication. Specifically, a Viterbi decoder is a method that uses the Viterbi algorithm for decoding bitstream files that have been encoded using an error-correcting code called convolutional code. Convolutional encoding is a forward error correction technique that is useful in applications where the transmitted signal is corrupted by additive white gaussian noise. Additive white gaussian noise appears normally in wireless transmissions.
Convolutional codes are usually described using two parameters:
The code rate (r): "k/n" is the ratio of the number of bits into the convolutional encoder (k) to the number of channel symbols outbut by the convolutional encoder (n) in a given encoder cycle.
The constraint length (K): "K" is the length of the convolutional encoder - how many k-bit stages are available to feed the combinatorial logic that produces output symbols.
Viterbi decoding has the advantage of fixed decoding time and is well suited to hardware decoder implementation as seen in this example. But since computational requirements grow exponentially, which causes this to be a resource intense decoding method, it is normally limited in practice to constraint lengths of K <=10.
In addition, convolutional code can be described by generator sequences that are the impulse responses of each coder output branch. Generator sequences specify convolutional code completely by the associated generator matrix.
Hardware Viterbi decoder for basic code usually consists of three major blocks:
Branch Metric Unit (BMU) - used to calculate branch metrics or normed distances between every possible symbol in the code alphabet and the received symbol. This block determines if the decoder is a soft decision or hard decision decoder. A hard decision decoder receives a simple bitstream file on its input and a Hamming distance is used as a metric. A soft decision decoder receives a bitstream containing information about the reliability of each received symbol.
Path Metric Unit (PMU) - used to summarize the branch metrics to get metrics for 2^(K-1) paths where one of the paths will be chosen as the optimal. It is here that the trellis diagram of the code is referenced.
Traceback Unit (TBU) - used to restore, as close as possible, the maximum likelihood path from the decisions made in the PMU.
In this specific example, this decodes a rate (r) =1/2 convolution code with a constraint length (K) = 7 and programmable generator matrix. The example uses a programmable generator matrix to specify the convolutional code in the FPGA VI and decode the code in the Host VI. It is a hard decision Viterbi decoder.
Steps to Implement or Execute Code
Open PXIe5641R Viterbi K7 (FPGA).vi
Press Run in the PXIe5641R Viterbi K7 (FPGA).vi
Open PXIe5641R Viterbi K7 (HOST).vi
If a different generator matrix is desired then change the values for the "Generator Matrix" control
Press Run in the PXIe5641R Viterbi K7 (HOST).vi
Observe the error of the output values received from the Viterbi decoded bitstream file.