1 / 39

Machine Organization

Machine Organization. CHAPTER 3. Lesson Outcomes. CPU /Microprocessor architecture CPU processing methods Pipelining Superscalar RISC Multiprocessing Instruction Cycle Instruction Sets and Types. CPU /Microprocessor Architecture. What is the central processing unit (CPU)?

pei
Download Presentation

Machine Organization

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Machine Organization CHAPTER 3

  2. Lesson Outcomes • CPU /Microprocessor architecture • CPU processing methods • Pipelining • Superscalar • RISC • Multiprocessing • Instruction Cycle • Instruction Sets and Types

  3. CPU /Microprocessor Architecture

  4. What is the central processing unit (CPU)? It interprets and carries out the basic instructions that operate a computer. contained on a single integrated circuit called a processor (micro) that is located on the motherboard. contains two unit: Control Unit (CU) and Arithmetic Logic Unit (ALU). CPU/ Microprocessor Architecture

  5. What is a microprocessor? also called the CPU A microprocessor or processor is the heart of the computer or any computing device It is a semiconductor chip which can be programmed to do various functions and performs all the computational tasks, calculations and data processing etc. inside the computer. CPU/ Microprocessor Architecture

  6. Today, there are several different manufactures of computer processors. However, Intel and AMD are the leaders in the PC market Example of microprocessor are Intel Core i7-3770K Quad-Core Processor, AMD FX-8120 8-Core CPU/ Microprocessor Architecture

  7. The processor contains four key components: CPU Component

  8. The CPU deals with each instruction it is given in a series of steps. Each step is repeated for each instruction. This series of steps is called the machine cycle. machine cycle involves: fetching an instruction from main memory decoding the instruction (Translate the program instruction into the commands that computer can process) executing the instruction (Carry out the commands one after another ) Store the result into main memory CPU/ Microprocessor

  9. CPU/ Microprocessor

  10. It works with the central processing unit (CPU) to instruct, maintain and control the flow of information. CU is the “brain” of the microprocessor. It contains all that the microprocessor microprograms Microprogram is a set of microinstructions in a CPU, used to implement machine instructions. They reside in an internal ROM that cannot be accessed by the user. It contains the entire instruction set which are permanently embedded by the manufacturer). CU will controls and interpretsthe execution of instructions, by following a sequence of actions that corresponds to fetch-execute instruction cycle Control Unit (CU)

  11. To determine which instruction to be executed, CU reads the contents of the program counter (PC)/ instruction pointer (IP). The instructions are then decoded by the Instruction Decoderin the CU. Instructions are executed sequentially unless told otherwise CU has a Memory Management Unitto supervise the fetching of instructions and data from memory. The I/O interface is also part of the control unit. Control Unit (CU)

  12. Instruction Decoder Is properly part of the CU  that decodes instructions that are sent to the microprocessor. When an instruction is fetched from the memory, the instruction is then sent to the instruction decoder to be decoded or interpreted. Control signals will then be issued to perform the necessary operation. The interpretation process is called instruction decoding. Control Unit (CU)

  13. ALU is a digital circuit that performs many different arithmetic and logical operation on input data. It performs these operations as directed by the CU. All computation performed by the microprocessor is done by the ALU In short ALU performs :  arithmetic operations such as addition and subtraction, division and multiplication  all logic operations such as AND, OR, XOR etc Arithmetic Logic Unit (ALU)

  14. Arithmetic Logic Unit (ALU) Four Components/ Structure on ALU:

  15. Component / Structure of ALU

  16. A single, permanent storage location within the CPU used for particular defined purpose. Used to hold binary value (shorten using Hexadecimal) temporarily for Storage, Manipulation, and/or Simple calculations. Register is the basic working components of the CPU. Each register serves a particular purpose. Registers

  17. A register may hold: Registers

  18. Four primary operations by registers: Registers

  19. Control Unit contains several important register :- Instruction Register (IR) Holds the actual/current instruction being executed by computer. Program Counter Both a counter and a register. The address in the program counter register is always the address of the next instruction to be executed. The counter portion of the device generates sequential address numbers. Registers

  20. Program Counter (cont) When the current instruction is finished, It then increments, (adds 1 to the address) It then generate and puts the number (new address) in the counter register (PC). the program counter generates an address and places it on the address bus. When the current instruction is finished, the above steps are repeated. Thus, the program counter continually generates sequential address. Registers

  21. Memory Address Register (MAR) Holds the address of a memory location. Memory Data Register (MDR) Also known as Memory Buffer Register (MBR). Holds data/instruction value that is being stored to or retrieved from the memory location currently addressed by the memory address register. Registers

  22. Status Register (Flags) Allow computers to keep track of special condition such as: Registers

  23. Status Register (Flags) - cont The Status register contains individual flags (1 bit for each flag) Status flags indicate the outcome of execution of arithmetic and logical operations The control unit set (1) or reset (0) flags as a result of conditions that arise during the execution of instructions. Registers

  24. The system clock is a device that producesperiodic sequence of pulses to control the timing of all computer operations. These pulses define machine cycles. During each machine cycle, some activity occurs, such as the execution of a micro-instruction. The interval between corresponding edges of two consecutive pulses is called the clock cycle time. The pace of the clock or the clock speed is measured by the number of cycles (ticks) per second. System Clock

  25. Each tick is a clock cycle that determines when the next step in the machine cycle will occur MHz – one million ticks per second of system clock theoretically, capable of executing one million instructions per second GHz – one billion ticks per second of system clock Therefore the faster the clock speed, the more instructions the processor can execute per second. In some cases several instructions can be executed in a single clock tick. System Clock

  26. an instruction is fetched by the Control Unit during instruction time (i-time) and executed by the ALU during execution time (etime) together, both steps make up a single machine cycle & the process is repeated until the program is finished the clock drives the clock drives the process by generating pulses at precisely timed intervals

  27. CPU processing methods

  28. CPU Processing Methods • In this topic, you will be introduced to the different and interrelated CPU processing methods. • The common goal is to increase the performance of the CPU. Among the methods are: • Pipelining • Superscalar • CISC and RISC • Multiprocessing

  29. CPU Processing Methods • Performance – number of instructions executed in a given amount of time. • To increase computer performance, these techniques are used: • Separating the fetch unit / execute unit • Allows independent, concurrent operation of the two units of the fetch-execute cycle • Overlapping between the fetch-execute cycles of sequences of instructions (pipelining) • This reduce the average time needed to complete an instruction. • Executing more than one instruction in a clock cycle (superscalar)

  30. CPU Processing Methods • Separating the fetch unit/ execute unit • Previously – instruction cycles are executed one by one. A new instruction enters the instruction cycle after the previous instruction has completed execution. • In the instruction cycle, two phases are involved – fetchphase and execute phase.  • To increase performance, it is possible to separate the two phase and perform them concurrently.

  31. CPU Processing Methods • Fetch unit - retrieves and decodes the instructions • Fetches the instructions in parallel • Holds them in a buffer until it can be decoded and executed. • How many instructions in a buffer? • Size of instruction • Width of memory bus • Size of buffer

  32. CPU Processing Methods • Execute unit – performs actual instruction execution • Contains ALU and a portion of CU • Identifies and controls the steps that comprise the execution part of the instruction.

  33. CPU Processing Methods (pipelining) • Overlapping the instruction cycle of instructions. • fetch the next instruction while executing the current instruction.

  34. Laundry Example Ann, Brian, Cathy, Dave each have one load of clothes to wash, dry, and fold Washer takes 30 minutes Dryer takes 40 minutes “Folder” takes 20 minutes A B C D Concept of Pipelining

  35. Sequential laundry takes 6 hours for 4 loads If they learned pipelining, how long would laundry take? A B C D Without Pipeline Concept 6 PM Midnight 7 8 9 11 10 Time 30 40 20 30 40 20 30 40 20 30 40 20

  36. Pipelined laundry takes 3.5 hours for 4 loads Multiple tasks operating simultaneously using different resources 30 40 40 40 40 20 A B C D With Pipeline Concept 6 PM Midnight 7 8 9 11 10 Time T a s k O r d e r

  37. CPU Processing Methods - Superscalar • Executing more than one instruction in a clock cycle. • Process more than one instruction per clock cycle • Instructions processed in parallel, with an average rate of more than 1 instruction per clock cycle through multiple execution units

  38. Process more than one instruction per clock cycle Separate fetch and execute cycles as much as possible Buffers for fetch and decode phases Parallel execution units Superscalar Processing

  39. Scalar vs. Superscalar Processing With pipelining

More Related