CHAP_8.pdf - CS 224 Computer Organization S.KHABET CHAPTER...

Info icon This preview shows pages 1–11. Sign up to view the full content.

View Full Document Right Arrow Icon
1 CHAPTER 8: Central Processing Unit (CPU) Outline Introduction General Register Organization Stack Organization Instruction Formats Addressing Modes CS 224: Computer Organization S.KHABET
Image of page 1

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
2 Major Components of CPU Storage Components Registers Flags Execution (Processing) Components Arithmetic Logic Unit (ALU) Transfer Components Bus Control Components Control Unit Registers Flags ALU Control Unit
Image of page 2
3 Registers In Basic Computer, there is only one general purpose register, the Accumulator (AC) In modern CPUs, there are many general purpose registers It is advantageous to have many registers Transfer between registers within the processor are relatively fast Going “off the processor” to access memory is much slower How many registers will be the best ?
Image of page 3

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
4 General Register Organization MUX SELA { MUX } SELB ALU OPR R1 R2 R3 R4 R5 R6 R7 Input 3 x 8 decoder SELD Load (7 lines) Output A bus B bus Clock
Image of page 4
5 Operation of Control Unit The control unit Directs the information flow through ALU by Selecting various Components in the system Selecting the Function of ALU Example: R1 R2 + R3 [1] MUX A selector (SELA): BUS A R2 [2] MUX B selector (SELB): BUS B R3 [3] ALU operation selector (OPR): ALU to ADD [4] Decoder destination selector (SELD): R1 Out Bus Control Word SELA SELB SELD OPR 3 3 3 5
Image of page 5

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
6 Operation of Control Unit Encoding of register selection fields Binary Code SELA SELB SELD 000 Input Input None 001 R1 R1 R1 010 R2 R2 R2 011 R3 R3 R3 100 R4 R4 R4 101 R5 R5 R5 110 R6 R6 R6 111 R7 R7 R7
Image of page 6
7 ALU Control (1) Encoding of ALU Microoperations OPR Select Operation Symbol 00000 Transfer A TSFA 00001 Increment A INCA 00010 ADD A + B ADD 00101 Subtract A - B SUB 00110 Decrement A DECA 01000 AND A and B AND 01010 OR A and B OR 01100 XOR A and B XOR 01110 Complement A COMA 10000 Shift right A SHRA 11000 Shift left A SHLA
Image of page 7

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon