Upload
jeffreyberida
View
218
Download
0
Embed Size (px)
Citation preview
8/9/2019 766-10n.ppt
1/19
Winter 2005 ECE 766Computer Interfacing and
110 -
Error DetectionError Detection
Data transmission can contain errors ingle!"it
#urst errors of lengt$ n
%n& distance "et'een t$e first and last errors in data
"loc()
*o' to detect errors
If onl+ data is transmitted, errors cannot "e detected
end more information 'it$ data t$at satisfies aspecial relations$ip
-dd redundanc+
8/9/2019 766-10n.ppt
2/19
Winter 2005 ECE 766Computer Interfacing and
210 -
Error Detection MethodsError Detection Methods
Vertical Redundancy Check (VRC)
-ppend a single "it at t$e end of data "loc(
suc$ t$at t$e num"er of ones is e.en
E.en Parit+ %odd parit+ is similar)011001101100110
011000101100011
/C is also (no'n as Parity Check
Performance&
Detects all odd!num"er errors in a data "loc(
8/9/2019 766-10n.ppt
3/19
Winter 2005 ECE 766Computer Interfacing and
10 -
Error Detection MethodsError Detection Methods
Longitudinal Redundancy Check (LRC)
rgani3e data into a ta"le and create a parit+
for eac$ column
11100111 11011101 00111001 10101001
11100111
11011101
00111001
10101001
10101010
11100111 11011101 00111001 10101001 10101010
riginal Data 4C
8/9/2019 766-10n.ppt
4/19
Winter 2005 ECE 766Computer Interfacing and
10 -
Error Detection MethodsError Detection Methods
Performance& Detects all "urst errors up to lengt$ n
%num"er of columns)
isses "urst errors of lengt$ n1 if t$ere are n!1
unin.erted "its "et'een t$e first and last "it If t$e "loc( is "adl+ gar"led, t$e pro"a"ilit+ of
acceptance is
Checksum
8sed "+ upper la+er protocols
imilar to 4C, uses one9s complementarit$metic
( )n2
1
8/9/2019 766-10n.ppt
5/19
Winter 2005 ECE 766Computer Interfacing and
510 -
Cyclic Redundancy CheckCyclic Redundancy Check
Po'erful error detection sc$eme
at$er t$an addition, "inar+ di.ision is
used:inite -lge"ra ;$eor+ %
8/9/2019 766-10n.ppt
6/19
Winter 2005 ECE 766Computer Interfacing and
610 -
Cyclic Redundancy CheckCyclic Redundancy Check
4et us assume kmessage "its andn"its of redundanc+
-ssociate "its 'it$ coefficients of a
pol+nomial
1 0 1 1 0 1 1
1>60>51>1>10>21>1? >6>>1>1
>>>>>>>>>> ++++
( "its n "its
#loc( of lengt$ (n
8/9/2019 766-10n.ppt
7/19
Winter 2005 ECE 766Computer Interfacing and
710 -
Cyclic Redundancy CheckCyclic Redundancy Check
4et %>) "e t$e message olynomial
4et P%>) "e t$e generator olynomial
P%>) is fi>ed for a gi.en CC sc$eme
P%>) is (no'n "ot$ "+ sender and recei.er
Create a "loc( pol+nomial :%>) "ased on
%>) and P%>) suc$ t$at :%>) is di.isi"le "+
P%>)
)(
0)(
)(
)(
xPxQ
xP
xF+=
8/9/2019 766-10n.ppt
8/19
Winter 2005 ECE 766Computer Interfacing and
@10 -
Cyclic Redundancy CheckCyclic Redundancy Check
ending
1A ultipl+ %>) "+ >n
2A Di.ide >n%>) "+ P%>)
A Ignore t$e Buotient and (eep t$e reminder C%>)A :orm and send :%>) ? >n%>)C%>)
ecei.ing
1A ecei.e :9%>)2A Di.ide :9%>) "+ P%>)
A -ccept if remainder is 0, reect ot$er'ise
8/9/2019 766-10n.ppt
9/19
Winter 2005 ECE 766Computer Interfacing and
10 -
Proo! o! CRC "enerationProo! o! CRC "eneration
)(
)()(
)(
)()(
)(
)()(
)()()()(
)(remainder,
)(
)()(
)(bydivisibleis)()(thatProve
xP
xCxC
xP
xQxP
xP
xCxMx
xCxQxPxMx
xC
xQ
xMxxP
xPxCxMx
n
n
n
n
++=
+
+=
+
emainder 0 emainder 0
#ote$ %inary modular addition is e&ui'alent to
inary modular sutraction C()*C()+0
8/9/2019 766-10n.ppt
10/19
Winter 2005 ECE 766Computer Interfacing and
1010 -
EamleEamle
end %>) ? 110011>5>>1 %6 "its) P%>) ? 11001>>11 %5 "its, n ? ) "its of redundanc+
:orm >n%>)110011 0000>D>@>5>
Di.ide >n%>) "+ P%>) to find C%>)
100001
1001
11001
10000
11001
110011000011001
? C%>)
end t$e "loc( 110011 1001
ecei.e
00000
11001
11001
11001
110011100111001
o remainder
-ccept
8/9/2019 766-10n.ppt
11/19
Winter 2005 ECE 766Computer Interfacing and
1110 -
Proerties o! CRCProerties o! CRC
ent :%>), "ut recei.ed :9%>) ? :%>)E%>)
W$en 'ill E%>)FP%>) $a.e no remainder,
iAeA, '$en does CC fail to catc$ an errorG
1, ingle %it ErrorE%>) ? >i
If P%>) $as t'o or more terms, P%>) 'ill not di.ide E%>)
., . /solated ingle %it Errors%dou"le errors)E%>) ? >i>C, iH
E%>) ? >C%>i!C1)Pro.ided t$at P%>) is not di.isi"le "+ >, a sufficientcondition to detect all dou"le errors is t$at P%>) doesnot di.ide %>t1) for an+ t up to i! %iAeA, "loc( lengt$)
8/9/2019 766-10n.ppt
12/19
Winter 2005 ECE 766Computer Interfacing and
1210 -
Proerties o! CRCProerties o! CRC
, dd #umer o! %it ErrorsIf >1 is a factor of P%>), all odd num"er of "it errorsare detected
Proo!$-ssume an odd num"er of errors $as >1 as a factorA;$en E%>) ? %>1);%>)AE.aluate E%>) for > ? 1E%>) ? E%1) ? 1 since t$ere are odd num"er of terms
%>1) ? %11) ? 0 %>1);%>) ? %11);%1) ? 0E%>) %>1);%>)
8/9/2019 766-10n.ppt
13/19
Winter 2005 ECE 766Computer Interfacing and
110 -
Proerties o! CRCProerties o! CRC
2, hort %urst Errors%4engt$ t J n, num"er of redundant "its)E%>) ? >%>t!1K1)4engt$ t, starting at "it position If P%>) $as an >0term and t J n, P%>) 'ill not di.ide E%>)
-ll errors up to lengt$ n are detected3, Long %urst Errors %4engt$ t ? n1)
8ndetecta"le onl+ if "urst error is t$e same as P%>)P%>) ? >n K 1 n!1 "its "et'een >nand >0E%>) ? 1 K 1 must matc$
Pro"a"ilit+ of not detecting t$e error is 2!%n!1)4, Longer %urst Errors%4engt$ t H n1)
Pro"a"ilit+ of not detecting t$e error is 2!n
8/9/2019 766-10n.ppt
14/19
Winter 2005 ECE 766Computer Interfacing and
110 -
Proerties o! CRCProerties o! CRC
E>ample& CC!12 ? >12>11>>2>1
CC!16 ? >16>15>21
CC!CCI;;? >16>12>51 CC!16 and CC!CCI;; catc$ all
ingle and dou"le errors
dd num"er of "it errors
#ursts of lengt$ 16 or less
A7L of 17!"it error "ursts
A@L of 1@!"it and longer error "ursts
8/9/2019 766-10n.ppt
15/19
Winter 2005 ECE 766Computer Interfacing and
1510 -
5ard6are /mlementation5ard6are /mlementation
8sual practice&-fter ta(ing ( data "its, n 0s are padded to t$e
stream, t$en di.ided "+ t$e generator
-im& Introduce t$e last n "its of 0s 'it$out reBuiring n e>tra
s$ifts
Eliminate t$e need to 'ait for all data to enter t$es+stem to start generating CC
-pproac$& t n "its of message as all 0s
Correct t$e guess as t$e actual "its arri.e
8/9/2019 766-10n.ppt
16/19
Winter 2005 ECE 766Computer Interfacing and
1610 -
5ard6are /mlementation5ard6are /mlementation
essage ? 1011011 ( ? 7P%>) ? 1101 ? >1>2>0 n ?
1100101
0101101110000001100
1011
110100000111
00000011
11011100
110100010110111101
Con'entional
Method$
1100101
010110111000100
000001000101
10110010
0001000010001001
00000110
1110110110101010
11011000
00000000001101Circuit$
1
0
1
1
0
1
1
6essage
8/9/2019 766-10n.ppt
17/19
Winter 2005 ECE 766Computer Interfacing and
1710 -
5ard6are /mlementation5ard6are /mlementation
Data
Input
>erial Muotient %M)
2 1 0>0>
2
7ransmit$Data
1
0
1
1
0
1
1
M
1
1
0
0
1
0
1
#it 2
0
1
1
1
1
1
0
0
#it 1
0
0
1
1
0
0
1
0
#it 0
0
1
1
0
0
1
0
1
6essa
ge
4#
#
CCend # first( s$ifts later, CC is in register
$ift out %'it$out an+ =) in n s$ifts
8/9/2019 766-10n.ppt
18/19
Winter 2005 ECE 766Computer Interfacing and
1@10 -
5ard6are /mlementation5ard6are /mlementation
Data
Input
>erial Muotient %M)
2 1 0>0>
2
Recei'e$Data
1
0
1
1
0
1
1
0
0
1
M
1
1
0
0
1
0
1
0
0
0
#it 2
0
1
1
1
1
1
0
0
0
1
0
#it 1
0
0
1
1
0
0
1
0
1
0
0
#it 0
0
1
1
0
0
1
0
1
0
0
0
6essa
ge
4#
#
n( s$ifts later, remainder is 0
Data acceptedC0C
4#
#
8/9/2019 766-10n.ppt
19/19
Winter 2005 ECE 766Computer Interfacing and
110 -
5ard6are /mlementation5ard6are /mlementation
Data ut
8
8
Data In
2
8
8
>
2
1 0
>0
Data N
Control 4ine -&1& a(eF;est CC
0& $ift ut CC
:or ;ransmitting&
-ssert 8true '$ile feeding ( "its of message
-ssert 8false for n cloc( c+cles to output CC
:or ecei.ing&
-ssert 8true '$ile feeding (n "its of message and CC
Ignore Data ut, c$ec( Data 9for correctness