📄 exp9.html
字号:
decodes convolutional encoded bit streams to obtain the class bits.
<p style="margin-right:1.0in;margin-left:1.25in;text-indent:-.25in;mso-list:
l0 level1 lfo2;tab-stops:list 1.25in">11.<span style="font:7.0pt "Times New Roman""></span><i>Error
verification module<span style="mso-spacerun: yes"></span></i>The decoded
bits are verified against the CRC code. If the local generated CRC does
not match the received CRC, the frame is marked as an error frame.
<p style="margin-right:1.0in;margin-left:1.0in"><o:p></o:p>
<center>
<p><o:p></o:p>
<p><!--[if gte vml 1]><v:shape
id="_x0000_i1030" type="#_x0000_t75" style='width:295.5pt;height:172.5pt'>
<v:imagedata src="" o:title="image006"/>
</v:shape><![endif]--><img SRC="image007.gif" BORDER=0 v:shapes="_x0000_i1030" height=231 width=394>
<p>Figure E9-4 Detailed functional modules of the receiver</center>
<p style="margin-right:1.0in;margin-left:1.0in"><o:p></o:p>
<p class="MsoNormal" style="margin-left:1.0in;mso-layout-grid-align:none;
text-autospace:none">The
transmitter inserts a sync pattern into the streams before the symbols
are sent. The receiver looks for the pattern to identify the start of a
frame using correlation method. The function of the sync correlation is
in <span style="mso-bidi-font-size:10.0pt;font-family:"Courier New"">sync_cor.c</span><span style="mso-bidi-font-size:10.0pt">.<span style="mso-spacerun: yes"></span>This
file contains the function </span><span style="mso-bidi-font-size:
10.0pt;font-family:"Courier New"">sync_cor(
)</span><span style="mso-bidi-font-size:
10.0pt"> which is responsible
for taking </span><span style="mso-bidi-font-size:
10.0pt;font-family:Symbol">p</span><span style="mso-bidi-font-size:10.0pt">/4
DQPSK encoded I and Q symbols at 4X symbol rate and obtaining an offset
index to the synchronization point of the input symbol. The data is initially
filtered to the I and Q symbol streams at 4X symbol rate. The sync offset
index point is determined using the complex Cartesian correlation of the
sequential offsets, which determine the correlation peak. <o:p></o:p></span>
<p class="MsoNormal" style="margin-left:1.0in;mso-layout-grid-align:none;
text-autospace:none"><o:p></o:p>
<p class="MsoNormal" style="margin-left:1.0in;mso-layout-grid-align:none;
text-autospace:none"> Receive
filter is designed to reduce the ISI. It is a square-root-raised cosine
filter. The 48-tap FIR filter is used by 4X decimation to recover the symbols
to 1X symbol rate. The function of the receive filter is in <span style="mso-bidi-font-size:10.0pt;font-family:"Courier New"">rx_src.c</span><span style="mso-bidi-font-size:10.0pt">.<span style="mso-spacerun: yes"></span>This
file contains the function </span><span style="mso-bidi-font-size:
10.0pt;font-family:"Courier New"">rx_src(
)</span><span style="mso-bidi-font-size:
10.0pt"> which is responsible
for taking </span><span style="mso-bidi-font-size:
10.0pt;font-family:Symbol">p</span><span style="mso-bidi-font-size:10.0pt">/4
DQPSK encoded I and Q symbol steams at 4X symbol rate and generating I
and Q symbol streams at the 1X symbol rate.<o:p></o:p></span>
<p class="MsoNormal" style="margin-left:1.0in;mso-layout-grid-align:none;
text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New""><o:p></o:p></span>
<p class="MsoNormal" style="margin-left:1.0in;mso-layout-grid-align:none;
text-autospace:none">Differential
decoder is used to inverse the differential encoding process at the transmitter.
The differential decoder computes the phase changes between tow filtered
constellation points then decodes the bits. The function of the differential
decoder is in <span style="mso-bidi-font-size:
10.0pt;font-family:"Courier New"">diff.c</span><span style="font-size:10.0pt;
font-family:"Courier New"">.<span style="mso-spacerun: yes"></span></span><span style="mso-bidi-font-size:10.0pt">This
file contains the function </span><span style="mso-bidi-font-size:10.0pt;font-family:"Courier New"">diff(
)</span><span style="mso-bidi-font-size:10.0pt"> which takes the complex
input I[ ] and Q[ ] and output the decoded bits to rx_bits[ ]. This is
a hard decisions decoder that makes decision on the input I[ ] and Q[ ]
and produce output bit pairs.<o:p></o:p></span>
<p class="MsoNormal"><o:p></o:p>
<p class="MsoNormal" style="margin-left:1.0in">De-interleaving module inverse
the interleave process done by the interleaver.<span style="mso-spacerun: yes"></span>This
is carried out by reading 260 data bits from a 260x10 array column-wise
and putting them back in a row. The function of de-interleaving is in <span style="font-family:"Courier New"">interlev.c</span>.<span style="mso-spacerun: yes"></span>This
file consists of the function <span style="font-family:"Courier New"">deinterleave()</span>
which is used to de-interleave the bits in adjacent frames for the receiver.
<p style="margin-right:1.0in;margin-left:1.0in">Viterbi decoder is used
to decode the convolutional encoded bit streams.<span style="mso-spacerun: yes"></span>The
decoder has 32-states. At each time instance, a surviving path, the path
with the shortest distance, is kept, and all other unlikely paths are discarded
at each state <span style="mso-text-raise:-7.0pt"><!--[if gte vml 1]><v:shape
id="_x0000_i1031" type="#_x0000_t75" style='width:225pt;height:18.75pt'
fillcolor="window">
<v:imagedata src="" o:title=""/>
</v:shape><![endif]--><img SRC="image009.gif" BORDER=0 v:shapes="_x0000_i1031" height=25 width=300></span>,
see Figure E9-5.
<center>
<p><!--[if gte vml 1]><v:shape
id="_x0000_i1032" type="#_x0000_t75" style='width:215.25pt;height:132pt'>
<v:imagedata src="" o:title=""/>
</v:shape><![endif]--><img SRC="image011.gif" BORDER=0 v:shapes="_x0000_i1032" height=176 width=287>
<p>Figure E9-5 The trellis diagram of the Viterbi decoder</center>
<p class="MsoNormal" style="margin-left:1.0in;mso-layout-grid-align:none;
text-autospace:none">The
function of the Viterbi decoder is in <span style="mso-bidi-font-size:10.0pt;font-family:"Courier New"">vitham.c</span><span style="mso-bidi-font-size:10.0pt">.<span style="mso-spacerun: yes"></span>This
file contains the functions </span><span style="mso-bidi-font-size:
10.0pt;font-family:"Courier New"">vitdec(
)</span><span style="mso-bidi-font-size:
10.0pt"> and </span><span style="mso-bidi-font-size:10.0pt;font-family:"Courier New"">step_trellis(
)</span><span style="mso-bidi-font-size:10.0pt">.<span style="mso-spacerun:
yes"></span>These
functions implement the Viterbi decoder which is used to synthesize the
class-1 bits, cl1[ ], from the input stream cc0[ ] and cc1[ ].<o:p></o:p></span>
<p class="MsoNormal" style="margin-left:1.0in;mso-layout-grid-align:none;
text-autospace:none"><o:p></o:p>
<p class="MsoNormal" style="margin-left:1.0in;mso-layout-grid-align:none;
text-autospace:none">Finally,
the decoded bits are verified by the error checking function. If the transmitted
CRC is different from the local CRC generated using the received bit stream,
the frame has errors. The function of error checking is in <span style="mso-bidi-font-size:10.0pt;font-family:"Courier New"">errorhnd.c</span>.
This file contains the function <span style="font-family:"Courier New"">errorchk(
). </span>Its purpose is to validate the CRC on the received slot.
This is done by comparing the CRC extracted from the slot with the CRC
generated from bits the received the slot. If they are the same the received
vocoder parameters are saved. Otherwise, the receiver will use the vocoder
parameters of the last CRC-valid frame as error mitigation.
<p><span style="font-size:7.5pt"><a href="#top">Back to Top</a></span><input type="button" value="go back" onclick="history.go(-1)">
<div class="MsoNormal" style="text-align:center">
<center>
<hr size="3" width="100%" align="center"></center>
</div>
<div style="margin-right:1.0in;margin-left:1.0in"><span style="font-size:
13.5pt;color:blue"><b>Project
procedures</b></span></div>
<p style="margin-right:1.0in;margin-left:1.0in">This project is served
as an example for many other potential DSP project. It can also be extended
further to make the project even more challenge.
<p style="margin-right:1.0in;margin-left:1.0in">Suggestions:
<p style="margin-right:1.0in;margin-left:1.5in;text-indent:-.25in;mso-list:
l2 level1 lfo4;tab-stops:list .5in">1.<span style="font:7.0pt "Times New Roman""></span>Use
TMS320C55x C compiler and CCS to build and run the example code.
<p style="margin-right:1.0in;margin-left:1.5in;text-indent:-.25in;mso-list:
l2 level1 lfo4;tab-stops:list .5in">2.<span style="font:7.0pt "Times New Roman""></span>Display
the encoder and decoder抯 constellation points, see Figure E9-6.
<p style="margin-right:1.0in;margin-left:1.5in;text-indent:-.25in;mso-list:
l2 level1 lfo4;tab-stops:list .5in">3.<span style="font:7.0pt "Times New Roman""></span>Change
vehicle speed and SNR, plot the bits error rate (BER) curves, see Figure
E9-7.
<p style="margin-right:1.0in;margin-left:1.5in;text-indent:-.25in;mso-list:
l2 level1 lfo4;tab-stops:list .5in">4.<span style="font:7.0pt "Times New Roman""></span>Profile
entire system and each functions of the system. Identify the critical run-time
functions.
<p style="margin-right:1.0in;margin-left:1.5in;text-indent:-.25in;mso-list:
l2 level1 lfo4;tab-stops:list .5in">5.<span style="font:7.0pt "Times New Roman""></span>Examine
those high MIP functions and modify the C code to optimize the run-time.
<p style="margin-right:1.0in;margin-left:1.5in;text-indent:-.25in;mso-list:
l2 level1 lfo4;tab-stops:list .5in">6.<span style="font:7.0pt "Times New Roman""></span>Replace
those high MIP functions with assembly routines, be sure to take the C55x
architecture advantages, such as the dual-MAC and one filter coefficient
and dual data access capabilities.
<p style="margin-right:1.0in;margin-left:1.5in;text-indent:-.25in;mso-list:
l2 level1 lfo4;tab-stops:list .5in">7.<span style="font:7.0pt "Times New Roman""></span>Re-profile
the system and compare the run-time improvement over the C code.
<p style="margin-right:1.0in;margin-left:1.0in">Challenge: the C function <span style="font-family:"Courier New"">printf(
)</span> has been used in this project. By profiling the <span style="font-family:"Courier New"">printf(
)</span> function, it takes a lot of cycles. One way to minimize the the
run-time hit is to replace the <span style="font-family:"Courier New"">printf(
)</span> function with the DSP BIOS function. Modify the code to use Texas
Instruments抯 DSP BIOS fuctiuons.
<center>
<p><!--[if gte vml 1]><v:shape
id="_x0000_i1034" type="#_x0000_t75" style='width:264pt;height:209.25pt'>
<v:imagedata src="" o:title="screen2"/>
</v:shape><![endif]--><img SRC="image013.jpg" BORDER=0 v:shapes="_x0000_i1034" height=280 width=352><span style="mso-spacerun: yes"></span>
<p>(a) Phase distortion
<p><!--[if gte vml 1]><v:shape
id="_x0000_i1035" type="#_x0000_t75" style='width:263.25pt;height:208.5pt'>
<v:imagedata src="" o:title="screen1"/>
</v:shape><![endif]--><img SRC="image015.jpg" BORDER=0 v:shapes="_x0000_i1035" height=278 width=351>
<p>(b) Amplitude and phase distortion
<p>Figure E9-6 Fading effects to the received symbols.</center>
<p style="margin-right:1.0in;margin-left:1.0in">The encoded symbols are
displayed on the top left window of the CCS while the received symbols
are showing on the top right window. These two CCS graphics show different
phasors effort due to the channel fading.
<center>
<p><!--[if gte vml 1]><v:shape
id="_x0000_i1036" type="#_x0000_t75" style='width:284.25pt;height:214.5pt'>
<v:imagedata src="" o:title="3mph"/>
</v:shape><![endif]--><img SRC="image017.jpg" BORDER=0 v:shapes="_x0000_i1036" height=285 width=379>
<p>(a)<span style="font:7.0pt "Times New Roman""></span>BER plot
at 3 mph speed (walk)
<p><!--[if gte vml 1]><v:shape
id="_x0000_i1037" type="#_x0000_t75" style='width:284.25pt;height:213pt'>
<v:imagedata src="" o:title="45mph"/>
</v:shape><![endif]--><img SRC="image019.jpg" BORDER=0 v:shapes="_x0000_i1037" height=284 width=379>
<p>(b)<span style="font:7.0pt "Times New Roman""></span>BER plot
at 45 mph speed (urban road)
<p><!--[if gte vml 1]><v:shape
id="_x0000_i1038" type="#_x0000_t75" style='width:284.25pt;height:213.75pt'>
<v:imagedata src="" o:title="65mph"/>
</v:shape><![endif]--><img SRC="image021.jpg" BORDER=0 v:shapes="_x0000_i1038" height=285 width=379>
<p>(c)<span style="font:7.0pt "Times New Roman""></span>BER at
65 mph speed (highway)
<p><o:p></o:p>
<p>Figure E9-7 Bit error rate plots at different speed</center>
<p style="margin-right:1.0in;margin-left:1.0in"><o:p></o:p>
<p><span style="font-size:7.5pt"><a href="#top">Back to Top</a></span><input type="button" value="go back" onclick="history.go(-1)">
<div class="MsoNormal" style="text-align:center">
<center>
<hr size="3" width="100%" align="center"></center>
</div>
<span style="font-size:7.5pt"><i><u>copyright © 2001 by Sen M. Kuo
and Bob H. Lee</u></i>
<br><i><u>website last updated July 13, 2001 </u></i></span><o:p></o:p>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -