研习报告Computer Control Technology
此刻的英文A computer structure and function
This ction 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 computer simply executes binary-coded results. For a general-purpo 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.A-1.
The 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 write data to an external device. This is carried out using the input/output system.
The external processor bus is a t of electric conductors that carries data, address and control inform
ation between the other computer elements.水瓶座男人
The memory
The memory of a computer consists of a t of quentially 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 reprent 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 accesd to obtain each data word.
In order to u the contents of memory, the processor must fetch the contents 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 addresd memory location to be read by the processor. The process of fetching the contents of a memory location does not alter the contents of that location.
Instructions in memory Instructions stored in memory are fetched by the CPU and unless program branches occur, they are executed in the quence they appear in memory. An instruction written as
a binary pattern is called 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.
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 instruction has a unique opcode), operand address, immediate operands, branch address.
In a real instruction t there are many more instructions. There is also a much large number of memory locations in which to s
tore instructions and data. In order to increa the number of memory locations, the address fields and hence the instructions must be longer than 16 bits if we u the same approach. There are a number of ways to increa the addressing range of the microprocessor without increasing the instruction length: variable instruction field, multiword instructions, multiple addressing modes, variable instruction length. We will not discuss them in detail.
Data in memory Data is information that is reprented in memory as a code. For efficient u of the memory space and processing time, most computers provide the capability of manipulating data of d
ifferent lengths and reprentations in memory. The various different reprentations recognized by the processor are called its data types. The data types normally ud 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 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 reprented in 8 bits. Each computer terminal key and key combination (such as shift and control functions) 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 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 ca we do not want the information in memory to be lost. So we are willing to u special techniques to write into 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 t, the memory is called a programmable read-only memory (PROM). If rewriting can be accomplished whe
n it is necessary, we have an erasable programmable read-only memory (EPROM). An electronically erasable PROM is abbreviated EEPROM.
The CPU
The CPU’s job is to fetch instructions from memory and execute the instructions. The structure of the CPU is shown in Fig. 3-1A-3. It has four main components: an arithmetic and logical unit (ALU), a t of registers, an internal processor bus and controller.
Fig.3-1A-4 A timing diagram for “operation-code fetch”
The and other components of the CPU and their participation in the instruction cycle are described in the following ctions.
Arithmetic and Logical Unit (ALU) The ALU provides a wide arithmetic operations, including add, subtract, multiply, and divide. It can also perform Boolean logic operations such as AND, OR, and COMPLEME
NT on binary data. Other operations, such as word compares, are also available. The majority of computer tasks involve the ALU, but a great amount of data movement is required in order to make u
of the ALU instructions.
Registers A t of registers inside the CPU in ud 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 operation code is examined and ud to determine the steps of the execution quence.
Programmer’s model of the CPU The collection of registers that can be examined or modified by a programmer is called the programmer’s model of the CPU. The only registers that can be manipulated by the instruction t, or are visibly affected by hardware inputs or the results of operations upon data, are the registers reprented in the model.
Flag register The execution quence 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 the 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 to determine if a branch if a branch is required.
微信图片
挂钩窗帘怎么穿钩Program counter (instruction pointer) The address of the next instruction is located in a register called the program counter.
Data registers When an instruction us the registers to store data, the reference to the register in the instruction is called register addressing. The reasons of making u 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 ud for the storage of address of data in memory data. In such a ca, the instruction word contains a register number (i.e. a register address). In the register is contained the address of memory data to be ud 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 Processor Bus The internal processor bus moves data between internal register. A bus is a t of cloly grouped electric conductors that transfers data, address, and control information between functional blocks of the CPU. Data from a source register can be pasd to a destination register when both are enabled onto (connected to) the bus.
Controller The controller provides the proper quence of control signals for each instruction in a pr
ogram cycle to be fetched from memory. A total program cycle compris many instruction cycle, each instruction cycle can be divided up into its component machine cycles and each machine cycle compris a number of clock cycle.
Fig. 3-1A-4 A timing diagram for “opera
tion-code fetch”
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 ont of clock cycle C1. 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 machine cycle is being executed by the CPU. The memory allows the memory address to lect the memory location containing the instruction. At C2 the controller places a “read” command onto the control bus which allows the memory data to be placed onto the data bus. The controller then gates the data into the instruction register and removes the read command from the control bus in C3. At C4, the controller removes the address from the address bus and begins to decode the operation-code portion of the instruction to e what steps are required for execution. The decoding operation may take veral more clock cycle at the end of which the “opcode fetch” machine cycle.
External attention requests It is often necessary to stop the normal instruction processing quence. One type of external attention request is the ret request. In the ca of an unrecoverable error, a computer system may be required to ret itlf. This would have the effect of initializing all important registers in the system and staring instruction execution from a standard memory location-usually location 0.
An input that is more commonly activated during the normal cour of events is the interrupt request. An interrupt request signal from an external device can cau the CPU to immediately execute a rvice subroutine which carries out the necessary actions. After completing the rvice subroutine, the processor will continue the task from which it was originally interrupted.
The third type of input is the bus request, or direct memory access (DMA) request. It is possible to have a terminal interface that stores up all the characters in a line of text until it receives a “carriage return.” Then the interface requests the u of the system bus, at which time the complete line of data is transferred to memory to memory as fast as possible. In this way the processor simply becomes inactive until the transfer is completed.
Bus
The bus is the most important communication system in a computer system. Under control of the CPU, a data source device and a data destination device are “enabled” onto (equivalent to being connected to) the bus wires for a short transmission.
External processor bus The internal processor described in Sec. is connected to the external processor bus by a t of bus buffers located on the microprocessor integrated circuit.
System bus The microcomputer board can communicate with other boards by connecting its bus to an external system bus through a connector.
Computer Input and Output
A t of registers external to the CPU is associated with what is known as the input/ou
tput (I/O) system. The I/O system is connected to the external processor bus using control, address, and data bus through an I/O registers in an interface. There are basically two ways that are ud to address I/O register.
行政前台岗位职责In the first method, called I/O-mapped input/output, the operation code itlf has special I/O instructions that address a numbered register in the interface called an I/O port.
The cond method of addressing I/O registers gives the I/O ports address that lie within the memory address range of the CPU. This is called memory-mapped I/O. Of cour there must not be any memory locations at the same address as I/O locations.
One of the benefits of the memory-mapped approach is that the full range of memory addressing modes is available to the addressing of I/O registers.
Fundamentals of Computer and Network
Organization of Computer System
A computer is a fast and accurate symbol manipulating system that is organized to accept, store, and process data and produce output results under the direction of a stored program of instructions. This ction explains why a computer is a system and how a computer system is organized. Key elements in a computer system include input, processing, and output devices. Let's examine each component of the system in more detail.
习以为常近义词Input Devices Computer systems u many devices for input purpo. Some INPUT DEVICES allow direct human/machine communication, while some first require data to be recorded on an input
medium such as a magnetizable material. Devices that read data magnetically recorded on specially coated plastic tapes or flexible or floppy plastic disks are popular. The keyboard of a workstation connected directly to (or ONLINE to) a computer is an example of a direct input device. Additional direct input devices include the mou, input pen, touch screen, and microphone. Regardless of the type of device ud, all are components for interpretation and communication between people and computer systems.
Central Processing Unit The heart of any computer system is the central processing unit (CPU). There are three main ctions found in the CPU of a typical personal computer system: the primary storage ction, the arithmetic-logic ction, and the control ction. But the three ctions aren't unique to personal computers. They are found in CPUs of all sizes.
Output Device Like input units, output device are instruments of interpretation and communication between humans and computer system of all size. The device take output results from the CPU in machine-coded form and convert them into a form that can be ud (a) by people (e.g. a printed and /or displayed report) or (b) as machine input in another processing cycle.
In personal computer systems, display screen and desktop printers are popular output devices. Larg
er and faster printers, many on-line workstations, and magnetic tape drives commonly found in large systems.
The input/output and condary storage units