You are on page 1of 35

UNIVERZITET U NIU

ELEKTRONSKI FAKULTET
KATEDRA ZA ELEKTRONIKU
HAMINGOV KODER/DEKODER
Student:
Sran Vujae!"# $$%&%
N"' jun &(()*
Sadraj:
$* U!+d ********************************************************************************************************** ,
&* Ha-"n.+!+ /+d"ranje********************************************************************************* %
&*$* 0+ja- Ha-"n.+!e d"1tan2e*************************************************************** %
&*&* 0+ja- 1"ndr+- re3"**************************************************************************** 4
&*,* Ha-"n.+! /5d*********************************************************************************** )
,* Rea6"7a2"ja Ha-"n.+!+. /+der/de/+der u VHDL8u ***************************** 9
,*$* Ha-"n.+! /+der ************************************************************************* $(
,*&* Ha-"n.+! de/+der ************************************************************************* $$
%* VHDL /+d te1t :en2;8a <r+2e1+ra " <r"/a7 re7u6tata 1"-u6a2"je **************$,
4* S"nte7a " "-<6e-enta2"ja ************************************************************************** $=
4*$* S"nte7a ******************************************************************************************* $=
4*&* I-<6e-enta2"ja ****************************************************************************** &$
)* Zadata/ **************************************************************************************************** &)
=* La:+rat+r"j1/a !e>:a ******************************************************************************** &?
?* L"teratura******* ******************************************************************************************* ,4
&
1. UVOD
S!a/" <ut /ada 1e "n@+r-a2"ja <ren+1" /r+7 ne/" /ana6' -+>e d+#" d+ .re/e u
<ren+1u u16ed u-a* U1t!ar"' 3a/ " /ada je "n@+r-a2"ja 1-etena u ne/+j /+-<+nent" 7a
1/6ad"tenje <+data/a A-e-+r"j"B' -+>e 1e +tet"t"' jer n" jedan ;ard!er n"je a<1+6utn+
1".uran* O!+ 1e nara!n+ ne +dn+1" 1a-+ na /+-<juter1/e "n@+r-a2"je* G6a1 /ada 1e
<ren+1" /r+7 !a7du; -+>e 1e "1/!ar"t" u16ed !etra' u-a' !"1+/e te-<erature***Zat+ !r6+ je
7na3ajna -+.u#n+1t +t/r"!anja " /+re/2"je .rea/a unutar jedn+. 1"1te-a*

U +<te- 16u3aju <+1t+je d!a <r"1tu<a:

