Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Download
Standard view
Full view
of .
Save to My Library
Look up keyword
Like this
17Activity
0 of .
Results for:
No results containing your search query
P. 1
DSP Specific Optimized Implementation of Viterbi Decoder

DSP Specific Optimized Implementation of Viterbi Decoder

Ratings: (0)|Views: 530 |Likes:
Published by ijcsis
Due to the rapid changing and flexibility of Wireless Communication protocols, there is a desire to move from hardware to software/firmware implementation in DSPs. High data rate requirements suggest highly optimized firmware implementation in terms of execution speed and high memory requirements. This paper suggests optimization levels for the implementation of a viable Viterbi decoding algorithm (rate ½) on a commercial off-the-shelf DSP.
Due to the rapid changing and flexibility of Wireless Communication protocols, there is a desire to move from hardware to software/firmware implementation in DSPs. High data rate requirements suggest highly optimized firmware implementation in terms of execution speed and high memory requirements. This paper suggests optimization levels for the implementation of a viable Viterbi decoding algorithm (rate ½) on a commercial off-the-shelf DSP.

More info:

Published by: ijcsis on Jun 30, 2010
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less

03/28/2011

pdf

text

original

 
(IJCSIS) International Journal of Computer Science and Information Security,Vol. 8, No. 1, 2010
DSP Specific Optimized Implementation of ViterbiDecoder
Yame Asfia and Dr Muhamamd Younis Javed
Department of Computer EnggCollege of Electrical and Mechanical Engg, NUSTRawalpindi, Pakistanasfia_t_m@yahoo.com, myjaved@ceme.edu.pk 
Dr Muid-ur-Rahman Mufti
Department of Computer EnggUET TaxilaTaxila, Pakistanmmufti@idtecnologies.ca
 Abstract
 — 
 
Due to the rapid changing and flexibility of WirelessCommunication protocols, there is a desire to move fromhardware to software/firmware implementation in DSPs. Highdata rate requirements suggest highly optimized firmwareimplementation in terms of execution speed and high memoryrequirements. This paper suggests optimization levels for theimplementation of a viable Viterbi decoding algorithm (rate ½)on a commercial off-the-shelf DSP.Keywords-component; Viterbi Decoding, ConvolutionalEncoding, Optimization Techniques, DSP Processor, Bit ErrorRate.
I.
 
I
NTRODUCTION
GENERALLY three kinds of hardware platforms areavailable for the implementation of any communication orsignal processing system/algorithm. These include ASICs,FPGAs and DSPs. Depending on the type of application andthe system requirements i.e. performance and flexibility,developers have to make a sound choice among theseplatforms. For example, where, FPGAs and ASICs areconsidered superior in terms of performance and powerefficiency, they greatly lack the programming flexibility,offered by DSPs, which is highly desirable in implementingcomplex signal processing algorithms. Moreover, the highlyoptimized architectural features and less price premium thanFPGAs, make DSPs the right choice for their use in the signalprocessing and communication applications. A detailedcomparison of all these platforms can be found in [4].The heart of this discussion is the DSP specificimplementation of Viterbi decoder, which is a well knowncommunication algorithm. Viterbi is employed for decodingthe convolutionally encoded data, which has been transmittedthrough an Additive White Guassian Noise (AWGN) channel.The strength of this algorithm to correct most of the errorsmakes it an essential module of a CDMA/WCDMA system.
‘Viterbi Algorithm (VA) decoders are cur 
rently used in aboutone billion cell phones, which is probably the largest number inany application. However, the largest current consumer of VAprocessor cycles is probably digital video broadcasting. Arecent estimate at Qualcomm is that approximately 1015 bitsper second are now being decoded by the VA in digital TV sets
around the world, every second of every day’ [2]. The
algorithm works by forming a trellis structure which iseventually traced back for decoding the received information.This calls for massive storage requirements. Furthermore, theemerging Wireless standards, which deliver high data rates,have also raised the performance bar for Viterbi and hence theneed for an optimized system that improves the executionspeed and uses memory optimally, by reducing the logic andcode complexity, is eminent.II.
 
R
ELATED
W
ORK
 Reference [3] has presented a similar implementation onTMS320C6201 for a constraint length K=9 and code rate= 1/3but the design can be improved by the introduction of moreoptimization levels (discussed in this paper). The design of a500MHz, two 8- state, 7- bit soft output Viterbi decodersmatched to an EPR4 channel and a rate-8/9 convolutional code,implemented in 0.18_m CMOS technology has been describedin [5]. Reference [6] describes the design and implementationof a 19.2 kbps, 256 state Viterbi decoder using FPGAs with theadded capability of catering to higher input data rates. To thebest of our knowledge no research work has focused on theimplementation of Viterbi on a general DSP platform. Here wediscuss a generic Viterbi implementation which has beenoptimized well, to suit any DSP platform (processor).III.
 
O
PTIMIZATION
S
TRATEGY
 In this section we state the optimization strategy employedin the work while explaining all the phases the work has gonethrough. Usually the optimization process involves two mainsteps:
 
