Computer Organization and Architecture
Total Page:16
File Type:pdf, Size:1020Kb
Computer Organization and Architecture Dr.Intisar Al-Shummari Al-Isra Private University College of Science and Information Technology Computer Science Department Text Book: Computer Organization and Architecture, William Stalling, 6th edition, 2004 Internet Resources- Web site for book http://williamstallings.com/COA6e.html ١ Chapter 1 Introduction Architecture & Organization Architecture is those attributes visible to the programmer Instruction set, number of bits used for data representation, I/O mechanisms, addressing techniques. Architecture issue: e.g. Is there a multiply instruction? Organization is how features are implemented (i.e h/w details transparent to the programmer) Control signals, interfaces, memory technology. Organization issue: e.g. Is there a hardware multiply unit or is it done by repeated addition? All Intel x86 family share the same basic architecture The IBM System/370 family share the same basic architecture This gives code compatibility At least backwards Organization differs between different versions However, the relation between architecture and organization is very close, and often not distinguishable. Introduction Computers are used in scientific calculations, commercial and business data processing, air traffic control, space guidance, the educational field, and many other areas. The most striking property of a digital computer is its generality. *It can follow a sequence of instructions, called a program, that operates on given data. • The user can specify and change programs and/or data according to the specify need. ٢ Structure & Function Structure is the way in which components relate to each other Function is the operation of individual components as part of the structure The Computer is a complex system, which can be recognized in a hierarchical nature. It consists of a set of interrelated subsystems. Each of them is in turn, hierarchic in its structure. This nature is essential for both design and description. ♦There are two approaches for description: 1- Bottom-up and 2- Top-down. The later is clearer and will be adopted here. Function All computer functions are: Data processing Data storage Data movement Control Data can move in and out of the three functions under the control function management as shown diagrammatically below Functional view Functional view of the Computer System ٣ Operations Data movement: Transferring data from one peripheral to another e.g. keyboard to screen Data Storage : Data transferred from external environment to computer (read) or visa versa (write). e.g. Internet download to disk Processing from/to internal storage e.g. updating bank statement Processing from storage to I/O: Processing en-route between storage and external environment. e.g. printing a bank statement ٤ Structure - Top Level The Computer is an entity that can interact in some fashion with its external environment, simply as shown below A block diagram of the digital computer is shown in the following figure. The memory unit stores programs as well as input, output, and intermediate data. The processor unit performs arithmetic and other data-processing tasks as specified by a program. The control unit supervises the flow of information between the various units. The control unit retrieves the instructions, one by one, from the program which is stored in memory. A top level view of the Computer system shows four main structural components: Central Processing Unit (CPU): controls the operation of the computer and performs its data processing functions – called processor. Main Memory MM: Stores data and Programs. Input / output, I/O: Moves data between the computer and its external environment. System interconnection: Some mechanism that provides for communication among CPU, MM and I/O. ٥ Structure - The CPU Most interesting of all parts is the CPU which consists of: Control Unit, CU: Controls the computer operations. Arithmetic and Logic Unit, ALU: Performs data processing functions. Internal Registers: Provide internal storage to CPU. Internal connection facilities: Some mechanisms that provide communication among the CU, ALU &Registers. Each Component will be examined in details later. However, several approaches of the control unit implementation is possible, but most common is the micro-programmed implementation. This can be depicted in the following diagram, which will be discussed also in this course. ٦ Structure - The Control Unit For this scheme , CU consists of : Sequential Logic. Control Unit Registers and Decoders. Control memory. ٧ Chapter 2 Computer Evolution and Performance ENIAC background : Electronic Numerical Integrator And Computer First General Purpose Electronic Digital Computer. Designed by: John Eckert and John Mauchly At: University of Pennsylvania Used for developing Range and Trajectory tables for weapons (may take few days for single value by one person manually) Started 1943 Finished 1946 Too late for war effort Used until 1955 (operates under the Army Ballistic Research Laboratory, BRL management) ENIAC - details Decimal machine (not binary): i.e. number representations and operations were performed in decimal. 20 accumulators of 10 digits Programmed manually by switches 18,000 vacuum tubes 30 tons 15,000 square feet 140 kW power consumption 5,000 additions per second ENIAC – draw backs (disadvantages) Lots of Failures Entering and altering data and programs was manual no storage. Programmed manually by switches setting or plugging and unplugging cables extremely tedious. von Neumann/ Turing (proposed as: Electronic Discrete Variable Computer, EDVAC) Prototype of all Subsequent General Purpose Computers. Introduced the Stored Program concept Developed at: Princeton Institute for Advanced Studies IAS Computer Completed 1952 Consists of: Main memory storing programs and data ALU operating on binary data Control unit interpreting instructions from memory and executing them Input and output equipment operated by control unit ٨ Structure of von Nuemann machine IAS – details (Features) Memory: 1000 locations (words) x 40 bits per word Binary number (data) 2 x 20 bit instructions • i.e. 8 bits for operation code (Opcode) • and 12 bits for Address of register The control unit operates by fetching instructions from the memory and executing them one at a time. IAS – Memory Formats ٩ Structure of IAS - detail A detailed structure diagram of IAS Computer is shown next and has the followings Set of registers: (storage in CPU) Memory Buffer Register, MBR: Contains the word to be stored in memory or used to receive a word from memory. Memory Address Register, MAR: Specifies the address in memory of the word to be written from or read into the MBR. Instruction Register, IR: Contains the 8 bit Opcode instruction Being executed. Instruction Buffer Register, IBR:Holds temporarily the right hand inst. From a word in memory. Program Counter, PC: Holds the address of the next instruction-pair To be fetched from memory. Accumulator, AC and Multiplier Quotient, MQ: Employed to hold temporarily operands and result of ALU. ١٠ Fetch- Execute Cycle The system works by a cycle called Fetch-Execute cycle. i.e ⌧ Each instruction is brought first from the main memory to the IR (fetch cycle). Then ⌧ It is executed after being decoded (execute cycle). as shown below All instructions are taken sequentially one after the other unless a jump is executed. IAS instruction set For the IAS computer, there are 21 instructions which fall into 5 categories. i.e. ⌧ Data Transfer: moves data between memory and ALU registers or between two ALU registers. e.g. LOAD MQ : transfer contents of MQ to AC (00001010) LOAD MQ, M(X) : transfer contents of mem. loc. X to MQ (00001001) STOR M(X) : transfer contents of AC to mem. loc. X (00100001) LOAD M(X) : transfer M(X) to AC (00000001) LOAD –M(X) : transfer -M(X) to AC (00000010) LOAD |M(X)| : transfer absolute value of M(X) to AC (00000011) LOAD - |M(X)| : transfer -|M(X)| to AC (00000100) ⌧ Unconditional branch: changes the execution sequence. e.g. JUMP M(X, 0:19) :Take next inst from left half of M(x) JUMP M(X, 20:39) :Take next inst from right half of M(x) Conditional branch: branching depending on a condition . JUMP +M(X, 0:19) :if number in the AC is non-ve, take next inst. from left half of M(X) JUMP +M(X, 20:39) :if number in the AC is non-ve, take next inst. from right half of M(X) ١١ ⌧ Arithmetic: operations performed by ALU. e.g. ADD M(X) : add M(X) to AC; put the result in AC ADD |M(X)| : add |M(X)| to AC; put the result in AC SUB M(X) : subtract M(X) from AC; put the result in AC . ⌧ Address Modify: change address according to some calculations in ALU, e.g. STOR M(X, 8:19) :Replace left address at M(X) by 12 right most bits in AC. STOR M(X, 28:39) :Replace right address at M(X) by 12 right most bits in AC. Commercial Computers 1947 - Eckert-Mauchly Computer Corporation UNIVAC I (Universal Automatic Computer) US Bureau of Census 1950 calculations Became part of Sperry-Rand Corporation Late 1950s - UNIVAC II Faster More memory IBM Punched-card processing equipment 1953 - the 701 IBM’s first stored program computer Scientific calculations 1955 - the 702 Business applications Lead to 700/7000 series , which established IBM as the domination computer manufacturer. Transistors Replaced vacuum tubes (1948) Smaller Cheaper Less heat dissipation Solid State device Made from Silicon (Sand) Invented 1947 at Bell Labs William Shockley et al. Transistor