$* Kontrola greke unapred' u /+-e 1!a/" /ara/ter "6" :6+/ <+data/a /+j" 1e a6je 1adr>"
d+datne AredundatneB "n@+r-a2"je* Na +1n+!u +!"; "n@+r-a2"ja <r"-a6a2 -+>e ne 1a-+ da
+t/r"je <+1t+janje .re/e' !e# " da +dred" /+j" 1u :"t+!" u <r"-6jen+- <+dat/u <+.ren" "
da .re/u u/6+n" ne.a2"j+- <+.ren"; :"t+!a*
&* Kontrola greke unazad' +dn+1n+ /+ntr+6a 1a <+!ratn+- 1<re.+-* U +!+- 16u3aju
1!a/" /ara/ter "6" :6+/ <+data/a /+j" 1e a6je 1adr>" 1a-+ ne+<;+dne d+datne "n@+r-a2"je
/+je +-+.u2uju <r"-a+2u da +t/r"je <r"1u1t!+ .re/e' a6" ne " -e1t+ na /+-e 1e +na
na6a7"* U t+- 16u2aju jed"n" na2"n 7a d+:"janje /+re/tn"; <+data/a je <+na!6janje <ren+1a
1!"; /ara/tera "6" :6+/+!a <+data/a /+j" "-aju .re/u*
U <ra/1"' :r+j d+datn"; :"t+!a :r7+ ra1te 1a <+ra1t+- du>"ne <+data/a /+j" 1e <ren+1e*
0+16ed"2a t+.a je:
$* Met+d 1a /+ntr+6+- .re/e una7ad je naj2eC /+r"1t" u te6e/+-un"/a2+n+- <ren+1u
<+data/a*
&* Met+d 1a /+ntr+6+- .re/e una<red 1e 3e#e /+r"1t" <r" 3u!anju <+data/a na
-e-+r"j1/"- -ed"ju-"-a u ra3unar1/+- 1"1te-u*
t+ 1e t"3e -et+da 7a +t/r"!anje .rea/a' @a/t+r" +d /+j"; 7a!"1" "7:+r -et+de:
$* Dr+ja :"t+!a 1a .re/+- Aen.* :"t err+r rate' DERB na /+-un"/a2"+n+j 6"n"j"* DER
<red1ta!6ja !er+!atn+#u u de@"n"1an+- !re-en1/+- "nter!a6u da jedan :"t "-a .re/u*
Ta/+ DERE$(8% 7na3" da' u <r+1e/u' $ +d $(((( :"ta "-a .re/u u de@"n"1an+-
!re-en1/+- "nter!a6u* Za naj!e#" :r+j -re>a DER je +/+ $(8% ' d+/ je unutar
ra3unar1/+. 1"1te-a +:"3n+ !redn+1t 7a DER $(8%"6" -anje*
&* T"<a .re/e' tj* da 6" 1e .re/a ja!"6a na <+jed"na3n+- :"tu "6" na .ru<" u7a1t+<n";
:"t+!a* U <+16ednje- 16u3aju re3 je + <r+"ren+j Ae/1<6+7"!n+jB .re2" Aen.* :ur1t err+rB*
,
2. Hamingovo kodiranje
2.1. Pojam Hamingove distance
F Ha-"n.+!a d"1tan2a AHDB
8 :r+j :"t+!a u /+j"-a 1e d!e d"."ta6ne re3" ra76"/uju
HDA $($' $(( B E $
HDA $$$' ((( B E ,
F K5dna d"1tan2a AD
-"n
B
8 -"n"-a6na Ha-"n.+!a d"1tan2a "7-eu d!e :"6+ /+je re3"
I6u1tra2"ja /5dne d"1tan2e:

000
001
101
100
111
110
011
010
Dete/2"ja .re/e
F K5d -+>e dete/t+!at" d+ d :"t+!a .re/e a/+ je -"n"-a6na d"1tan2a /5da

D
-"n
G d H $
K+re/2"ja .re/e
%
F K5d -+>e /+re/t+!at" d+ c :"t+!a .re/e a/+ je -"n"-a6na d"1tan2a /5da
D
-"n
G &c H $
K+d+!" <arn+1t"
F <arna <arn+1t
u/u<an :r+j jed"n"2a u /+dn+j re3" je <aran:
8 ($$($$( $
8 ((($($$ (
F ne<arna <arn+1t
u/u<an :r+j jed"n"2a u /+dn+j re3" je ne<aran:
8 ($$($$( (
8 ((($($$ $
2.2. Pojam sindrom rei
S"ndr+- re3 1e d+:"ja <+reenje- d!e K8:"tne !redn+1t" :"t <+ :"t u7"-anje-
e/16u7"!ne d"1jun/2"je* S"nd+r- re3 je ne+7na3en 2e+ :r+j du>"ne K /+j" "-a !redn+1t K
"7-edju ( " &
K
8$*
Vredn+1t ( +7na3a!a da ne-a .rea/a u 7a<"1u' d+/ +1ta6"; &
K
8$ !redn+1t" +dreuju
-e1t+ .re/e' u 16u3aju da .re/a <+1t+j"* Ka/+ .re/a -+>e da 1e ja!" na :"6+ /+- +d M
:"t+!a <+dat/a " K :"t+!a /+j" 1e /+r"1te u <r+!er"' -+ra da !a>" &
K
8$ G MHK* Na +1n+!u
+!e nejedna/+1t" -+>e-+ da +dred"-+ <+tre:an :r+j :"t+!a /a+ @un/2"ju du>"ne re3" 7a
/+ju 1e !r" <r+!era*
Ie6ja je da .ener"1ana 1"ndr+- re2 "-a 16ede2e /ara/ter"1t"/e:
J A/+ 1u 1!" :"t+!" u nj+j ( tada n"je +t/r"!ena n"/a/!a .re/a*
J A/+ u re3" <+1t+j" ta3n+ jedna $' tada .re/a <+1t+j" u jedn+- +d % :"ta 7a <r+!eru' d+/
je 7a<"1 <+dat/a u redu " ne 7a;te!a n"/a!u /+re/2"ju*
J A/+ 1"ndr+- 1adr>" !"e +d jedn+. :"ta /+j" "-a !redn+1t $' tada !redn+1t 1"ndr+- re3"
<+1-atrane /a+ 2e+ ne+7na3en :r+j +dreuje <+7"2"ju na /+j+j 1e na6a7" .re/a* K+re/2"ja
1e 1a1t+j" u /+-<6e-ent"ranju !redn+1t" +d.+!araju#e. :"ta <+dat/a*
Da :" +!e /ara/ter"1t"/e " +1t!ar"6" ured"-+ :"t+!e <+dat/a " :"t+!e 7a <r+!eru u re3
du>"ne $& :"ta na na3"n <r"/a7an u ta:e6":
4

0+7"2"je :"t+!a <+data/a " :"t+!a 7a <r+!eru
K
$
E M
$

M
&

M
%

M
4

M
=
K
&
E M
$

M
,

M
%

M
)

M
=
K
,
E M
&

M
,

M
%

M
?
K
%
E M
4

M
)

M
=

M
?
.de


+7na3a!a +<era2"ju e/1/6u7"!ne d"1jun/2"je*
2.3. Hamingov kd
K+d+!" 7a /+re/2"ju .rea/a /+r"1te !"e1tru/e parity :"t+!e /+j" 1u 1-eten" 1a
:"t+!"-a <+data/a* S!a/" :"t <r+!ere je parity :"t .ru<e :"t+!a u <+ru2"* 0r"6"/+- 3"tanja
<r"-njene <+ru/e <r+!era!aju 1e 1!" parity :"t+!" " a/+ 1u 1!" uredu' 7na3" da n"je d+6+
d+ .re/e u <renet+j <+ru2"* Meut"- a/+ je jedan "6" !"e parity :"t+!a ne"1<ra!n+' -+>e
1e ut!rd"t" /+j" je +d :"t+!a <+.rean* Ledn+1tru/a .re/a na1taje /ada je !redn+1t jedn+.
:"ta u <+ru2" <r+-enjena 1a $ na ( "6" 1a ( na $* A/+ je ut!ren <+.rean :"t' -+>e :"t"
6a/+ /+r".+!an /+-<6e-ent"ranje- nje.+!e !redn+1t"* Ledan +d naj3e#e /+r"#en";
/+d+!a 1a /+re/2"j+- .re/e u RAM -e-+r"ja-a je Ha-"n.+! /+d* G6a!ne +d6"/e
Ha-"n.+!+. /+da 1u:
8 Dete/2"ja .re/e je jedn+1ta!na Ad+da!anje- parity :"t+!aB
8 K+re/2"ja .re/e je /+-<6e/1na " 7a;te!a Ha-"n.+! /5d 1a !"e parity :"t+!a
U Ha-"n.+!+- /+du' < 8 parity :"t+!a je d+dat+ na - 8 :"t+!a u <+ru2"' ta/+ da
"-a-+ n+!+na1ta6u /+dnu re3 +n -H< 8 :"t+!a* D"t1/e <+7"2"je 1u nu-er"1ane u 1e/!en2"
+d $ d+ -H<* S!e <+7"2"je u re3"' 3"j" je :r+j 1te<ena & A<+7"2"je $'&'%'?'***B /+r"1te 1e 7a
parity :"t+!e* O1ta6e <+7"2"je 1u na-enjene 7a :"t+!e +r"."na6ne <+ru/e* I7.6ed /+d+!ane
<+ru/e' 7a +r"."na6nu <+ru/u +d ?8:"t+!a:

d
=
d
)
d
4
<
,
d
,
d
&
d
$
d
%
<
&
d
(
<
$
<
(
)
<+7"2"je: $& $
V"d"-+ da je +r"."na6n+j ?8:"tn+j <+ru2" d+dat+ % parity :"ta ta/+ da 1ad 1e/!en2a "-a $&
:"t+!a*
0r"6"/+- "7:+ra :r+ja parity :"t+!a -+ra :"t" 7ad+!+6jena 16ede#a re6a2"ja:
&
-
G -H<H$
na <r"-er: 7a ?8:"tnu <+ru/u <+ru/a <+tre:na 1u na- % parity :"ta' ta/+ da #e <+data/
/+j" <ren+1"-+ 1adr>at" u/u<n+ $& :"t+!a*
8 parity :"t+!" 1u $'&'%'?' *** A0$'0&'0,'0%B
, E $H&
4 E $H%
) E &H% 0$ <r+!era!a :"t+!e ,' 4' =' 9' $$
= E $H&H% 0& <r+!era!a :"t+!e ,')'='$('$$
9 E $H? 0% <r+!era!a :"t+!e 4')'='$&
$( E&H? 0? <r+!era!a :"t+!e 9'$('$$'$&
$$ E $H&H?
$& E %H?
Ta/+ da !redn+1t" 0$'0&'0% " 0? ra3una-+ /a+:
0$ E MOR nad :"t+!"-a A,'4'='9'$$B
0& E MOR nad :"t+!"-a A,')'='$('$$B
0% E MOR nad :"t+!"-a A4')'='$&B
0? E MOR nad :"t+!"-a A9'$('$$'$&B
K+r"#ena e/1/6u7"!na OR +<era2"ja u1t!ar" !r" ne<arnu @un/2"ju* Ona je jedna/a $
/ada "-a-+ ne<aran :r+j jed"n"2a "7-eu <+1-atran"; <r+-enj"!";' a jedna/a ( /ada
"-a-+ <aran :r+j jed"n"2a* T+ na- +:e7:euje da je :r+j jed"n"2a na <r+!era!an"-
<+7"2"ja-a u/6ju3uju#" " :"t+!e <arn+1t"' u!e/ <aran*
Na -e1tu <r"je-a /+-<+7"tna re3 +d $& :"t+!a 1e <+n+!+ <r+!era!a na .re/u*
0arn+1t re3" 1e <r+!era!a nad "1t"- .ru<a-a :"t+!a u re3" u/6ju3uju#" " :"t+!e <arn+1t"*
Ta/+ da #e -+ 1ad "-at" 3et"r" :"ta <r+!ere:
K$ E MOR nad :"t+!"-a A$','4'='9'$$B
K& E MOR nad :"t+!"-a A&',')'='$('$$B
K% E MOR nad :"t+!"-a A%'4')'='$&B
K? E MOR nad :"t+!"-a A?'9'$('$$'$&B
D+:"jena !redn+1t ( 7a <r+!erene :"t+!e u/a7uje na <arnu <arn+1t' a d+:"jena !redn+1t
$ na ne<arnu <arn+1t* 0+t+ 1u :"t+!" 7a<"1an" 1a <arn+- <arn+1t"' re7u6tat
KEK?K%K&K$E((((' u/a7uje da n"je d+6+ d+ .re/e <r" <ren+1u* U+<ten+' 7a KN(' %8
:"tn" :"narn" :r+j u/a7uje na <+7"2"ju :"ta .de je na1ta6a .re/a' a/+ 1e rad" + jedn+1tru/+j
=
.re2"* Ta/+ re2"-+ a/+ d+:"je-+ da je KE($($' 7na3" da je d+6+ d+ .re/e u <et+- :"tu
" taj :"t tre:a /+-<6e-ent"rat"*
Ha-"n.+! /+d 1e -+>e /+r"1t"t" 7a /+dnu re3 <r+"7!+6jne du>"ne* Genera6n+ 7a < 8
parity :"t+!a " +r"."na6nu re3 +d - 8 :"t+!a "-a-+ u/u<n+ <H- :"t+!a /+j" -+.u :"t"
/+d+!an" 1a &
/
8$ :"t+!a* Gru<e :"t+!a 7a .ener"1anje parity :"t+!a " :"t+!a <r+!ere na
<r"je-u +dreuju 1e "7 6"1te :"narn"; :r+je!a "7 6"1te +d $ d+ &
/
8$* S!a/a .ru<a :"t+!a
<+3"nje 1a :r+je- /+j" je 1te<ena &' na <r"-er $'&'%'?'$) "td* O!" :r+je!" 1u ta/+e "
<+7"2"je parity :"t+!a*
O1n+!n" Ha-"n. /+d -+>e dete/t+!at" " /+r".+!at" .re/e u 1a-+ jedn+- :"tu*
U<+tre:+- d+datn"; parity :"t+!a -+.u 1e /+r".+!at" jedn+1tru/e .re/e " dete/t+!at"
d!+1tru/e* a/+ <+1-atra-+ /+d"ranu $&8:"tnu re3 " d+da-+ j+ jedan parity :"t* A/+
re2"-+ "-a-+ re3 (($$$(($($((0
$,
' .de je 0
$,
re7u6tat e/1/6u7"!ne OR +<era2"je nad
+1ta6"; $& :"t+!a* O!a/+ na1taje $,8:"tna /+dna re3 (($$$(($($(($ A<arna <arn+1tB* Na
<r"je-u 1e na6a7e :"t+!" <r+!ere " parity :"t 0 7a 1!"; $, :"t+!a /+dne re3"* A/+ je 0E(
7na3" da je <arn+1t /+re/tna A<arna <arn+1tB' a6" a/+ je 0E$' <arn+1t nad 1!"; $, :"t+!a je
ne/+re/tna Ane<arna <arn+1tB* I7 +!+.a <r+"7"6a7e 16ede#e 3et"r" 1"tua2"je:
8 a/+ je K E ( " 0 E ( n"je <r"1utna .re/a
8 a/+ je K N ( " 0 E $ dete/t+!ana je jedn+1tru/a .re/a /+ja -+>e :"t" /+r".+!ana
8 a/+ je K N ( " 0 E ( dete/t+!ana je d!+1tru/a .re/a /+ja ne -+>e :"t" /+r".+!ana
8 a/+ je K E ( " 0E$ .re/a je na1ta6a u 0
$,
:"tu

Rea6"7a2"ja Ha-"n.+!+. /+dera/de/+dera
Na 16"2" $* <r"/a7ana je +<ta :6+/ e-a 1"1te-a 1a Ha-"n.+!"- /+d"ranje- "-a
16ede#" "7.6ed:
enerator
koda
!atc"
!atc"
!atc"
Po#$dni
generator
Po#$dni
generator
!atc" !atc"
m m m m % % & &
'orektor
()ok *a
&rover$
m%&
Dekoder
m m m
&
2
&
m
m
%
%
&
&
Ha--"n.+! en/+der
U6a7na 1e/!en2a
+d - :"t+!a
0+7"2"ja
.re/e
0ren+1n"
/ana6
F6a.
.re/e
D!+1tru/a
.re/a
I76a7na 1e/!en2a
+d - :"t+!a
Ha--"n.+! de/+der
Serijski
$
&ara)e)ni
Para)e)ni
$
serijski
Slika 1. Opta blok ema sistema sa Hamingovim kodiranjem
?
U /+6u Ha-"n.+!+. /+dera na6a7" 1e :6+/ .enerat+r /+da /+j" na /+dnu re3 +d - 8
:"t+!a d+daje < 8 parity :"t+!a " /a+ <r+du/t na nje.+!+- "76a7u "-a-+ /+d+!anu /+dnu
re3 du>"ne -H< 8 :"t+!a* U <r"je-n"/u 1e u :6+/u 7a <r+!eru !r" <r+!era <r"-6jene
/+dne re3"' ta/+ t+ 1e na6a7e +d.+!araju#" :"t+!" <r+!ere <re-a !e# +<"1an+- <+1tu</u*
U/+6"/+ je <r"1utna .re/a u de/+deru 1e ut!ruje <+7"2"ja na /+j+j je d+6+ d+ .re/e* Na
/raju 1e u /+re/t+ru !r" "1<ra!/a :"ta .de je na1ta6a .re/a ta/+ t+ 1e !r" nje.+!+
/+-<6e-ent"ranje* K+6+ -+>e 1a-+ dete/t+!at" " /+r".+!at" .re/u na1ta6u u jedn+-
:"tu* A/+ d+e d+ .re/e u d!a :"ta' "76a7 d!+1tru/a .re/a <re6a7" u !"1+/+ 1tanje*
0ren+1 <+data/a /r+7 <ren+1n" /ana6 naj3e#e 1e !r" 1er"j1/"' ta/+ da <+t+ na "76a7u
Ha-"n.+!+. /+dera "-a-+ <ara6e6nu re3' a "1t+ ta/+ " na u6a7 Ha-"n.+!+. de/+dera
d+!+d"-+ <ara6e6nu re3* 0+tre:n+ je 7at+ na "76a7u "1/+n!ert+!at" <ara6e6nu "n@+r-a2"ju u
1er"j1/u " /a+ ta/!u je <renet" d+ Ha-"n.+!+. de/+dera " +<et je !rat"t" u <ara6e6n" +:6"/*
U nae- radu <ren+1n" /ana6 n"je :"+ <red-et rea6"7a2"je*
3. +ea)i*acija Hamingovog koder,dekoder $ VHD!-$
3.1. Hamingov koder
datain(7:0) hamout(11:0)
U1
hamenc
D6+/ ;a-en2 "-a jedan ?8:"tn" u6a7n" <+rt datain(7:! /+j" <red1ta!6ja u6a7ne <+dat/e
/+je tre:a /+d"rat" Ha--.+!"- /+d+-' " jedan $&8:"tn" "76a7 "amout(11:! /+j"
<red1ta!a6ja /+d+!anu u6a7nu /+dnu re3 A? :"t+!a <+ru/e " % parity :"taB* L"1t"n.
<r+.ra-a:
6":rarO IEEEP
u1e IEEE*STDQLOGIKQ$$)%*a66P
ENTITR ;a-en2 IS
0ORTAdata"n : IN 1tdQ6+."2Q!e2t+rA= d+Snt+ (BP 88d= d) d4 d% d, d& d$ d(
;a-+ut : OUT 1tdQ6+."2Q!e2t+rA$$ d+Snt+ (BBP 88d= d) d4 d% <, d, d& d$ <& d( <$
<(
END ;a-en2P
ARKHITEKTURE !er& OF ;a-en2 IS
SIGNAL <$' <&' <%' <? : 1tdQ6+."2P
DEGIN

<$ TE AAAdata"nA)B MOR data"nA%BB MOR data"nA,BB MOR data"nA$BB MOR data"nA(BP
<& TE AAAdata"nA)B MOR data"nA4BB MOR data"nA,BB MOR data"nA&BB MOR data"nA(BP
<% TE AAdata"nA=B MOR data"nA,BB MOR data"nA&BB MOR data"nA$BP
<? TE AAdata"nA=B MOR data"nA)BB MOR data"nA4BB MOR data"nA%BP

;a-+utA$$ d+Snt+ ( B TE data"nA= d+Snt+ %B U <? U data"nA, d+Snt+ $B U <% U
data"nA(B U <& U <$P
9
3.2. Hamingov dekoder
hamin(11:0) dataout(7:0)
error_flag
error_pos(3:0)
p
U1
hamdec
D6+/ Ha-"n.+!+. de/+dera "-a $&8:"tn" <+rt "amin(11:! /+j" <red1ta!6ja u6a7ne
<+dat/e /+d+!ane Ha-"n.+!"- /+d+-' ?8:"tn" "76a7 dataout(7:! /+j" <red1ta!6ja ?8:"tnu
+r"."na6nu "n@+r-a2"ju' %8:"tn" "76a7 error#pos($:! /+j" <+/a7uje na /+je- :"tu 1e ja!"6a
.re/a' "76a7n" <"n error#%lag /+j" na- 1".na6"7"ra da 6" je d+6+ d+ .re/e A V$V 8 na1ta6a
.re/a' V(V 8 ne-a .re/e B " "76a7n" <"n p /+j" na- 1".na6"7"ra da je d+6+ d+ d!+1tru/e
.re/e u /+du A V$V 8 na1ta6a .re/a' V(V 8 ne-a .re/e B* L"1t"n. /+da:
LIDRARR IEEEP
USE IEEE*1tdQ6+."2Q$$)%*a66P
USE IEEE*nu-er"2Q1td*a66P
USE IEEE*1tdQ6+."2Qar"t;*a66P
ENTITR ;a-de2 IS
0ORT A
;a-"n : IN 1tdQ6+."2Q!e2t+rA$$ DOWNTO (B P
data+ut : OUT 1tdQ6+."2Q!e2t+rA= DOWNTO (B P
err+rQ<+1 : OUT 1tdQ6+."2Q!e2t+rA, DOWNTO (B P
<: OUT 1tdQ6+."2P
err+rQ@6a. : OUT 1tdQ6+."2BP
END ;a-de2 P
ARKHITEKTURE ;a-de2 OF ;a-de2 IS
SIGNAL 2+rre2t : 1tdQ6+."2Q!e2t+rA, DOWNTO (BP
SIGNAL ;a-Qte-< : 1tdQ6+."2Q!e2t+r A$$ d+Snt+ (BP
SIGNAL err+rQ( : 1tdQ6+."2P
$(
DEGIN
<r+2e11A;a-"n'2+rre2tB
DEGIN
;a-Qte-<TE;a-"nP
2+rre2tA(B TE AAAAA;a-"nA(B X+r ;a-"nA&BB X+r ;a-"nA%BB X+r ;a-"nA)BB X+r ;a-"nA?BB X+r
;a-"nA$(BBP
2+rre2tA$B TE AAAAA;a-"nA$B X+r ;a-"nA&BB X+r ;a-"nA4BB X+r ;a-"nA)BB X+r ;a-"nA9BB X+r
;a-"nA$(BBP
2+rre2tA&B TE AAAA;a-"nA,B X+r ;a-"nA%BB X+r ;a-"nA4BB X+r ;a-"nA)BB X+r ;a-"nA$$BBP
2+rre2tA,B TE AAAA;a-"nA=B X+r ;a-"nA?BB X+r ;a-"nA9BB X+r ;a-"nA$(BB X+r ;a-"nA$$BBP
<TE ;a-"nA(B X+r ;a-"nA$B X+r ;a-"nA&B X+r ;a-"nA,B X+r ;a-"nA%B X+r ;a-"nA4B X+r'
;a-"nA)B X+r ;a-"nA=B X+r ;a-"nA?B X+r ;a-"nA$(B X+r ;a-"nA$$B X+r 2+rre2tA(B X+r'
2+rre2tA$B X+r 2+rre2tA&B X+r 2+rre2tA,BP
<TE ;a-"nA(B X+r ;a-"nA$B X+r ;a-"nA&B X+r ;a-"nA,B X+r ;a-"nA%B X+r ;a-"nA4B X+r
;a-"nA)B X+r ;a-"nA=B X+r ;a-"nA?B X+r ;a-"nA$(B X+r ;a-"nA$$B X+r 2+rre2tA(B X+r
2+rre2tA$B X+r 2+rre2tA&B X+r 2+rre2tA,BP
IF 2+rre2t E Y((((Y THEN
err+rQ<+1 TE Y((((YP
data+utA(B TE ;a-"nA&BP
data+utA$B TE ;a-"nA%BP
data+utA&B TE ;a-"nA4BP
data+utA,B TE ;a-"nA)BP
data+utA%B TE ;a-"nA?BP
data+utA4B TE ;a-"nA9BP
data+utA)B TE ;a-"nA$(BP
data+utA=B TE ;a-"nA$$BP
err+rQ@6a. TE V(VP
ELSIF 2+rre2t /E Y((((Y THEN
err+rQ<+1 TE 2+rre2tP
err+rQ@6a. TE V$VP
IF 2+rre2t E Y(($$Y THEN
data+utA(B TE NOT ;a-"nA&BP
data+utA$B TE ;a-"nA%BP
data+utA&B TE ;a-"nA4BP
data+utA,B TE ;a-"nA)BP
data+utA%B TE ;a-"nA?BP
data+utA4B TE ;a-"nA9BP
data+utA)B TE ;a-"nA$(BP
data+utA=B TE ;a-"nA$$BP
ELSIF 2+rre2t E Y($($Y THEN
data+utA(B TE ;a-"nA&BP
data+utA$B TE NOT ;a-"nA%BP
$$
data+utA&B TE ;a-"nA4BP
data+utA,B TE ;a-"nA)BP
data+utA%B TE ;a-"nA?BP
data+utA4B TE ;a-"nA9BP
data+utA)B TE ;a-"nA$(BP
data+utA=B TE ;a-"nA$$BP
ELSIF 2+rre2t E Y($$(Y THEN
data+utA(B TE ;a-"nA&BP
data+utA$B TE ;a-"nA%BP
data+utA&B TE NOT A;a-"nA4BBP
data+utA,B TE ;a-"nA)BP
data+utA%B TE ;a-"nA?BP
data+utA4B TE ;a-"nA9BP
data+utA)B TE ;a-"nA$(BP
data+utA=B TE ;a-"nA$$BP
ELSIF 2+rre2t E Y($$$Y THEN
data+utA(B TE ;a-"nA&BP
data+utA$B TE ;a-"nA%BP
data+utA&B TE ;a-"nA4BP
data+utA,B TE NOT A;a-"nA)BBP
data+utA%B TE ;a-"nA?BP
data+utA4B TE ;a-"nA9BP
data+utA)B TE ;a-"nA$(BP
data+utA=B TE ;a-"nA$$BP
ELSIF 2+rre2t E Y$(($Y THEN
data+utA(B TE ;a-"nA&BP
data+utA$B TE ;a-"nA%BP
data+utA&B TE ;a-"nA4BP
data+utA,B TE ;a-"nA)BP
data+utA%B TE NOT A;a-"nA?BBP
data+utA4B TE ;a-"nA9BP
data+utA)B TE ;a-"nA$(BP
data+utA=B TE ;a-"nA$$BP
ELSIF 2+rre2t E Y$($(Y THEN
data+utA(B TE ;a-"nA&BP
data+utA$B TE ;a-"nA%BP
data+utA&B TE ;a-"nA4BP
data+utA,B TE ;a-"nA)BP
data+utA%B TE ;a-"nA?BP
data+utA4B TE NOT A;a-"nA9BBP
data+utA)B TE ;a-"nA$(BP
data+utA=B TE ;a-"nA$$BP
ELSIF 2+rre2t E Y$($$Y THEN
data+utA(B TE ;a-"nA&BP
data+utA$B TE ;a-"nA%BP
data+utA&B TE ;a-"nA4BP
data+utA,B TE ;a-"nA)BP
data+utA%B TE ;a-"nA?BP
data+utA4B TE ;a-"nA9BP
data+utA)B TE NOT A;a-"nA$(BBP
$&
data+utA=B TE ;a-"nA$$BP
ELSE
data+utA(B TE ;a-"nA&BP
data+utA$B TE ;a-"nA%BP
data+utA&B TE ;a-"nA4BP
data+utA,B TE ;a-"nA)BP
data+utA%B TE ;a-"nA?BP
data+utA4B TE ;a-"nA9BP
data+utA)B TE ;a-"nA$(BP
data+utA=B TE NOT A;a-"nA$$BBP
END IF P
END IF P
END <r+2e11P
END ;a-de2P
.. VHD! kod test #enc"-a &rocesora i &rika* re*$)tata
sim$)acije
Naj<re #e :"t" dat 6"1t"n. /+da te1t:en2;8a 7a Ha-"n.+! /+der' a <+t+- " d+:"jen"
re7u6tat" 1"-u6a2"j+-*
6":rarO "eeeP
u1e "eee*1tdQ6+."2Q$$)%*a66P
ent"tO ;a-en2Qt: "1
end ;a-en2Qt:P
ar2;"te2ture TDQARKHITEKTURE +@ ;a-en2Qt: "1
2+-<+nent ;a-en2
<+rtA
data"n : "n 1tdQ6+."2Q!e2t+rA= d+Snt+ (BP
;a-+ut : +ut 1tdQ6+."2Q!e2t+rA( t+ $$B BP
end 2+-<+nentP
1".na6 data"n : 1tdQ6+."2Q!e2t+rA= d+Snt+ (BP
1".na6 ;a-+ut : 1tdQ6+."2Q!e2t+rA( t+ $$BP
:e."n
UUT : ;a-en2
<+rt -a< A
data"n EZ data"n'
;a-+ut EZ ;a-+ut
BP
88 Add O+ur 1t"-u6u1 ;ere ***
data"nTEY((($((((YP
end TDQARKHITEKTUREP
2+n@".urat"+n TESTDENKHQFORQ;a-en2 +@ ;a-en2Qt: "1
@+r TDQARKHITEKTURE
@+r UUT : ;a-en2
u1e ent"tO S+r/*;a-en2A!er&BP
end @+rP
$,
end @+rP
end TESTDENKHQFORQ;a-en2P
Da :" 1-+ te1t"ra6" /a/+ 1"1te- rad" d+!e6" 1-+ na u6a7 /+dera ?8:"tnu 1e/!en2u
/00010000/. Na .ra@"/u !"d"-+ da 1-+ na "76a7u d+:"6" $&8:"tnu 1e/!en2u
/000110000001/ /+ja <red1ta!6ja /+d"ranu u6a7nu re3*
L"1t"n. /+da 7a te1t:en2; Ha-"n.+!+. de/+dera:
6":rarO "eeeP
u1e "eee*1tdQ6+."2Qar"t;*a66P
u1e "eee*nu-er"2Q1td*a66P
u1e "eee*1tdQ6+."2Q$$)%*a66P
ent"tO ;a-de2Qt: "1
end ;a-de2Qt:P
ar2;"te2ture TDQARKHITEKTURE +@ ;a-de2Qt: "1
2+-<+nent ;a-de2
<+rtA
;a-"n : "n 1tdQ6+."2Q!e2t+rA$$ d+Snt+ (BP
data+ut : +ut 1tdQ6+."2Q!e2t+rA= d+Snt+ (BP
err+rQ<+1 : +ut 1tdQ6+."2Q!e2t+rA, d+Snt+ (BP
< : +ut 1tdQ6+."2P
err+rQ@6a. : +ut 1tdQ6+."2 BP
end 2+-<+nentP
1".na6 ;a-"n : 1tdQ6+."2Q!e2t+rA$$ d+Snt+ (BP
1".na6 data+ut : 1tdQ6+."2Q!e2t+rA= d+Snt+ (BP
1".na6 err+rQ<+1 : 1tdQ6+."2Q!e2t+rA, d+Snt+ (BP
1".na6 < : 1tdQ6+."2P
1".na6 err+rQ@6a. : 1tdQ6+."2P
88 Add O+ur 2+de ;ere ***
:e."n
88 Un"t Under Te1t <+rt -a<
UUT : ;a-de2
<+rt -a< A
;a-"n EZ ;a-"n'
data+ut EZ data+ut'
err+rQ<+1 EZ err+rQ<+1'
< EZ <'
$%
err+rQ@6a. EZ err+rQ@6a.
BP
88 Add O+ur 1t"-u6u1 ;ere ***
;a-"nTEY((((((((((((Y'Y((($$(($((($Y a@ter &(n1P
end TDQARKHITEKTUREP
2+n@".urat"+n TESTDENKHQFORQ;a-de2 +@ ;a-de2Qt: "1
@+r TDQARKHITEKTURE
@+r UUT : ;a-de2
u1e ent"tO S+r/*;a-de2A;a-de2BP
end @+rP
end @+rP
end TESTDENKHQFORQ;a-de2P
Zat"- 1-+ na u6a7 de/+dera d+!e6" +!u $&8:"tnu 1e/!en2u' a6" ta/+ t+ 1-+ na
-e1t+ 4 :"ta u-e1t+ V(V 1ta!"6" V$V' /a/+ :" u1t!ar" 1"-u6"ra6" .re/u t+/+- <ren+1a* Na
.ra@"/u 1e !"d" da 1-+ na "76a7u dataout d+:"6" /+r".+!anu re3 /+ja +d.+!ara ?8:"tn+j
u6a7n+j 1e/!en2" u <redajn"/* I1<+d 1e !"d" da "76a7 err+rQ<+1 "-a !redn+1t 4' t+ na-
"nd"2"ra da je d+6+ d+ .re/e u 4 :"tu " da je +n /+r".+!an* F6e. :"t error#%leg 1e ta/+e
<+1ta!"+ na V$V t+ u/a7uje da je d+6+ d+ .re/e* D"t < /+j" "nd"2"ra <r"1u1t!+ .re/e u d!a
:"ta +1ta+ je na 6+."3/+j nu6"*
I na /raju /a/+ :" <+/a7a6" ta 1e dea!a /ada 1e ja!6ja d!+1tru/a .re/a' +1"-
-+de6a .re/e na 4 :"tu' "1t+ 1-+ urad"6" " 1a e1t"- :"t+-' 7na3" u-e1t+ V(V 1ta!"6" V$V
/a/+ :" -+de6+!a6" .re/u <r" <ren+1u* Ka+ re7u6tat' na .ra@"/u !"d"-+ da je "76a7 <
1".na6"7"ra+ <r"1u1t!+ d!+1tru/e .re/e A1tanje 6+."3/e jed"n"2eB* I76a7 errorQ<+1 na-
"nd"2"ra da je d+6+ d+ .re/e u :"tu na <+7"2"j" ,' t+ je .re/a' jer 1-+ -+de6"ra6"
.re/e na 48t+- "
)8t+- :"tu* T+ na- <+/a7uje da je -+.u#e dete/t+!at" " /+r".+!at" 1a-+ <r"1u1t!+
jedn+1tru/e .re/e' d+/ je -+.u#e 1a-+ dete/t+!at" <r"1u1t!+ d!+1tru/e .re/e*
Ka+ j+ jedan <r"-er' :"#e "6u1tr+!an <ren+1 1e/!en2e <+data/a* Naj<re je na 16"2"
<r"/a7ana 1e/!en2a +d tr" :ajta /+j" 1e <ren+1e' .de !"d"-+ u6a7ne !redn+1t"' /a+ " "76a7ne
!redn+1t" "7 Ha-"n.+!+. /+dera* Zat"- 1-+ 1"-u6"ra6" da je <r" <ren+1u <r!+. :ajta
$4
d+6+ d+ .re/e u <ren+1u 4 :"ta' /+d dru.+. :aja da n"je :"6+ .re/e <r" <ren+1u " da je
/+d tre#e. :ajta d+6+ d+ <+ja!e d!+1tru/e .re/e na <r!+- " tre#e- :"tu*
Na d+nje- .ra@"/u <r"/a7an je d+:"!en" re7u6tat na "76a7u Ha-"n.+!+. de/+dera*
M+>e-+ !"det" da je <r" <ren+1u <r!+. :ajta de/+der 1".na6"7"ra+ da 1e rad" + .re2" na
<et+- :"tu " da je "1<ra!"+* K+d <ren+1a dru.+. :ajta n"je :"6+ .re/e' ta/+ da je 1!e u
redu' " na /raju <r" <ren+1u tre#e. :ajta' "76a7 < na- 1".na6"7"ra da 1e rad" + d!+1tru/+j
.re2"' ta/+ da je <+tre:n+ <+n+!"t" <ren+1 7adnje. :ajta' jer n"1-+ u -+.u#n+1t" da .a
/+r".uje-+*
$)
1. +e*$)tati sinte*e i im&)ementacije
Za 1"nte7u +<"1an"; /+6a "1/+r"#en je <r+.ra- Synpli%y &ro %irme Synpli'ity* Ka+
re7u6tat :"#e date e-e 1"nte7e u RTL " Gate @+r-atu* Na/+n t+.a je "7!rena
"-<6e-enta2"ja na F0GA /+6"-a @"r-e MILINM u7 <+-+# nj";+!+. <r+.ra-1/+. <a/eta
MILINM ISE !er7"je )*, " <r"/a7an" 1u d+:"jen" re7u6tat"*
1.1. Sinte*a
Naj<re je na 16"/a-a &* " ,* <r"/a7an re7u6tat 1"ntet"7+!anja /+6a Ha-"n.+!
de/+der u RTL " gate +:6"/u*
Slika (.)ema sinteze Hamingovog enkordera na *ate nivou
$=

Slika $. )ema sinteze Hamingovog kodera na +,- nivou
$?
S6"/e %* " 4* <ret1ta!6jaju d+:"jen" re7u6tat 1"nte7e /+6a Ha-"n.+! de/+der na RTL " gate
n"!+u'
Slika .. )ema sinteze Hamingovog dekodera na *ate nivou
$9

Slika /. )ema sinteze Hamingovog dekodera na +,- nivou

&(
1.2. 2m&)ementacija
Naj<re #e-+ <red+3"t" re7u6tate 1"nte7e Ha-"n.+!+. /+dera* S"nte7u " /+dera "
de/+dera !r"6" 1-+ na F0GA 3"<+!"-a 1er"je S0ARTAN& <+d +7na/+- X2&1$4 ![$((*
Design S$mmar3
--------------
4$m#er o5 errors: 0
4$m#er o5 6arnings: 0
!ogic Uti)i*ation:
4$m#er o5 . in&$t !U7s: 1 o$t o5 38. 19
!ogic Distri#$tion:
4$m#er o5 occ$&ied S)ices: 3 o$t o5 1:2 19
4$m#er o5 S)ices containing on)3 re)ated )ogic: 3 o$t o5 3 1009
4$m#er o5 S)ices containing $nre)ated )ogic: 0 o$t o5 3 09
;See 4O7<S #e)o6 5or an e=&)anation o5 t"e e55ects o5 $nre)ated )ogic
7ota) 4$m#er o5 . in&$t !U7s: 1 o$t o5 38. 19
4$m#er o5 #onded 2O(s: 20 o$t o5 >0 339
7ota) e?$iva)ent gate co$nt 5or design: 30
@dditiona) A7@ gate co$nt 5or 2O(s: :>0
Peak Bemor3 Usage: 1. B(
0+da2" !e7an" 7a !re-en1/e /ara/ter"1t"/e "-<6e-enta2"je:
7"e @V<+@< CO44<C72O4 D<!@D 5or t"is design is: 1.0:1
7"e B@E2BUB P24 D<!@D 2S: 1.:13
7"e @V<+@< CO44<C72O4 D<!@D on t"e 10 FO+S7 4<7S is: 1..:>
t+ 1e t"3e <+tr+nje 1a-+. /+6a +na je de/6ar"1ana na 9*&9-W " <r" te-<eratur"
a-:"jenta +d &4
+
K' te-<eratura /u#"ta je &4*,
+
K*
Na 16"2" )* <r"/a7an+ je 7au7e#e 6+."3/"; #e6"ja /a+ " ra1<+red net+!a' 7at"- je na 16"2" =*
<r"/a7an 1t!aran "7.6ed !e7a "7-eu #e6"ja " na /raju na 16"2" ?* 1a- ra1<+red <"n+!a na
/u#"tu*
&$
Slika 0. 1auze2e logi3ki" blokova
Slika 7. 4izi3ki raspored veza
&&
Slika 5. +aspored pinova
Zat"- 16ede re7u6tat" "-<6e-enta2"je Ha-"n.+!+. de/+dera* I1<+d je /a+ " u
<ret;+dn+- 16u3aju' na 16"2" 9* <r"/a7an+ je 7au7e#e 6+."3/"; #e6"ja /a+ " ra1<+red net+!a'
7at"- je na 16"2" $(* <r"/a7an 1t!aran "7.6ed !e7a "7-eu #e6"ja " na /raju na 16"2" $$* 1a-
ra1<+red <"n+!a na /u#"tu*
Design S$mmar3
--------------
4$m#er o5 errors: 0
4$m#er o5 6arnings: 0
!ogic Uti)i*ation:
4$m#er o5 . in&$t !U7s: 2G o$t o5 38. G9
!ogic Distri#$tion:
4$m#er o5 occ$&ied S)ices: 1. o$t o5 1:2 G9
4$m#er o5 S)ices containing on)3 re)ated )ogic: 1. o$t o5 1. 1009
4$m#er o5 S)ices containing $nre)ated )ogic: 0 o$t o5 1. 09
;See 4O7<S #e)o6 5or an e=&)anation o5 t"e e55ects o5 $nre)ated )ogic
7ota) 4$m#er o5 . in&$t !U7s: 2G o$t o5 38. G9
4$m#er o5 #onded 2O(s: 2> o$t o5 >0 .39
7ota) e?$iva)ent gate co$nt 5or design: 1>2
@dditiona) A7@ gate co$nt 5or 2O(s: 1H2.8
Peak Bemor3 Usage: 1. B(
0+da2" !e7an" 7a !re-en1/e /ara/ter"1t"/e "-<6e-enta2"je:
7"e @V<+@< CO44<C72O4 D<!@D 5or t"is design is: 0.:>1
7"e B@E2BUB P24 D<!@D 2S: 1.:.3
7"e @V<+@< CO44<C72O4 D<!@D on t"e 10 FO+S7 4<7S is: 1.3.8
&,
0+tr+nja je 16"3na /a+ u <ret;+dn+- 16u3aju' de/6ar"1ana je na $(*%9-W " <r"
te-<eratur" a-:"jenta +d &4
+
K' te-<eratura /u#"ta je &4*%
+
K*
Slika 6. 1auze2e logi3ki" blokova
Slika 1. 4izi3ki raspored veza
&%
Slika 11. +aspored pinova
&4
>. Iadatak
0r+!er"t" "1<ra!n+1t rada Ha-"n.+!+. /+dera " de/+dera*
Za u6a7n" /+d u Ha-"n.+! /+der u7e6" 1-+ u6a7nu 1e/!en2u :"t+!a datainJ00010000.
Na 16"2" $&* <r"/a7an je "7.6ed /+n/retn+. testben'"8a*
Slika 1(. 7zgled testben'8a za Hamingov koder
Na 16"2" $,* <r"/a7an" 1u d+:"jen" !re-en1/" d"ja.ra-"' .de !"d"-+ da 1-+ /a+
"76a7 "7 Ha-"n.+!+. /+dera d+:"6" 1e/!en2u datao$tJ000110000001.
Slika 1$. 9remenski dijagram rada kola
Zat"- 1-+ tu 1e/!en2u d+!e6" na u6a7 Ha-"n.+!+. de/+dera' <r" 3e-u 1-+ na -e1tu
<et+. :"ta u-e1t+ nu6e 1ta!"6" jed"n"2u* T"-e 1-+ 1"-u6"ra6" .re/u u <ren+1u* Na 16"2" $%*
naj<re je <r"/a7an "7.6ed testben'"8a' a 7at"- na 16"2" $4* " "7.6ed d+:"jen+. d"ja.ra-a*
U /+n/retn+- <r"-eru na u6a7 1-+ d+!e6" n"7 "aminJ000110010001H /+j" u1t!ar"
1"-u6"ra "76a7n" n"7 "7 Ha-"n.+!+. /+dera 1t"- da 1e ja!"6a .re/a <r" <ren+1u na 4 :"tu
/+j" je 1ada $ u-e1t+ (* V"d"-+ da na "76a7u d+:"ja-+ errorK5)ag :"t' da 1e .re/a ja!"6a
na <et+j <+7"2"j" errorK&osE4 " nara!n+ na "76a7u datao$tE((($((((*
&)
Slika 1.. 7zgled testben'8a za Hamingov dekoder
Slika 1/. 9remenski dijagram rada kola
&=
G. !a#oratorijska ve#a

Iadatak 1.
Proveriti is&ravnost rada Hamingovog kodera.
1. 0+/renut" <r+.ra- :'tive8H;- 3"ja 1e "/+n"2a na6a7" na ;esktop8uP
2. Ot!+r"t" d"7ajn HamingL
3. Ot!+r"t" 6"1t"n. ,est<en'"8a' "amencK7(.v"d' /+j" 1e na6a7" u %older8u ,est<en'"
M1e.-ent $* na 16"2" $)BP
.. 0r+-en"t" !redn+1t" u6a7a datain /+j" je dat u d"7ajnu' u-e1t+ <+1t+je#e !redn+1t"
A1e.-ent &* na 16"2" $)B* I7!r"t" /+-<aj6"ranje <r"t"1/+- na u+/!"renu "/+n"2u
A1e.-ent ,* na 16"2" $)BP
1. 0+de1"t" ,op level ent"tet na "amencK7(.v"d A1e.-ent %* na 16"2" $)BP

Slika 10. Otvaranje dizajna i upisivanje vrednosti
>. Ot!+r"t" =e> ?ave%orm A1e.-ent 4* na 16"2" $=BP
G. D+dat" 1".na6e A1e.-ent )* na 16"2" $=BP
8. 0+de1"t" !re-e 1"-u6a2"je na $(( n1 "6" !"e a/+ je <+tre:n+ A1e.-ent =* na 16"2"
$=BP
:. 0+/renut" 1"-u6a2"ju <r"t"1/+- na u+/!"renu "/+n"2u A1e.-ent ?* na 16"2" $=BP
10. 0+ 7a!ret/u 1"-u6a2"je -+>e :"t" <+tre:n+ da 1e !re-en1/" d"ja.ra- u!e#a "6"
u-anj" rad" :+6je <re.6edn+1t"* K+-ande 7a u!e6"3a!anje " u-anj"!anje 1u
u+/!"rene A1e.-ent 9* na 16"2" $=BP
11. U<+red"t" d+:"jen" !re-en1/" d"ja.ra- 1a "1<ra!n"- rad+- d"7ajna A!re-en1/"
d"ja.ra- na 16"2" $=B*
&?
Slika 17. ?ave%orm editor
12. Odta-<at" d+:"jen" !re-en1/" d"ja.ra-*
r$&a 1:
KKKKKKKKKKKKKKKKKKKKKKK KKKKKKKKKKKKKKKKKKKKKKKKK
u6a7n" :"narn" n"7 "76a7n" :"narn" n"7
r$&a 2:
KKKKKKKKKKKKKKKKKKKKKKK KKKKKKKKKKKKKKKKKKKKKKKKK
u6a7n" :"narn" n"7 "76a7n" :"narn" n"7
r$&a 3:
KKKKKKKKKKKKKKKKKKKKKKK KKKKKKKKKKKKKKKKKKKKKKKKK
u6a7n" :"narn" n"7 "76a7n" :"narn" n"7
r$&a .:
KKKKKKKKKKKKKKKKKKKKKKK KKKKKKKKKKKKKKKKKKKKKKKKK
u6a7n" :"narn" n"7 "76a7n" :"narn" n"7
r$&a 1:
KKKKKKKKKKKKKKKKKKKKKKK KKKKKKKKKKKKKKKKKKKKKKKKK
u6a7n" :"narn" n"7 "76a7n" :"narn" n"7
&9
r$&a >:
KKKKKKKKKKKKKKKKKKKKKKK KKKKKKKKKKKKKKKKKKKKKKKKK
u6a7n" :"narn" n"7 "76a7n" :"narn" n"7
r$&a G:
KKKKKKKKKKKKKKKKKKKKKKK KKKKKKKKKKKKKKKKKKKKKKKKK
u6a7n" :"narn" n"7 "76a7n" :"narn" n"7
r$&a 8:
KKKKKKKKKKKKKKKKKKKKKKK KKKKKKKKKKKKKKKKKKKKKKKKK
u6a7n" :"narn" n"7 "76a7n" :"narn" n"7
r$&a ::
KKKKKKKKKKKKKKKKKKKKKKK KKKKKKKKKKKKKKKKKKKKKKKKK
u6a7n" :"narn" n"7 "76a7n" :"narn" n"7
r$&a 10:
KKKKKKKKKKKKKKKKKKKKKKK KKKKKKKKKKKKKKKKKKKKKKKKK
u6a7n" :"narn" n"7 "76a7n" :"narn" n"7
r$&a 11:
KKKKKKKKKKKKKKKKKKKKKKK KKKKKKKKKKKKKKKKKKKKKKKKK
u6a7n" :"narn" n"7 "76a7n" :"narn" n"7
r$&a 12:
KKKKKKKKKKKKKKKKKKKKKKK KKKKKKKKKKKKKKKKKKKKKKKKK
u6a7n" :"narn" n"7 "76a7n" :"narn" n"7
r$&a 13:
KKKKKKKKKKKKKKKKKKKKKKK KKKKKKKKKKKKKKKKKKKKKKKKK
u6a7n" :"narn" n"7 "76a7n" :"narn" n"7
r$&a 1.:
KKKKKKKKKKKKKKKKKKKKKKK KKKKKKKKKKKKKKKKKKKKKKKKK
u6a7n" :"narn" n"7 "76a7n" :"narn" n"7
r$&a 11:
KKKKKKKKKKKKKKKKKKKKKKK KKKKKKKKKKKKKKKKKKKKKKKKK
u6a7n" :"narn" n"7 "76a7n" :"narn" n"7
,(
r$&a 1>:
KKKKKKKKKKKKKKKKKKKKKKK KKKKKKKKKKKKKKKKKKKKKKKKK
u6a7n" :"narn" n"7 "76a7n" :"narn" n"7
Iadatak 2.
Proveriti is&ravnost rada Hamingovog dekodera.
1. 0+n+!"t" 1!e /+ra/e 7a 6"1t"n. ,estben'"8a@ "amdecK7(.v"d.
Slika 15. ?ave%orm editor
r$&a 1:
KKKKKKKKKKKKKKKKKKKKKKK KKKKKKKKKKKKKKKKKKKKKKKKK
u6a7n" :"narn" n"7 "76a7n" :"narn" n"7
QQQQQQQQQQQQQQQQQ QQQQQQQQQQQQQQQQQQQ QQQQQQQQQQQQQQQQQQ
<+7"2"ja .re/e <8d!+1tru/a .re/a err+r @6a.
r$&a 2:
KKKKKKKKKKKKKKKKKKKKKKK KKKKKKKKKKKKKKKKKKKKKKKKK
u6a7n" :"narn" n"7 "76a7n" :"narn" n"7
,$
QQQQQQQQQQQQQQQQQ QQQQQQQQQQQQQQQQQQQ QQQQQQQQQQQQQQQQQQ
<+7"2"ja .re/e <8d!+1tru/a .re/a err+r @6a.
r$&a 3:
KKKKKKKKKKKKKKKKKKKKKKK KKKKKKKKKKKKKKKKKKKKKKKKK
u6a7n" :"narn" n"7 "76a7n" :"narn" n"7
QQQQQQQQQQQQQQQQQ QQQQQQQQQQQQQQQQQQQ QQQQQQQQQQQQQQQQQQ
<+7"2"ja .re/e <8d!+1tru/a .re/a err+r @6a.
r$&a .:
KKKKKKKKKKKKKKKKKKKKKKK KKKKKKKKKKKKKKKKKKKKKKKKK
u6a7n" :"narn" n"7 "76a7n" :"narn" n"7
QQQQQQQQQQQQQQQQQ QQQQQQQQQQQQQQQQQQQ QQQQQQQQQQQQQQQQQQ
<+7"2"ja .re/e <8d!+1tru/a .re/a err+r @6a.
r$&a 1:
KKKKKKKKKKKKKKKKKKKKKKK KKKKKKKKKKKKKKKKKKKKKKKKK
u6a7n" :"narn" n"7 "76a7n" :"narn" n"7
QQQQQQQQQQQQQQQQQ QQQQQQQQQQQQQQQQQQQ QQQQQQQQQQQQQQQQQQ
<+7"2"ja .re/e <8d!+1tru/a .re/a err+r @6a.
r$&a >:
KKKKKKKKKKKKKKKKKKKKKKK KKKKKKKKKKKKKKKKKKKKKKKKK
u6a7n" :"narn" n"7 "76a7n" :"narn" n"7
QQQQQQQQQQQQQQQQQ QQQQQQQQQQQQQQQQQQQ QQQQQQQQQQQQQQQQQQ
<+7"2"ja .re/e <8d!+1tru/a .re/a err+r @6a.
r$&a G:
KKKKKKKKKKKKKKKKKKKKKKK KKKKKKKKKKKKKKKKKKKKKKKKK
u6a7n" :"narn" n"7 "76a7n" :"narn" n"7
QQQQQQQQQQQQQQQQQ QQQQQQQQQQQQQQQQQQQ QQQQQQQQQQQQQQQQQQ
,&
<+7"2"ja .re/e <8d!+1tru/a .re/a err+r @6a.
r$&a 8:
KKKKKKKKKKKKKKKKKKKKKKK KKKKKKKKKKKKKKKKKKKKKKKKK
u6a7n" :"narn" n"7 "76a7n" :"narn" n"7
QQQQQQQQQQQQQQQQQ QQQQQQQQQQQQQQQQQQQ QQQQQQQQQQQQQQQQQQ
<+7"2"ja .re/e <8d!+1tru/a .re/a err+r @6a.
r$&a ::
KKKKKKKKKKKKKKKKKKKKKKK KKKKKKKKKKKKKKKKKKKKKKKKK
u6a7n" :"narn" n"7 "76a7n" :"narn" n"7
QQQQQQQQQQQQQQQQQ QQQQQQQQQQQQQQQQQQQ QQQQQQQQQQQQQQQQQQ
<+7"2"ja .re/e <8d!+1tru/a .re/a err+r @6a.
r$&a 10:
KKKKKKKKKKKKKKKKKKKKKKK KKKKKKKKKKKKKKKKKKKKKKKKK
u6a7n" :"narn" n"7 "76a7n" :"narn" n"7
QQQQQQQQQQQQQQQQQ QQQQQQQQQQQQQQQQQQQ QQQQQQQQQQQQQQQQQQ
<+7"2"ja .re/e <8d!+1tru/a .re/a err+r @6a.
r$&a 11:
KKKKKKKKKKKKKKKKKKKKKKK KKKKKKKKKKKKKKKKKKKKKKKKK
u6a7n" :"narn" n"7 "76a7n" :"narn" n"7
QQQQQQQQQQQQQQQQQ QQQQQQQQQQQQQQQQQQQ QQQQQQQQQQQQQQQQQQ
<+7"2"ja .re/e <8d!+1tru/a .re/a err+r @6a.
r$&a 12:
KKKKKKKKKKKKKKKKKKKKKKK KKKKKKKKKKKKKKKKKKKKKKKKK
u6a7n" :"narn" n"7 "76a7n" :"narn" n"7
QQQQQQQQQQQQQQQQQ QQQQQQQQQQQQQQQQQQQ QQQQQQQQQQQQQQQQQQ
,,
<+7"2"ja .re/e <8d!+1tru/a .re/a err+r @6a.
r$&a 13:
KKKKKKKKKKKKKKKKKKKKKKK KKKKKKKKKKKKKKKKKKKKKKKKK
u6a7n" :"narn" n"7 "76a7n" :"narn" n"7
QQQQQQQQQQQQQQQQQ QQQQQQQQQQQQQQQQQQQ QQQQQQQQQQQQQQQQQQ
<+7"2"ja .re/e <8d!+1tru/a .re/a err+r @6a.
r$&a 1.:
KKKKKKKKKKKKKKKKKKKKKKK KKKKKKKKKKKKKKKKKKKKKKKKK
u6a7n" :"narn" n"7 "76a7n" :"narn" n"7
QQQQQQQQQQQQQQQQQ QQQQQQQQQQQQQQQQQQQ QQQQQQQQQQQQQQQQQQ
<+7"2"ja .re/e <8d!+1tru/a .re/a err+r @6a.
r$&a 11:
KKKKKKKKKKKKKKKKKKKKKKK KKKKKKKKKKKKKKKKKKKKKKKKK
u6a7n" :"narn" n"7 "76a7n" :"narn" n"7
QQQQQQQQQQQQQQQQQ QQQQQQQQQQQQQQQQQQQ QQQQQQQQQQQQQQQQQQ
<+7"2"ja .re/e <8d!+1tru/a .re/a err+r @6a.
r$&a 1>:
KKKKKKKKKKKKKKKKKKKKKKK KKKKKKKKKKKKKKKKKKKKKKKKK
u6a7n" :"narn" n"7 "76a7n" :"narn" n"7
QQQQQQQQQQQQQQQQQ QQQQQQQQQQQQQQQQQQQ QQQQQQQQQQQQQQQQQQ
<+7"2"ja .re/e <8d!+1tru/a .re/a err+r @6a.
,%
8. !iterat$ra:
$* K;ar6e1 D* Ka-er+n' Hamming Aodes@ Le11+n1 ,=' S<r"n. &((4*
&* La"-e M+ntene.r+' Su::ara+ Wunna!a' 1(8bit 9H;- <ased Hamming Aode Brror
;ete'torCAorre'tor' F6+r"da Internat"+na6 Un"!er1"tO' &((4*
,* A66en D* H+66"daO' Hamming Brror8Aorre'tion Aodes' $99%*
%* Ha--"n.' R* W*' Brror ;ete'ting and Brror Aorre'ting Aodes' De66 SO1te-
Te2;* L+ur*' $94(*
4* 0* Dan7".er' -inear Aodes' $99(*
)* L"n' S;u' An Intr+du2t"+n t+ Err+r K+rre2t"n. K+de1' Bngle>ood' $9=(*
,4