Logic Optimization
 
Code Optimization
 A.
 
 Logic Optimization
The logic optimization part involves simplifying thealgorithm, searching for and removing any kind of possibleredundancies. While there are some very well known logic
optimization techniques, Viterbi’s structure also reveals some
really interesting facts. The following text highlights thesepossibilities.
1)
 
 Exploting the Butterfly:
Viterbi can be logicallyoptimized by observing its butterfly structure which shows
 
244http://sites.google.com/site/ijcsis/ISSN 1947-5500
 
(IJCSIS) International Journal of Computer Science and Information Security,Vol. 8, No. 1, 2010
many optimization possibilities. Different techniques that canmake good use of the structure are explained below.
Figure 1. The Symmetry in Viterbi
s Butterfly
a)
 
 Loop Unrolling
: Optimization may also be achievedby techniques like loop-unrolling, which reduces the loopiterations by repeatedly writing the part of code that needs tobe looped. This effectively increases the execution speed at thecost of increased code-memory space requirements.
 
Each trellis stage requires a set of operations that need to beperformed for each state, i.e. calculating metrics and decidingfor the next optimal path. The butterfly structure howeverdepicts a natural symmetry in the algorithm i.e. all theconsecutive states can be paired as they show similartransitions.The required operations for the consecutive states are henceunwound so that the optimizer is permitted to findcombinations of possible parallel instructions/operations. Inthis way a reduction by a factor of two can be observed in theno of loop iterations.
b)
 
 Branch metric:
The butterfly reveals anotherinteresting optimization possibility i.e. if one branch metricvalue say, a is known, the rest three are obvious (Figure-1). Itmeans that out of four values we need to store only onereference value while the other three can be easily evaluated.In this way a total of 3/4th of the required memory space canbe saved.
c)
 
 Elimination of Transition Memory:
Lastly, for theprocess of traceback, no transition memory is really requiredto be maintained as the butterfly symmetry clearly states that if 
the current node is ‘n’ or ‘n+32’ the previous states must beeither ‘2*n’ or ‘2*n+1’ and so, with the addition of few simple
operations, a great deal of memory space can be saved.
2)
 
Use of Look-up Tables:
An important decision lies withthe usage of ifelse/switch structure and look-up tables. Whilethe Ifelse/ switch statements are simpler to code, they have anobvious disadvantage of breaking the pipeline. The ifelsestructure is treated as a branch instruction which can notalways be correctly predicted as a taken branch or not. Theinstructions following the branch instruction may or may notbe executed depending on the condition being checked andthus it breaks the pipelined path.The use of look-up tables has no such disadvantage. Instead,it helps increasing the execution speed but at the cost of increased data-memory requirements. The switch structure canbe replaced by a look-up table by mapping all the cases asindices and placing all the resulting values into the arrays atthe corresponding indices of the array.
3)
 
Off-line Processing:
Look-up tables may also beemployed to substitute such arithmetic and logical operationswhose results are obvious/ static. Results of certain operationscan be pre-calculated and stored in such tables. This is calledoffline processing.For instance, in case of 
 Hard Viterbi implementation
, foreach state and input a value of branch metric has to becalculated which requires an XOR (modulo-2 add) operation.This operation may take 3 to 4 clock cycles.However if we pre-calculate all the possible branch metricsand keep them in a look-up table, it will require a singlememory read cycle. Hence a great deal of improvement inexecution speed is observed.
4)
 
Optimal MAC:
Where use of look-up tables is reallyadvantageous in case of hard viterbi decoding; for Soft Viterbiimplementation, use of Look-up tables for keeping the branchmetric values must be avoided. As known, Soft decisionsincrease the number of different possible signal levels in theincoming encoded information. This requires an additionallook-up table for mapping these signal levels to array indicesso that the branch metric values placed in metric-look-up tablecan be accessed.This approach doubles the memory access time. Instead, aMAC (Multiply and Accumulate) operation requires lessexecution time as compared to the memory access timerequired for the looking-up process and so a better logicimplementation can be achieved using MAC operation.
 B.
 
Code Optimization
Once a suitable level of optimization has been achievedlogically, the code is analyzed at the architectural level to look for further optimization possibilities. This step is especiallydone as a part of hardware implementation. During this phase,an effort is made to exploit the core architecture to seek asmany benefits as possible. The code optimization part canbenefit from the following features and techniques [7].
1)
 
Specialized Instructions:
Optimization at this levelgreatly depends on the instruction set architecture of thehardware platform in consideration (DSPs, in our discussion).DSPs are equipped with a set of well tuned specializedinstructions that form a flexible and densely encodedinstruction set compiling to a very small memory size. Use of such specialized instructions in the code is really advantageousin producing an optimized product, in terms of both memoryand speed.With the help of multi-functional instructions many of theprocessor resources may be used in a single instruction. MACinstruction is one of the examples of such specializedinstructions. It executes the MAC operation i.e.Multiply/Accumulate in a single cycle. However if such an
245http://sites.google.com/site/ijcsis/ISSN 1947-5500
 
