Lecture 15: Basic CPU Design

Slides:



Advertisements
Similar presentations
Control path Recall that the control path is the physical entity in a processor which: fetches instructions, fetches operands, decodes instructions, schedules.
Advertisements

Lab Assignment 2: MIPS single-cycle implementation
The Processor: Datapath & Control
1  1998 Morgan Kaufmann Publishers Chapter Five The Processor: Datapath and Control.
Lec 17 Nov 2 Chapter 4 – CPU design data path design control logic design single-cycle CPU performance limitations of single cycle CPU multi-cycle CPU.
Preparation for Midterm Binary Data Storage (integer, char, float pt) and Operations, Logic, Flip Flops, Switch Debouncing, Timing, Synchronous / Asynchronous.
Chapter Five The Processor: Datapath and Control.
Lecture 16: Basic CPU Design
1 Lecture 14: FSM and Basic CPU Design Today’s topics:  Finite state machines  Single-cycle CPU Reminder: midterm on Tue 10/24  will cover Chapters.
The Processor Andreas Klappenecker CPSC321 Computer Architecture.
The Processor Data Path & Control Chapter 5 Part 1 - Introduction and Single Clock Cycle Design N. Guydosh 2/29/04.
Lecture 24: CPU Design Today’s topic –Multi-Cycle ALU –Introduction to Pipelining 1.
COSC 3430 L08 Basic MIPS Architecture.1 COSC 3430 Computer Architecture Lecture 08 Processors Single cycle Datapath PH 3: Sections
Lec 15Systems Architecture1 Systems Architecture Lecture 15: A Simple Implementation of MIPS Jeremy R. Johnson Anatole D. Ruslanov William M. Mongan Some.
Computer Organization CS224 Fall 2012 Lesson 22. The Big Picture  The Five Classic Components of a Computer  Chapter 4 Topic: Processor Design Control.
ECE 445 – Computer Organization
Lecture 16: Basic Pipelining
CPU Overview Computer Organization II 1 February 2009 © McQuain & Ribbens Introduction CPU performance factors – Instruction count n Determined.
Datapath and Control AddressInstruction Memory Write Data Reg Addr Register File ALU Data Memory Address Write Data Read Data PC Read Data Read Data.
COM181 Computer Hardware Lecture 6: The MIPs CPU.
May 22, 2000Systems Architecture I1 Systems Architecture I (CS ) Lecture 14: A Simple Implementation of MIPS * Jeremy R. Johnson Mon. May 17, 2000.
Computer Architecture Lecture 6.  Our implementation of the MIPS is simplified memory-reference instructions: lw, sw arithmetic-logical instructions:
Exam-like questions.
1 Lecture 13: Sequential Circuits, FSM Today’s topics:  Sequential circuits  Finite state machines  Single-cycle CPU Reminder: midterm on Tue 10/20.
CS161 – Design and Architecture of Computer Systems
CS161 – Design and Architecture of Computer Systems
Computer Architecture
IT 251 Computer Organization and Architecture
Lecture 15: Basic CPU Design
Lecture 16: Basic Pipelining
Introduction CPU performance factors
Lecture 17: Pipelining Today’s topics: 5-stage pipeline Hazards
Computer Organization & Design Microcode for Control Sec. 5
Morgan Kaufmann Publishers
MIPS Processor.
Processor (I).
CS/COE0447 Computer Organization & Assembly Language
Chapter Five.
Latches and Flip-flops
MIPS processor continued
COSC 2021: Computer Organization Instructor: Dr. Amir Asif
CSCE 212 Chapter 5 The Processor: Datapath and Control
Lecture 3 CPU - Data Path for Branches
Processor: Finite State Machine & Microprogramming
Lecture 16: Basic Pipelining
Lecture 13: Sequential Circuits, FSM
Single-Cycle CPU DataPath.
Lecture 13: Sequential Circuits, FSM
CS/COE0447 Computer Organization & Assembly Language
CS/COE0447 Computer Organization & Assembly Language
MIPS Processor.
Datapath & Control MIPS
Lecture: Pipelining Hazards
Levels in Processor Design
Lecture 17: Pipelining Today’s topics: 5-stage pipeline Hazards.
The Processor Lecture 3.2: Building a Datapath with Control
Lecture 17 Logistics Last lecture Today HW5 due on Wednesday
The Processor Lecture 3.1: Introduction & Logic Design Conventions
Lecture 17: Pipelining Today’s topics: 5-stage pipeline Hazards.
Datapath: Instruction Store/Fetch & PC Increment
Systems Architecture I
Pipelining: Basic Concepts
Chapter Four The Processor: Datapath and Control
Systems Architecture I
Lecture 17 Logistics Last lecture Today HW5 due on Wednesday
The Processor: Datapath & Control.
Instructor: Michael Greenbaum
MIPS Processor.
Processor: Datapath and Control
Presentation transcript:

Lecture 15: Basic CPU Design Today’s topics: FSM wrap-up Single-cycle CPU Multi-cycle CPU

Tackling FSM Problems Three questions worth asking: What are the possible output states? Draw a bubble for each. What are inputs? What values can those inputs take? For each state, what do I do for each possible input value? Draw an arc out of every bubble for every input value.

Example – Residential Thermostat Two temp sensors: internal and external If internal temp is within 1 degree of desired, don’t change setting If internal temp is > 1 degree higher than desired, turn AC on; if internal temp is < 1 degree lower than desired, turn heater on If external temp and desired temp are within 5 degrees, turn AC and heater off

Finite State Diagram HEAT COOL OFF U-H U-C, U-H, U-G U-G U-C U-C U-H D-C, D-G, D-H D-C, D-G, D-H OFF D-C, D-G, D-H, U-G

Latch vs. Flip-Flop Recall that we want a circuit to have stable inputs for an entire cycle – so I want my new inputs to arrive at the start of a cycle and be fixed for an entire cycle A flip-flop provides the above semantics (a door that swings open and shut at the start of a cycle) But a flip-flop needs two back-to-back D-latches, i.e., more transistors, delay, power You can reduce these overheads with just a single D-latch (a door that is open for half a cycle) as long as you can tolerate stable inputs for just half a cycle

Basic MIPS Architecture Now that we understand clocks and storage of states, we’ll design a simple CPU that executes: basic math (add, sub, and, or, slt) memory access (lw and sw) branch and jump instructions (beq and j)

Implementation Overview We need memory to store instructions to store data for now, let’s make them separate units We need registers, ALU, and a whole lot of control logic CPU operations common to all instructions: use the program counter (PC) to pull instruction out of instruction memory read register values

Note: we haven’t bothered View from 30,000 Feet Note: we haven’t bothered showing multiplexors What is the role of the Add units? Explain the inputs to the data memory unit Explain the inputs to the ALU Explain the inputs to the register unit Source: H&P textbook

Clocking Methodology Which of the above units need a clock? Source: H&P textbook Which of the above units need a clock? What is being saved (latched) on the rising edge of the clock? Keep in mind that the latched value remains there for an entire cycle

Implementing R-type Instructions Instructions of the form add $t1, $t2, $t3 Explain the role of each signal Source: H&P textbook

Implementing Loads/Stores Instructions of the form lw $t1, 8($t2) and sw $t1, 8($t2) Where does this input come from? Source: H&P textbook

Implementing J-type Instructions Instructions of the form beq $t1, $t2, offset Source: H&P textbook

View from 10,000 Feet Source: H&P textbook

View from 5,000 Feet Source: H&P textbook

Title Bullet