350 likes | 363 Views
Explore microprocessor components, memory organization, ALU, CU, buses, memory modules, I/O modules, data buses, and more.
E N D
Lecture 2 Microprocessor Architecture Image from: http://micro.magnet.fsu.edu/chipshots/intel/images/intel8080dielarge.jpg
Agenda • Microprocessor components • The memory • Internal organization of MPU • Introducing MARIE • Source • Homework
Von Neumann Model (Revisited) CPU Control Unit ALU Input Input Bus Output Bus Output Data Bus Main Memory Mass Memory Memory
CPU Components • Arithmetic Logic Unit (ALU) • Performs A & L ops on the data passing through it. • Addition, subtraction • Logical AND, OR, shift ops • Control Unit (CU) • Sequences the ops of the entire system • Fetch, decode, execute the successive instructions of a program stored in the memory. • Generate signals to synchronize operations • There are 3 buses used to interconnect a system • Address buses, data buses, and control buses
Memory Module • Store information (programs, data) • A program specifies the sequence of steps exec by the computer. • Each successive instruction is fetched into a special register of the CU. • Then, it is decoded and executed. • The data are processed by the ALU. • Max size of main memory (RAM,ROM) is limited by cost and by the addressing capability of the CPU. • Therefore, mass memory (disks, tapes, etc) is required.
Input/Output Modules • They are used to communicate with the outside world. • Input supplies information to the ALU, or the memory. • Keyboard, mouse, sensors, etc. • Output displays the data coming out of the ALU or executes commands. • Printer, control mechanism (motor, relay), etc.
The Buses • Data bus • Transmits data between units • Bidirectional • Bus width typically equals to microprocessor’s bit-width (i.e. 8-bit MPU has 8-bit wide data bus) • Address bus • Used to select the origin or destination of signal transmitted on another bus or line. • If there are 16 lines of address bus 64K addressable • Control bus • Synchronizes the activities of the system. • Carries status and control info both to and from the MPU • An effective bus design is crucial to the speed of the system.
A Simple Computer LED Display I/O Interface CPU Registers Memory Keyboard
The Three Registers 1 0 + 5 Data Register 1 (First operand) Operator Register (Operator) Data Register 2 (Second operand) “10” “+” “5” “15” = +
The Memory • Memory Hierarchy • Internal registers (fastest, lowest capacity) • Part of the ALU • Main memory • Mass memory (slowest, largest capacity) • Memory Access • Logically organized in “words”.
Bits.. Bytes.. Words…! • A bit represents either 0 or 1. • 1 byte = 8 bits • A logical word of: • 8-bit MPU = 1 byte • 16-bit MPU = 2 bytes • 32-bit MPU = 4 bytes • I want to know what information you could get from the word “bit”, so I decided to assign you a homework…
Memory Access Address (16 bits) “P” Bit Position 7 0 Address 65535 Write / Read Control signal Address “P” Address 0 Data (8 bits)
Take a closer look… (Intel 8080) http://www.intel.com
Internal Buses • Data bus • Bidirectional bus for transmitting data back and forth between chips within the system. • Address bus • Originates from the MPU (actually from the Program Counter register) to all devices connected to the data bus • n-bit bus = 2n words addressable • Control bus • Synchronization signals between MPU and devices connected to the bus. • i.e. read, write, interrupt, reset, acknowledgement
Architecture Category • The data bus is the bus that defines the architecture of a system. • Count the number of data buses used to communicate between the registers and the ALU
Standard Microprocessor Architecture • Efficient use of the chip area.
ALU and Accumulator • ALU performs arithmetic & logical operations. • Accumulator is a special register. • It store intermediated ALU results. • Without the accumulator, it would be necessary to write the result of each calculation to main memory, perhaps only to read right back again for the next operation.
Shift and Rotate Facilities • The shifter performs shift and rotate operations.
Flags Register • Stores exceptional conditions occurring within the ALU • C (Carry) • V (Overflow) • N (Negative) • H (Half-carry) • Z (Zero) • The contents of the flags register may then be • tested by specialized instruction, or • read on the internal data bus • Note: Status bits may be named differently from one MPU to another. There also might be more status bits (read the spec).
General-Purpose Registers • Fast memories provided that the ALU can manipulate data at high speed. • There are limited number of GPRs because of restrictions placed on the number of bits that it is reasonable to provide within an instruction. • Specific role of these registers is not defined in advance. They may be used to contain any data generated by the program. • Register-pairs facilitate to operate two of these registers simultaneously.
The Address Registers • Intended for the storage of addresses. • They are said to “create” the address bus.
Program Counter (PC) • All microprocessors contains at least the program counter. • Contains the address of the next instruction to be executed.
Stack Pointer (SP) • It is indispensable for interrupts and subroutines.
Index Register (IX) • A powerful memory addressing facility.
Disclaimer • Some diagrams in this slide are scanned and some are redrawn for teaching purpose only. They are in the book: R. Zaks, From Chips to Systems: an Introduction to Microprocessors, Sybex, 1981.