(IJCSIS) International Journal of Computer Science and Information Security,Vol. 8, No. 1, 2010
operation is done with the help of individual Multiply and Addinstructions, it will take more than 1 cycle.
2)
 
Parallel Operations:
Capability of executing operationsin parallel is one of the most desirable features in any DSPprocessor as it helps achieving a higher level of optimization
and thus largely improves the system’s throughput. A wide
range of DSP processors are available in market with varyingfeatures, designed for different kinds of applications; Super-scalar and VLIW architectures being a popular choicewherever a speedy system is targeted. These systems permitissuance of more than a single instruction, to the executionunits, per cycle.Super-scalar machines can dynamically issue multipleinstructions per clock cycle whereas VLIW Processors use along instruction word that contains a usually fixed number of instructions that are fetched, decoded, issued, and executedsynchronously. Though these architectures are reallyadvantageous still they add to the complexity and cost of thesystem which can not always be afforded. In such a situationan inexpensive simpler system, with added capability of allowing some instructions to be issued in parallel, like ADSPBlackfin, provides efficient implementations both in terms of cost and performance.
3)
 
 Loop Unrolling w.r.t Code:
Looping structures presentin the code can be unrolled for improving the execution speedbut, as discussed before, at the cost of increased code memorysize. Unrolling the loop makes it possible to take maximumbenefits of the core architecture. For example once thestatements are unrolled, independent operations/ processesmay be carried out in parallel to each other.
4)
 
 Zero Overhead Loops:
Software loop overhead can besignificantly reduced by assigning the control of the loop tothe hardware. The loop counter register holds a value which isbased on the test instructions. This counter is decremented andlooping continues until the counter reaches zero. Such astrategy loads off the operating system from the overhead of testing loop condition every time (for each iteration) and thusa significant improvement in performance is observed.
5)
 
 Reusing the same Memory for Trellis structure(Memory Optimization):
Figure-
2 shows Decoder’s internal
design. As shown, once the input buffer is filled with therequisite amount of input samples, the data is sent out to theTrellis unit in form of chunks. Length of the buffer dictates theinput latency but here we assume that the buffer is alreadyfilled whenever the data is required and so the input latency iszero. The Trellis unit builds up the trellis. The buffer keeps onfeeding the trellis until the length of the trellis reaches thetraceback depth. At this point, the trellis is traced back by theTrace Back unit to produce the decoded data.Once the trellis is fully traced back, the next call to thetraceback unit needs to be initiated immediately after singlebuffer fetch instead of waiting for the re-fill of the wholetrellis. This significantly eliminates the latency required for re-filling all the trellis stages and reduces the processing timerequired for tracing back the whole trellis at once and thus
increases the systems’s average speed.
 
Figure 2. Decoder
s Internal Configuration
The trellis can be implemented with the help of circular bufferso that the same memory is re-used because once it is tracedback the data occupying the trellis is no longer useful. Thishelps reducing a significant amount of required memoryspace.IV.
 
I
MPLEMENTATION
 This section discusses the implementation details of our designon a DSP platform. Our aim is to design an optimized versionof Viterbi having a constraint length K=7 i.e. for a total of 64states particularly the scroll down window on the left of theMS Word Formatting toolbar. with a code rate of 1/2.However the system for a rate 1/3 encoder holds quite asimilar structure (except for the no of output bits
‘n’
and so thebranch metric size), the optimization techniques discussed forrate ½ system can efficiently be applied here too. So, our work examines performance for both code rates. Moreover,performance estimation for a system with constraint lengthK=9 has also been considered.It is important to mention here that the size of input buffer iskept as 10 samples and the traceback depth is set as 100.
 A.
 
 Design Phases1)
 
Phase I 
 – 
MATLAB:
An initial design of the system caneasily be developed in MATLAB and can be further analyzedand improved through simulations. The steps include:
 
 
The input to the system is a randomly generated bitstream (vector) of length 1000.
 
This input is then convolutionally encoded.
 
The resultant encoded data has to be transmittedthrough the channel but before its transmission, it ismapped onto different signal levels. The encodedinformation is modulated using
 4-QAM 
modulationscheme.
 
After this mapping process has been finished, thesignal is transmitted through AWGN channel.MATLAB has a pre-defined routine for AWGNchannel. By passing the SNR and Signal Powervalues as arguments, any signal can be sent and thuscorrupted through the channel. The Signal-to-Noiseratio (SNR) is continuously varied from minimum tomaximum so that the system can be tested well forthe whole SNR range.
 
A comparison of the resultant Bit error rates of ourdeveloped Hard Viterbi codes, Soft Viterbi code and
246http://sites.google.com/site/ijcsis/ISSN 1947-5500

Activity (17)

You've already reviewed this. Edit your review.
1 thousand reads
1 hundred reads
Pankaj Sahu liked this
abushirwa liked this
Steffi Alice liked this
Tomás Scherrer liked this
kollusr liked this
sivabhaskar1 liked this
1manoj1 liked this

You're Reading a Free Preview

Download
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->