The CPU, Part 3. - PowerPoint PPT Presentation

1 / 14
About This Presentation
Title:

The CPU, Part 3.

Description:

Typically implemented using conditional logic and a state register. ... Micro-program counter register. Adder to increment MPC. ... – PowerPoint PPT presentation

Number of Views:24
Avg rating:3.0/5.0
Slides: 15
Provided by: drdougl6
Category:
Tags: cpu | part | register

less

Transcript and Presenter's Notes

Title: The CPU, Part 3.


1
The CPU, Part 3.
  • Dr. Doug L. Hoffman
  • Computer Science 330
  • Spring 2002

2
Implementing Control
  • Finite State Machine using graphical
    representation.
  • Microcode using programming representation.
  • Both can be translated into logic gates, ROMs, or
    PLAs.

3
Complete State Machine
4
Finite State Machine Controller
  • Typically implemented using conditional logic and
    a state register.
  • Outputs Datapath control lines and the next
    State ID.
  • Inputs Current State ID, OP Code, and any other
    signals needed to decide the next state
    transition.

5
Finite State Machine Controller
6
Finite State Machine Limitations
  • Only really usable for simple instruction sets.
  • Graphical representation cumbersome if you have
    100s of states.
  • Translation to logic prone to (human) errors.

7
Alternative Approach Microcode
  • Treat control signal assertion as a set of
    instructions to be executed.
  • Each microinstruction represents the control
    signals for a specific state.
  • Each microinstruction must also specify
    sequencing what instruction to execute next.

8
Microinstruction Sequencing
  • Sequential increment address and execute the
    next ?instruction.
  • Fetch start of next MIPS instruction.
  • Dispatch conditional transition to another
    ?instruction (state).

9
Microcode Controller
  • Read-only (at least at run time) memory to hold
    the ?code.
  • Micro-program counter register.
  • Adder to increment MPC.
  • Address selection logic to translate OP codes.
  • Sequence control for Dispatch commands.

10
Microcode Controller
Storage may be ROM or writable memory store
loaded at system initialization
11
Exceptions Interrupts
  • Interrupts are caused signals from outside the
    CPU. Typically used for I/O.
  • Exceptions are caused by unexpected events within
    the CPU. Arithmetic overflow, unimplemented
    instructions, traps.

12
Handling Exceptions
  • Undefined Instructions typically causes
    transfer of control to an OS level routine.
  • Arithmetic Overflow causes instruction to be
    aborted (MIPS). Need mechanism to allow program
    to trap overflow.

13
Handling Exceptions
14
Handling Exceptions
Write a Comment
User Comments (0)
About PowerShow.com