版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡介
1、無錫科技職業(yè)學(xué)院 中英文翻譯 46 -Computer control technology1 Computer structure and function This section introduces the internal architecture of a computer and describes how instructions are stored and interpreted and explains how the instruction execution cycle is broken down into its various components. Att t
2、he most basicc leveel, a compuuter ssimplyy execcutes binarry-codded reesultss. For a generral-puurposee proggrammaable ccomputter, ffour nnecesssary eelemennts arre thee memoory, ccentraal proocessiing unnit (CCPU, oor simmply pprocesssor), an eexternnal prrocesssor buus, annd an inputt/outpput syy
3、stem as inndicatted inn Fig.3-1 A-1. Fig. 3-1A-1 Basicc elemments of a compuuter Thhe memmory sstoress insttructiions aand daata. Thhe CPUU readds andd inteerpretts thee insttructiions, readss the data requiired bby eacch insstructtion, execuutes tthe acction requiired bby thee insttructiion, aand s
4、ttores the rresultts bacck in memorry. One off the actioons thhat iss requuired of thhe CPUU is tto reaad datta froom or writee dataa to aan extternall deviice. TThis iis carrried out uusing the iinput/outpuut sysstem. Thhe extternall proccessorr bus is a set oof eleectricc condductorrs thaat carrri
5、es data, addrress aand coontroll infoormatiion beetweenn the otherr compputer elemeents.1-1 Thee memoory Thhe memmory oof a ccomputter coonsistts of a sett of seqquentiially numbeered llocatiions. Each llocatiion iss a reegisteer in whichh binaary innformaation can bbe stoored. The “numbeer” of aa l
6、ocaation is caalled its aaddresss. The loowest addreess iss 0. TThe maanufaccturerr defiines aa wordd lenggth foor thee proccessorr thatt is aan inttegrall numbber off locaationss longg. In eacch worrd thee bitss can repreesent eitheer datta or instrructioons. FFor thhe Inttel 80086/877 and Motorrol
7、a MMC68000 micrroproccessorrs, a word is 166 bitss longg, butt eachh memoory loocatioon hass onlyy 8 biits annd thuus twoo 8-biit loccationns musst be accesssed tto obttain eeach ddata wword. Inn ordeer to use tthe coontentts of memorry, thhe proocessoor musst fettch thhe conntentss of tthe riight l
8、locatiion. TTo carrry ouut a ffetch, the proceessor placees (ennabless) thee binaary-cooded aaddresss of the ddesireed loccationn ontoo the addreess liines oof thee exteernal proceessor bus. The meemory then allowws thee conttents of thhe adddresseed memmory llocatiion too be rread bby thee proccess
9、orr. The prrocesss of ffetchiing thhe conntentss of aa memoory loocatioon doees nott alteer thee conttents of thhat loocatioon. Innstrucctionss in mmemoryy Insttructiions sstoredd in mmemoryy are fetchhed byy the CPU aand unnless progrram brranchees occcur, tthey aare exxecuteed in the ssequennce th
10、hey apppear in meemory. An insstructtion wwritteen as a binnary ppatterrn is calleed a mmachinne-lannguagee insttructiion. OOne waay to achieeve meeaninggful ppatterrns iss to ddividee up tthe biits innto fiields as inndicatted inn Fig. 3-1AA-2, wwith eeach ffield contaainingg a coode foor a ddiffer
11、rent ttype oof infformattion.Fig. 3-1A-2 Arranngemennt of progrram annd datta in memorry Eacch insstructtion iin ourr simpple coomputeer cann be ddivideed up into four fieldds of 4 bitts eacch. Eaach innstrucction can ccontaiin opeeratioon codde (orr opcoode, eeach iinstruuctionn has a uniique oopco
12、dee), opperandd addrress, immeddiate operaands, brancch adddress. In a reaal insstructtion sset thhere aare maany moore innstrucctionss. Theere iss alsoo a muuch laarge nnumberr of mmemoryy locaationss in wwhich to sttore iinstruuctionns andd dataa. In orderr to iincreaase thhe nummber oof memmory l
13、locatiions, the aaddresss fieelds aand heence tthe innstrucctionss mustt be llongerr thann 16 bbits iif we use tthe saame appproacch. Thhere aare a numbeer of ways to inncreasse thee addrressinng rannge off the microoproceessor withoout inncreassing tthe innstrucction lengtth: vaariablle insstructti
14、on ffield, multtiwordd insttructiions, multiiple aaddresssing modess, varriablee insttructiion leength. We wwill nnot diiscusss themm in ddetaill. Datta in memorry datta is inforrmatioon thaat is repreesenteed in memorry as a codde. Foor effficiennt usee of tthe meemory spacee and proceessingg timee
15、, mosst commputerrs proovide the ccapabiility of maanipullatingg dataa of ddifferrent llengthhs andd reprresenttationns in memorry. Thhe varrious diffeerent repreesentaationss recoognizeed by the pprocesssor aare caalled its ddata ttypes. The data typess normmally used are: bit, binarry-codded deeci
16、mall digiit (4-bit nnibblee, BCDD), byyte (88 bitss), woord (22 bytees), ddoublee wordd (4 bbytes). Somme proocessoors prrovidee insttructiions tthat mmanipuulate otherr dataa typees succh as singlle-preecisioon flooatingg-poinnt datta typpes (332bitss) andd doubble-prrecisiion flloatinng-poiint daa
17、ta tyypes (64 biits). Theree is aanotheer typpe of datacharaacter data. It iis alsso usuually repreesenteed in 8 bitts. Eaach coomputeer terrminall key and kkey coombinaation (suchh as sshift and ccontrool funnctionns) onn a sttandarrd terrminall keybboard has aa 7-biits coode deefinedd by tthe Amme
18、ricaan Staandardd Codee for Inforrmatioon Intterchaange (ASCIII). Tyype off memoory Inn the appliicatioons off digiital ccontrool sysstem, we allso cooncernned wiith thhe chaaracteeristiics off diffferentt memoory teechniqques. For pprimarry memmory, we neeed itt to bbe stoored iinformmationn temppo
19、rariily annd to be wrrittenn and got iinformmationn fromm succcessivve or from widelly diffferennt loccationns. Thhis tyype meemory is caalled randoom-acccess mmemoryy (RAMM). Inn somee casee we ddo nott wantt the inforrmatioon in memorry to be loost. SSo we are wwillinng to use sspeciaal tecchniquu
20、es too writte intto memmory. If wrritingg is aaccompplisheed onlly oncce by physiicallyy channging conneectionns, thhe memmory iis callled aa readd-onlyy memoory (RROM). If thhe intterconnnectiion paatternn can be prrogrammmed tto be set, the mmemoryy is ccalledd a prrogrammmablee readd-onlyy memoor
21、y (PPROM). If rrewritting ccan bee accoomplisshed wwhen iit is necesssary, we hhave aan eraasablee proggrammaable rread-oonly mmemoryy (EPRROM). An ellectroonicallly errasablle PROOM is abbreeviateed EEPPROM. 1-2 Thee CPU The CPUs jobb is tto fettch innstrucctionss fromm memoory annd exeecute thesee
22、 insttructiions. The sttructuure off the CPU iis shoown inn Fig. 3-1AA-3. Itt has four main compoonentss: an arithhmeticc and logiccal unnit (AALU), a sett of rregistters, an innternaal proocessoor buss and contrrollerr.Fig.3-11A-3 CCentraal proocessiing unnit (CCPU) Thhese aand otther ccomponnents
23、of thhe CPUU and theirr partticipaation in thhe insstructtion ccycle are ddescriibed iin thee folllowingg secttions. Ariithmettic annd Loggical Unit (ALU) The ALLU proovidess a wiide arrithmeetic ooperattions, inclludingg add, subttract, multtiply, and dividde. It cann alsoo perfform BBooleaan loggi
24、c opperatiions ssuch aas ANDD, OR, and COMPLLEMENTT on bbinaryy dataa. Other operaationss, succh as word compaares, are aalso aavailaable. The maajoritty of compuuter ttasks invollve thhe ALUU, butt a grreat aamountt of ddata mmovemeent iss requuired in orrder tto makke usee of tthe ALLU insstructti
25、ons. Reggisterrs A sset off regiisterss insiide thhe CPUU in uused tto stoore innformaation. Insstructtion rregistter When an innstrucction is feetchedd, it is coopied into the iinstruuctionn regiister, wherre it is deecodedd. Decodiing meeans tthat tthe opperatiion coode iss exammined and uused tto
26、 detterminne thee stepps of the eexecuttion ssequennce. Proogrammmers moddel off the CPU The ccollecction of reegisteers thhat caan be examiined oor moddifiedd by aa proggrammeer is calleed thee proggrammeers moddel off the CPU. The onnly reegisteers thhat caan be manippulateed by the iinstruuctionn
27、 set, or aare viisiblyy affeected by haardwarre inpputs oor thee resuults oof opeeratioons uppon daata, aare thhe reggisterrs reppresennted iin thee modeel. Flaag reggisterr The exeecutioon seqquencee is ddetermmined not oonly bby thee insttructiion buut alsso by the rresultts of the pprevioous inns
28、trucctionss. Forr exammple, if ann addiition is caarriedd out in thhe ALUU, datta on the rresultt of tthe addditioon (whhetherr the resullt is posittive, negattive, or zeero, ffor exxamplee) is storeed in what is knnown aas a fflag rregistter, sstatuss regiister, or ccondittion rregistter. IIf thee
29、nextt insttructiion iss a coonditiional brancch insstructtion, the fflag wword iis tessted iin thaat insstructtion tto detterminne if a braanch iif a bbranchh is rrequirred. Proogram countter (iinstruuctionn poinnter) The aaddresss of the nnext iinstruuctionn is llocateed in a reggisterr callled thh
30、e proogram countter. Datta reggisterrs When an innstrucction uses the rregistters tto stoore daata, tthe reeferennce too the regisster iin thee insttructiion iss callled reegisteer adddressiing. TThe reeasonss of mmakingg use of thhe intternall regiisterss to sstore data are tthat tthey ccan maake t
31、hhe insstructtions shortter annd makke exeecutioon fasster. Adddress regissters The innternaal reggisterrs cann alsoo be uused ffor thhe stoorage of adddresss of ddata iin memmory ddata. In suuch a case, the instrructioon worrd conntainss a reegisteer nummber (i.e. a reggisterr addrress). In thee re
32、giister is coontainned thhe adddress of meemory data to bee usedd in tthe innstrucction. This fform oof adddressiing iss callled reegisteer inddirectt addrressinng. The coontentts of the rregistter arre saiid to pointt to tthe daata inn memoory. Intternall Proccessorr Bus The interrnal pprocesssor b
33、bus mooves ddata bbetweeen intternall regiister. A buus is a sett of ccloselly groouped electtric cconducctors that transsfers data, addrress, and ccontrool infformattion bbetweeen funnctionnal bllocks of thhe CPUU. Data ffrom aa sourrce reegisteer cann be ppassedd to aa desttinatiion reegisteer whe
34、en botth aree enabbled oonto (conneected to) tthe buus. Conntrolller The contrrollerr provvides the prroper sequeence oof conntrol signaals foor eacch insstructtion iin a pprograam cyccle too be ffetcheed froom memmory. A totaal proogram cyclee compprisess manyy insttructiion cyycle, each instrructi
35、oon cyccle caan be dividded upp intoo its compoonent machiine cyycles and eeach mmachinne cyccle coomprisses a numbeer of clockk cyclle. In orderr to ffetch an innstrucction, for exampple illlustrrated in Fiig.3-11A-4, the aaddresss in the pprograam couunter is pllaced on thhe adddress liness of tth
36、e exxternaal buss (AB) at tthe onnset oof cloock cyycle CC1. Simuultaneeouslyy, usiing a code on thhe conntrol liness of tthe buus (CBB), thhe CPUU infoorms aall deevicess attaached to thhe buss thatt an “opcodde” fetcch macchine cyclee is bbeing execuuted bby thee CPU. The meemory allowws thee memo
37、ory adddresss to sselectt the meemory locattion ccontaiining the innstrucction. At C2 the contrrollerr placces a “read” commmand oonto tthe coontroll bus whichh alloows thhe memmory ddata tto be placeed ontto thee dataa bus. The coontrolller tthen ggates the daata innto thhe insstructtion rregistter
38、 annd remmoves the reead coommandd fromm the coontroll bus in C33. At C4, the coontrolller rremovees thee addrress ffrom tthe adddresss bus and bbeginss to ddecodee the opperatiion-coode poortionn of tthe innstrucction to seee whaat steeps arre reqquiredd for execuution. The deecodinng opeeratioon m
39、ayy takee seveeral mmore cclock cyclee at tthe ennd of whichh the “opcodde fettch” mmachinne cyccle. Fiig. 3-1A-4 A timming ddiagraam forr opeeratioon-codde fettch Extternall atteentionn requuests It iss ofteen neccessarry to stop the nnormall insttructiion prrocesssing ssequennce. OOne tyype off ex
40、teernal attenntion requeest iss the resett requuest. In thhe casse of an unnrecovverablle errror, aa compputer systeem mayy be rrequirred too reseet itsself .This wouldd havee the effecct of initiializiing alll impportannt reggisterrs in the ssystemm and startting iinstruuctionn execcutionn fromm a
41、sttandarrd memmory llocatiion-ussuallyy locaation 0. An inputt thatt is mmore ccommonnly acctivatted duuring the nnormall courrse off evennts iss the interrrupt requeest. AAn intterruppt reqquest signaal froom an exterrnal ddevicee can causee the CPU tto immmediattely eexecutte a sservicce subbrouti
42、ine whhich ccarriees outt the necesssary actioons. AAfter complletingg the serviice suubrouttine, the pprocesssor wwill ccontinnue thhe tassk froom whiich itt was origiinallyy inteerruptted.The thiird tyype off inpuut is the bbus reequestt, or direcct memmory aaccesss(DMA) requuest. It iss posssible
43、 to haave a termiinal iinterfface tthat sstoress up aall thhe chaaracteers inn a liine off textt untiil it receiives aa carrriagee retuurn. Then the iinterfface rrequessts thhe usee of tthe syystem bus, at whhich ttime tthe coomplette linne of data is trransfeerred to meemory as faast ass posssible.
44、 In tthis wway thhe proocessoor simmply bbecomees inaactivee untiil thee trannsfer is coompletted.1-3 Busses Thee bus is thhe mosst impportannt commmuniccationn systtem inn a coomputeer sysstem. Underr conttrol oof thee CPU, a daata soource devicce andd a daata deestinaation devicce aree enaabled on
45、too(equiivalennt to beingg connnectedd to) the bbus wiires ffor a shortt trannsmisssion. Extternall proccessorr bus The iinternnal prrocesssor buus desscribeed in Sec. is coonnectted too the exterrnal pprocesssor bbus byy a seet of bus bbufferrs loccated on thhe miccroproocessoor inttegratted ciircu
46、itt. Sysstem bbus The mmicroccomputter booard ccan coommuniicate with otherr boarrds byy connnectinng itss bus to ann exteernal systeem buss throough aa connnectorr.1-4 Commputerr Inpuut andd Outpput A sset off regiisterss exteernal to thhe CPUU is aassociiated with what is knnown aas thee inpuut/ou
47、ttput (I/O) systeem. Thhe I/OO systtem iss connnectedd to tthe exxternaal proocessoor buss usinng conntrol, addrress, and ddata bbuses throuugh ann I/O regissters in ann inteerfacee. Theere arre bassicallly twoo wayss thatt are used to adddresss I/O regisster. In tthe fiirst mmethodd, callled II/O-m
48、aapped inputt/outpput, tthe opperatiion coode ittself has sspeciaal I/OO insttructiions tthat aaddresss a nnumberred reegisteer in the iinterfface ccalledd an II/O poort. The seconnd metthod oof adddressiing I/O reggisterrs givves thhe I/OO portts adddressees thaat liee withhin thhe memmory aaddress
49、s rannge off the CPU. This is caalled memorry-mappped II/O. OOf couurse tthere must not bbe anyy memoory loocatioons att the same addreess ass I/O locattions. One of thhe bennefitss of tthe meemory-mappeed appproachh is tthat tthe fuull raange oof memmory aaddresssing modess is aavailaable tto thee
50、addrressinng of I/O rregistters.2 Fundaamentaals off Compputer and NNetworrks2-1 Orgganizaation of Coomputeer Sysstem A coomputeer is a fasst andd accuurate symbool mannipulaating systeem thaat is organnized to acccept, storre, annd proocess data and pproducce outtput rresultts undder thhe dirrectio
51、on of a stoored pprograam of instrructioons. TThis ssectioon expplainss why a commputerr is aa systtem annd howw a coomputeer sysstem iis orgganizeed. Keey eleementss in aa compputer systeem incclude inputt, proocessiing, aand ouutput devicces. LLets examiine eaach coomponeent off the systeem in mor
52、e detaiil. Inpuut Devvices Compputer systeem usee manyy deviices ffor innput ppurposse. Soome INNPUT DDEVICEES alllow diirect humann/machhine ccommunnicatiion, wwhile some firstt requuire ddata tto be recorrded oon an inputt mediium suuch ass a maagnetiizablee mateerial. Deviices tthat rread ddata m
53、magnetticallly reccordedd on sspeciaally ccoatedd plasstic ttapes or fllexiblle or flopppy plaastic diskss are popullar. TThe keeyboarrd of a worrkstattion cconneccted ddirecttly too (or ONLINNE to) a coomputeer is an exxamplee of aa direect innput ddevicee. Addditionnal diirect inputt deviices iinc
54、ludde thee mousse, innput ppen, ttouch screeen, annd miccrophoone. RRegarddless of thhe typpe of devicce useed, alll aree compponentts forr inteerprettationn and commuunicattion bbetweeen peoople aand coomputeer sysstems. Centtral PProcesssing Unit The heartt of aany coomputeer sysstem iis thee cent
55、tral pprocesssing unit (CPU). Theere arre thrree maain seectionns fouund inn the CPU oof a ttypicaal perrsonall compputer systeem: thhe priimary storaage seectionn, thee aritthmetiic-loggic seectionn, andd the contrrol seectionn. Butt thesse thrree seectionns areent uuniquee to ppersonnal coomputeer
56、s. TThey aare foound iin CPUUs of all ssizes. Outpput Deevice Likee inpuut uniits, ooutputt deviice arre insstrumeents oof intterpreetatioon andd commmunicaation betweeen huumans and ccomputter syystem of alll sizze. Thhese ddevicee takee outpput reesultss fromm the CPU iin macchine-codedd formm and
57、 conveert thhem innto a form that can bbe useed (a) by ppeoplee (e.gg. a pprinteed andd /or displlayed reporrt) orr (b) as maachinee inpuut in anothher prrocesssing ccycle. In ppersonnal coomputeer sysstems, dispplay sscreenn and deskttop prrinterrs aree popuular ooutputt deviices. Largeer andd fast
58、ter prrinterrs, maany onn-linee workkstatiions, and mmagnettic taape drrives commoonly ffound in laarge ssystemms. The inputt/outpput annd seccondarry stoorage unitss are somettimes calleed perripherral deevicess (or just perippheralls). TThis tterminnologyy refeers too the fact that althoough tthes
59、e devicces arre nott a paart off the CPU, they are ooften locatted neear itt. Bessides, a coomputeer sysstem aalso iincluddes buuses, ROM(rread oonly mmemoryy), RAAM(ranndom aaccesss memoory), paralllel pport aand seerial port, hardd diskk, flooppiess and CD(coompactt diskk)drivve, annd so on.2-2 Op
60、eeratinng Sysstem Opeeratinng sysstems have develloped over the ppast tthirtyy yearrs forr two main purpooses. Firstt, theey proovide a connvenieent ennvironnment for tthe deeveloppment and eexecuttion oof proogramss. Seccond, operaating systeems atttemptt to sscheduule coomputaationaal acttivitiies
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。
最新文檔
- 中秋節(jié)聯(lián)歡會(huì)致辭范文(10篇)
- 九月大班上學(xué)期月計(jì)劃范文(5篇)
- 中秋晚會(huì)董事長致辭范文(13篇)
- 曹植課件教學(xué)課件
- 講師比賽課件教學(xué)課件
- 影響高中數(shù)學(xué)成績的原因及解決方法
- 消費(fèi)品和有關(guān)服務(wù)的比較試驗(yàn) 實(shí)施要求 編制說明
- 愛嬰醫(yī)院課件教學(xué)課件
- 南宮市八年級(jí)上學(xué)期語文10月月考試卷
- 八年級(jí)上學(xué)期語文期中考試卷
- JT-T 617.2-2018 危險(xiǎn)貨物道路運(yùn)輸規(guī)則 第2部分:分類 含2024年第1號(hào)修改單
- 2024年合肥興泰金融控股(集團(tuán))有限公司招聘筆試沖刺題(帶答案解析)
- 大學(xué)生職業(yè)生涯展示
- 《金屬非金屬地下礦山監(jiān)測監(jiān)控系統(tǒng)建設(shè)規(guī)范》
- 《中國慢性阻塞性肺疾病基層診療與管理指南(2024年)》解讀
- 安全操作規(guī)程、作業(yè)指導(dǎo)書
- MOOC 軟件安全之惡意代碼機(jī)理與防護(hù)-武漢大學(xué) 中國大學(xué)慕課答案
- 檔案工作協(xié)調(diào)機(jī)制
- 肝硬化門靜脈高壓食管胃靜脈曲張出血的防治指南( 2022)
- 2023年1月自考00804金融法二試題及答案
- 贏利-未來10年的經(jīng)營能力-讀后感
評(píng)論
0/150
提交評(píng)論