I 1.1 v J \)v \J b) Tdn s(f
2,6,1, Ket ciiu CO' sa cila bO vi xuIi (Microprocessor)
BQ vi Xlr If duqc chia thanh 3 vung: b(j vi X/I li trung tam (CPU) nMn biet
va thl!c hi~n cae l¢nh clla chuo'ng trinh, giao di4n- mqch xud't/nitijp de quan Ii truycn th6ng gifra b¢ xv If va the gi6i Qen ngoai va bf) nhl! de llfU gifr cau truc
chuo'ng trlnh va du li¢u. Tin hi~u so di chuyen tt! khu VI!C nay sang khu Vt!C khac dQc thea duang truy~n bus (m¢t bus co y nghia v~t Ii 1.1 mQt so day dan
di~n v,:\ch tren m<;1ch in ho~c doli cap). on li¢u lien quan den chltc nang xu Ii cua CPU duqc truy~n bCri dl!ang truy/n da 1i4u (data hus), thong tin ve dta chi cua m¢t vt trf xac dinh tren b¢ nh6 de truy c~p d.c du li¢u luu duqc tai bai buvt
dja chi' (address bus) va nhfrng tin hi~u lien quan den hanh dQng di~u khi~n
dU\1c tiii bbi buyt die'u khie'n (control bus)- hinh 2.79. Trang mQl s6 truang
hqp, chip vi xu 1i (microcessor chip) chinh Ia CPU, b mQt so truang hqp khac no co thi! co day du d.c thanh phan can thiet cho m9t may tinh tnm vt;n dl!a vao mQt can chip. cac hQ vi xu Ii co bQ nha va cac dau nh~p/xuat xep tren cling ffi¢t can chip g9i Ul cae vi di~u khi~n (micro.controller).
Buyt aja chi Buyt drr li~u Buyt aieu khierl
I 86 nh6 I I I
I CPU I
Hinh 2.79 :Cifu mic chung Clia m¢t may tfllh
2.6.1.1. Duimg truy~n buyt
I
I Nh~plxual \
Btlyt dfi'li¢u (data bus) duqc Slr dl!ng M v~n chuy6n mQt tu may (word) gifta bQ nh6 ho~c giao di~n nh~pl xu at tail tu CPU. Chi~u dai cua cac tu nay co the'Ia 4. 8, 16 , 32 ho~c 64 bit. M6i day trang buyt truy~n mQt tin hi~u nh~ phan (0 ho~c 1). Nhl1 v~y, vi d\!. m"t buyt 4 day dang truy~n tir lOlD. C<ic bit dl1qc truy~n: Til o (bit thap) I o l(bft cao) Day buyt
Day buyt dft 1i~u dau tien Day buyt dfr li~u thu hai
Day buyt dft li~u thu ba Day buyt dfr li~u thu tu
Buyt dli: li~u ding nhieu day. chicu dai tir truyen dng km. Ph~ffi vi cac gia tr! mQt Io~i dfr li~u b, h<.ln che bbi chieu dai tiro Neu mQt dfr li¢u co chi~u dai 4 bit, s6111qng cae gia tri se la 24 ::::16. BQ vi xu Ii 4 bit ngay nay hay su dlJ.ng cho do chai , may gi~t. Lo~i phci thong hay dung cho cac h~ dieu khi~n ohit la lo<;ti 8.16,32 va 64 bit.
BU:'it Jia chi (address bus) truyen cac tin hi¢u, lO<.li cho biet nC1i co the tim
thay dfr li¢u va chQn cac vi tri nhd ho~c cac dog nh~pl xuat nao do. Khi mQt dja chi C\l th6 duqc ch9ll boi dja chi dang dugc d~t lell buyt dia chi, thl chi moi vi tri' nay duqc rna, thong v6i CPU. Nhu the CPU co khil nang giao tiep chi v6i mQt vj tri t~i m¢t thai diem. M¢t may tinh 8 bit dft li~ll thl thlIang co buyt dja chi 16 bit. Kich thuac buyt dja chi nay cho phep tfl:::: 65536 (=64K. K=1024bytc) vi
tIi dUQ'c ghi dia chi. TIQ nho cang Ian dmg chua dUQ'c nhi~u dl1li¢u va S11 dl:mg dUQ'c cac chuemg trtnh Ian hem, phuc t'.lP hem.
Buyt di/u khirfn (control bus): qua no tin hi¢u dUQ'c gi'ri d~ dong bQ cac thanh phan rieng Ie. Cac tin hi¢u cua dong ho h¢ thong dUQ'c truyen boi buyt dicu khi~n. cac tin hi¢u nay sinh d.c kholmg thoi i:,ian trong do cae ho~t dOng h¢ thong co th~ dien ra. CPU gui mQt s6 tin hi¢u dieu khitin tai nhfrng thanh phan khac de bi~u thi iO'.li hO'.lt dQng dang dien fa nhu dau do dn nh~n (READ)
mQt tin hi¢u ho~c giIi (WRITE) mQt dl1li~u.
2.6.1.2. Bq vi xu Ii trung tam CPU
CPU 13. vimg trong bO vi xiI ti, xu If dl1li¢u ,tIm cac I¢nh tiT bQ nha, giiii rna va thl!C hi¢n chung. CPU bao g6m mOi dem vi dieu khien , mQt dem vi logic va s6 hoc (ALU) va cac thanh ghi (hinh 2.80).
cac thanh ghi Thanh oem chllOng tnnh
D~a chi bQ nho