




版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進(jìn)行舉報或認(rèn)領(lǐng)
文檔簡介
1、Computer control technology1 Computer structure and functionThis 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.At the most basic level, a
2、 computer simply executes binary-coded results. For a general-purpose programmable computer, four necessary elements are the memory, central processing unit (CPU, or simply processor), an external processor bus, and an input/output system as indicated in Fig.3-1 A-1.Fig. 3-1A-1 Basic elements of a c
3、omputerThe memory stores instructions and data.The CPU reads and interprets the instructions, reads the data required by each instruction, executes the action required by the instruction, and stores the results back in memory. One of the actions that is required of the CPU is to read data from or wr
4、ite data to an external device. This is carried out using the input/output system.The external processor bus is a set of electric conductors that carries data, address and control information between the other computer elements.1-1 The memoryThe memory of a computer consists of a set of sequentially
5、 numbered locations.Each location is a register in which binary information can be stored. The“number” of a location is called its address. The lowest address is 0. The manufacturer defines a word length for the processor that is an integral number of locations long. In each word the bits can repres
6、ent either data or instructions. For the Intel 8086/87 and Motorola MC6800 microprocessors, a word is 16 bits long, but each memory location has only 8 bits and thus two 8-bit locations must be accessed to obtain each data word.In order to use the contents of memory, the processor must fetch the con
7、tents of the right location. To carry out a fetch, the processor places (enables) the binary-coded address of the desired location onto the address lines of the external processor bus. The memory then allows the contents of the addressed memory location to be read by the processor. The process of fe
8、tching the contents of a memory location does not alter the contents of that location.Instructions in memoiIyistructions stored in memory are fetched by the CPU and unless program branches occur, they are executed in the sequence they appear in memory. An instruction written as a binary pattern is c
9、alled a machine-language instruction. One way to achieve meaningful patterns is to divide up the bits into fields as indicated in Fig. 3-1A-2, with each field containing a code for a different type of information.16-bit instruction wordsIFields Opcodemmediate codeOperand dataBranch address0001010110
10、00XXXXSet5 in location 8010000011000XXXXSubtract1 from location 80011XXXXXXXX0100If zero, branchto location 4.XXXX : not u sed (or “ don t care”)Each instruction in our simple computer can be divided up into four fields of 4 bits each. Each instruction can contain operation code (or opcode, each ins
11、truction has a unique opcode), operand address, immediate operands, branch address.In a real instruction set there are many more instructions. There is also a much large number of memory locations in which to store instructions and data. In order to increase the number of memory locations, the addre
12、ss fields and hence the instructions must be longer than 16 bits if we use the same approach. There are a number of ways to increase the addressing range of the microprocessor without increasing the instruction length: variable instruction field, multiword instructions, multiple addressing modes, va
13、riable instruction length. We will not discuss them in detail.Data in memory data is information that is represented in memory as a code. For efficient use of the memory space and processing time, most computers provide the capability of manipulating data of different lengths and representations in
14、memory. The various different representations recognized by the processor are called its data types. The data types normally used are: bit, binary-coded decimal digit (4-bit nibble, BCD), byte (8 bits), word (2 bytes), double word (4 bytes).Some processors provide instructions that manipulate other
15、data types such as single-precision floating-point data types (32bits) and double-precision floating-point data types (64 bits). There is another type of data character data. It is also usually represented in 8 bits. Each computer terminal key and key combination (such as shift and control functions
16、) on a standard terminal keyboard has a 7-bits code defined by the American Standard Code for Information Interchange (ASCII).Type of memory In the applications of digital control system, we also concerned with the characteristics of different memory techniques. For primary memory, we need it to be
17、stored information temporarily and to be written and got information from successive or from widely different locations. This type memory is called random-access memory (RAM). In some case we do not want the information in memory to be lost. So we are willing to use special techniques to write into
18、memory. If writing is accomplished only once by physically changing connections, the memory is called a read-only memory (ROM). If the interconnection pattern can be programmed to be set, the memory is called a programmable read-only memory (PROM). If rewriting can be accomplished when it is necessa
19、ry, we have an erasable programmable read-only memory (EPROM). An electronically erasable PROM is abbreviated EEPROM.1-2 The CPUThe CPUs job is to fetch instructions from memory and execute these instructions. The structure of the CPU is shown in Fig. 3-1A-3. It has four main components: an arithmet
20、ic and logical unit (ALU), a set of registers, an internal processor bus and controller.Fig.3-1A-3 Central processing unit (CPU)These and other components of the CPU and their participation in theinstruction cycle are described in the following sections.Arithmetic and Logical Unit (ALU) The ALU prov
21、ides a wide arithmetic operations, including add, subtract, multiply, and divide. It can also perform Boolean logic operations such as AND, OR, and COMPLEMENT on binary data. Other operations, such as word compares, are also available. The majority of computer tasks involve the ALU, but a great amou
22、nt of data movement is required in order to make use of the ALU instructions.Registers A set of registers inside the CPU in used to store information.Instruction register When an instruction is fetched, it is copied into the instruction register, where it is decoded. Decoding means that the operatio
23、n code is examined and used to determine the steps of the execution sequence.Programmers model of the CPU The collection of registers that can be examined or modified by a programmer is called the programmers model of the CPU. The only registers that can be manipulated by the instruction set, or are
24、 visibly affected by hardware inputs or the results of operations upon data, are the registers represented in the model.Flag register The execution sequence is determined not only by the instruction but also by the results of the previous instructions. For example, if an addition is carried out in t
25、he ALU, data on the result of the addition (whether the result is positive, negative, or zero, for example) is stored in what is known as a flag register, status register, or condition register. If the next instruction is a conditional branch instruction, the flag word is tested in that instruction
26、to determine if a branch if a branch is required.Program counter (instruction pointer) The address of the next instruction islocated in a register called the program counter.Data registers When an instruction uses the registers to store data, the reference to the register in the instruction is calle
27、d register addressing. The reasons of making use of the internal registers to store data are that they can make the instructions shorter and make execution faster.Address registers The internal registers can also be used for the storage of address of data in memory data. In such a case, the instruct
28、ion word contains a register number (i.e. a register address). In the register is contained the address of memory data to be used in the instruction. This form of addressing is called register indirect addressing. The contents of the register are said to point to the data in memory.Internal Processo
29、r Bus The internal processor bus moves data between internal register. A bus is a set of closely grouped electric conductors that transfers data, address, and control information between functional blocks of the CPU. Data from a source register can be passed to a destination register when both are e
30、nabled onto (connected to) the bus.Controller The controller provides the proper sequence of control signals for each instruction in a program cycle to be fetched from memory. A total program cycle comprises many instruction cycle, each instruction cycle can be divided up into its component machine
31、cycles and each machine cycle comprises a number of clock cycle.In order to fetch an instruction, for example illustrated in Fig.3-1A-4, the address in the program counter is placed on the address lines of the external bus (AB) at the onset of clock cycle C . Simultaneously, using a code on the control lines of the bus (CB), the CPU informs all devices attached to the bus that an “opcode” fetch machinecycle is being executed by the CPU. The memory allows the memory address to select the memory location containing the instruction. At C2 the controlle
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 裕安區(qū)留守兒童管理辦法
- 衡水市項(xiàng)目融資管理辦法
- 裕安區(qū)扶貧資產(chǎn)管理辦法
- 西安飲用水達(dá)標(biāo)管理辦法
- 設(shè)備usb接口管理辦法
- 證監(jiān)會現(xiàn)場檢查管理辦法
- 財(cái)務(wù)部專項(xiàng)資金管理辦法
- 質(zhì)監(jiān)局財(cái)務(wù)管理暫行辦法
- 貴州省科普經(jīng)費(fèi)管理辦法
- 賈汪區(qū)職業(yè)年金管理辦法
- 擔(dān)保書怎么寫
- 2024-2025學(xué)年人教部編版八年級上語文寒假作業(yè)(一)
- 三農(nóng)村能源利用方案手冊
- 《高血壓腎損害》課件
- 腐創(chuàng)院連云路實(shí)驗(yàn)基地電力增容項(xiàng)目詢價文件
- 全國高校輔導(dǎo)員職業(yè)能力大賽基礎(chǔ)知識測試題題庫(60問)
- ICU后綜合癥護(hù)理
- 24版安全生產(chǎn)標(biāo)準(zhǔn)化(專業(yè)管理)通風(fēng)專業(yè)
- 2024用電信息采集系統(tǒng)技術(shù)規(guī)范1-3部分
- 滲濾液處理應(yīng)急預(yù)案
- 全冊背記資料-2024-2025學(xué)年七年級地理上學(xué)期湘教版
評論
0/150
提交評論