270 likes | 366 Views
Computer Architecture And Organization. UNIT-II. General System Architecture. Contents. Store program control concept Flynn’s classification of computers (SISD, MISD, MIMD) Multilevel viewpoint of a machine: digital logic, micro architecture, ISA, operating systems, high level language
E N D
Computer Architecture And Organization UNIT-II General System Architecture
Contents • Store program control concept • Flynn’s classification of computers (SISD, MISD, MIMD) • Multilevel viewpoint of a machine: digital logic, micro architecture, ISA, operating systems, high level language • Structured organization; CPU, caches, main memory, secondary memory units & I/O;
What is a Computer? • A device that accepts data, processes the data in accordance with a stored program, generates results, and usually consists of input, output, storage, arithmetic, logic, and control units
Random-access memory (RAM) Central processing unit (CPU) Input devices Input-output processor (IOP) Output devices Block diagram of a digital computer Block Diagram of Digital Computer
Block Diagram of Digital Computer • A digital computer consists of a number of processors interconnected with memory and Input/Output devices • A Processor or CPU (Central Processing Unit) fetches instructions from memory, and executes them one after another • A Memory is where programs and data are stored • I/O devices allow for interaction between users and computer (printers, keyboard, mice… )
Computer Architecture And Organization • Organization is how features are implemented • physical aspects of computer systems. • attributes of a system visible to a programmer: instruction set, data types, I/O mechanisms, addressing of memory • e.g., circuit design, control signals, memory types. • Architecture is those attributes visible to the programmer • Logical aspects of system as seen by the programmer. • hardware details transparent to a programmer: operational units and their interconnections, peripheral interfaces, memory technology • E.g., instruction sets, instruction formats, data types, addressing modes.
Computer architecture = Instruction set architecture + Machine organisation
Instruction Set Architecture • Instruction set architecture is the attributes of a computing system as seen by the assembly language programmer or compiler. This includes • Instruction Set (what operations can be performed?) • Instruction Format (how are instructions specified?) • Data storage (where is data located?) • Addressing Modes (how is data accessed?) • Exceptional Conditions (what happens if something goes wrong?)
Machine Organization • Machine organization is the view of the computer that is seen by the logic designer. This includes • Implementation, Capabilities & performance characteristics of functional units (e.g., registers, ALU, shifters, etc.). • Interconnections of these units • Information flows between these units • Control of information flow i.e.Logic and means by which such information flow is controlled • Typically the machine organization is designed to meet a given instruction set architecture.
Why study computer architecture and organization? • Design better programs, including system software such as compilers, operating systems, and device drivers. • Optimize program behavior. • Evaluate (benchmark) computer system performance.
Computer Evolution • First Generation: Vacuum Tubes • ENIAC (Electronic Numerical Integrator and Computer) • John Mauchly and John Eckert (1943-1946) • Decimal number system • Memory: 20 registers • 30 tons, 1500 Sq Ft, 18,000 vacuum tubes • 5000 additions per second • John von Neumann helped crystallize the idea; proposed the von Neumann Machine
Computer Evolution • EDVAC (Electronic Discrete Variable Automatic Computer) • Stored-program computer (1945-1952) • Prototype for general-purpose computers • Binary data representation • Main memory (data and instructions) • ALU & CU • Input/Output
The Von Neumann machine The model for almost all conventional processor architectures. Comprises: • A Memory containing a numbered sequence of cells (words) referenced by their addresses (Linear Store) • An ALU (Arithmetic Logic Unit) to perform operations (program steps) using temporary storage cells (registers) • A Control Unit to ensure an ordered sequence of instructions is presented to the ALU
The Stored Program Concept • The stored program concept was proposed about fifty years ago; to this day, it is the fundamental architecture • Von Neumann’s proposal was to store the program instructions right along with the data.
• • • Memory • (k x m) array of stored bits (k is usually 2n) • Address • unique (n-bit) identifier of location • Contents • m-bit value stored in location • Basic Operations: • LOAD • read a value from a memory location • STORE • write a value to a memory location 0000 0001 0010 0011 0100 0101 0110 1101 1110 1111 00101101 10100010
Interface to Memory • How does processing unit get data to/from memory? • MAR: Memory Address Register • MDR: Memory Data Register • To read a location (A): • Write the address (A) into the MAR. • Send a “read” signal to the memory. • Read the data from MDR. • To write a value (X) to a location (A): • Write the data (X) to the MDR. • Write the address (A) into the MAR. • Send a “write” signal to the memory. MEMORY MAR MDR
Processing Unit • Functional Units • ALU = Arithmetic and Logic Unit • could have many functional units.some of them special-purpose(multiply, square root, …) • Registers • Small, temporary storage • Operands and results of functional units • Word Size • number of bits normally processed by ALU in one instruction • also width of registers PROCESSING UNIT ALU TEMP
ALU and the data-path A+B • the internal part of the CPU is also called data-path • it consists of registers and the ALU • The ALU performs simple arithmetical/logic operations (ADD, AND,OR) • It takes its operands from the registers and store the result back in them • The process of reading operand and storing result back is called data-path cycle • The faster the data-path cycle is the faster the computer runs registers A B input register A B ALU output register A+B
Control Unit • Orchestrates execution of the program • Instruction Register (IR) contains the current instruction. • Program Counter (PC) contains the addressof the next instruction to be executed. • Control unit: • reads an instruction from memory • the instruction’s address is in the PC • interprets the instruction, generating signals that tell the other components what to do • an instruction may take many machine cycles to complete CONTROL UNIT PC IR
Instruction • The instruction is the fundamental unit of work. • Specifies two things: • opcode: operation to be performed • operands: data/locations to be used for operation • An instruction is encoded as a sequence of bits. (Just like data!) • Often, but not always, instructions have a fixed length,such as 16 or 32 bits. • Control unit interprets instruction:generates sequence of control signals to carry out operation. • Operation is either executed completely, or not at all. • A computer’s instructions and their formats is known as itsInstruction Set Architecture (ISA).
Input and Output • Devices for getting data into and out of computer memory • Each device has its own interface,usually a set of registers like thememory’s MAR and MDR • Some devices provide both input and output • disk, network • Program that controls access to a device is usually called a driver.