Single-Cycle CPU The following exercises are taken from Hennessy and Patterson, CO&D 2 nd, 3 rd, and 4 th Ed.

Similar documents
EE 457 Homework 5 Redekopp Name: Score: / 100_

Selected Solutions to Problem-Set #3 COE 608: Computer Organization and Architecture Single Cycle Datapath and Control

IF ID EX MEM WB 400 ps 225 ps 350 ps 450 ps 300 ps

IF ID EX MEM WB 400 ps 225 ps 350 ps 450 ps 300 ps

LECTURE 8. Pipelining: Datapath and Control

7/11/2012. Single Cycle (Review) CSE 2021: Computer Organization. Multi-Cycle Implementation. Single Cycle with Jump. Pipelining Analogy

EECS150 - Digital Design Lecture 2 - Synchronous Digital Systems Review Part 1. Outline

Chapter 4. Pipelining Analogy. The Processor. Pipelined laundry: overlapping execution. Parallelism improves performance. Four loads: Non-stop:

Pipelined Processor Design

Pipelining A B C D. Readings: Example: Doing the laundry. Ann, Brian, Cathy, & Dave. each have one load of clothes to wash, dry, and fold

Lecture Topics. Announcements. Today: Pipelined Processors (P&H ) Next: continued. Milestone #4 (due 2/23) Milestone #5 (due 3/2)

A B C D. Ann, Brian, Cathy, & Dave each have one load of clothes to wash, dry, and fold. Time

Instruction Level Parallelism. Data Dependence Static Scheduling

ECE473 Computer Architecture and Organization. Pipeline: Introduction

RISC Design: Pipelining

Computer Architecture

CS 110 Computer Architecture Lecture 11: Pipelining

CS 61C: Great Ideas in Computer Architecture Finite State Machines, Functional Units

7/19/2012. IF for Load (Review) CSE 2021: Computer Organization. EX for Load (Review) ID for Load (Review) WB for Load (Review) MEM for Load (Review)

CSE 2021: Computer Organization

Asanovic/Devadas Spring Pipeline Hazards. Krste Asanovic Laboratory for Computer Science M.I.T.

6.S084 Tutorial Problems L19 Control Hazards in Pipelined Processors

Suggested Readings! Lecture 12" Introduction to Pipelining! Example: We have to build x cars...! ...Each car takes 6 steps to build...! ! Readings!

Lecture 4: Introduction to Pipelining

CS420/520 Computer Architecture I

CSEN 601: Computer System Architecture Summer 2014

RISC Central Processing Unit

You are Here! Processor Design Process. Agenda. Agenda 10/25/12. CS 61C: Great Ideas in Computer Architecture Single Cycle MIPS CPU Part II

5. (Adapted from 3.25)

Subtraction Fact Four-in-a-Row Games

Understanding Engineers #2

2359 (i.e. 11:59:00 pm) on 4/16/18 via Blackboard

CZ3001 ADVANCED COMPUTER ARCHITECTURE

CS 61C: Great Ideas in Computer Architecture Lecture 10: Finite State Machines, Func/onal Units. Machine Interpreta4on

CMSC 611: Advanced Computer Architecture

CMOS Process Variations: A Critical Operation Point Hypothesis

Classwork Example 1: Exploring Subtraction with the Integer Game

On Built-In Self-Test for Adders

EE 42/100 Lecture 24: Latches and Flip Flops. Rev B 4/21/2010 (2:04 PM) Prof. Ali M. Niknejad

ECE 4750 Computer Architecture, Fall 2016 T09 Advanced Processors: Superscalar Execution

Solutions. ICS 151 Final. Q1 Q2 Q3 Q4 Total Credit Score. Instructions: Student ID. (Last Name) (First Name) Signature

ICS 151 Final. (Last Name) (First Name)

Computer Hardware. Pipeline

Controller Implementation--Part I. Cascading Edge-triggered Flip-Flops

Single vs. Mul2- cycle MIPS. Single Clock Cycle Length

Pipelining and ISA Design

Computer Architecture ( L), Fall 2017 HW 3: Branch handling and GPU SOLUTIONS

CS 61C: Great Ideas in Computer Architecture. Pipelining Hazards. Instructor: Senior Lecturer SOE Dan Garcia

Combinatorial Logic Design Multiplexers and ALUs CS 64: Computer Organization and Design Logic Lecture #14

Chapter 3 Digital Logic Structures

Low Power Design Part I Introduction and VHDL design. Ricardo Santos LSCAD/FACOM/UFMS

CS/EE Homework 9 Solutions

EE241 - Spring 2004 Advanced Digital Integrated Circuits. Announcements. Borivoje Nikolic. Lecture 15 Low-Power Design: Supply Voltage Scaling

Learning Outcomes. Spiral 2 3. DeMorgan Equivalents NEGATIVE (ACTIVE LO) LOGIC. Negative Logic One hot State Assignment System Design Examples

Fan in: The number of inputs of a logic gate can handle.

Some material adapted from Mohamed Younis, UMBC CMSC 611 Spr 2003 course slides Some material adapted from Hennessy & Patterson / 2003 Elsevier

Datapath Components. Control vs. Datapath, Registers, Adders (Binary Addition) Copyright (c) 2012 Sean Key

Introduction to CMOS VLSI Design (E158) Lecture 5: Logic

37 Game Theory. Bebe b1 b2 b3. a Abe a a A Two-Person Zero-Sum Game

ECE 2300 Digital Logic & Computer Organization. More Pipelined Microprocessor

Out-of-Order Execution. Register Renaming. Nima Honarmand

INDEPENDENT AND DEPENDENT EVENTS UNIT 6: PROBABILITY DAY 2

EE307. Frogger. Project #2. Zach Miller & John Tooker. Lab Work: 11/11/ /23/2008 Report: 11/25/2008

0 A. Review. Lecture #16. Pipeline big-delay CL for faster clock Finite State Machines extremely useful You!ll see them again in 150, 152 & 164

Static Random Access Memory - SRAM Dr. Lynn Fuller Webpage:

Instructions for Completing a PORT Module

Simple Search Algorithms

Grade 7 Geometry Walking Dog

Math Skills for Photography

STATION NUMBER: LAB SECTION: RC Oscillators. LAB 5: RC Oscillators ELECTRICAL ENGINEERING 43/100. University Of California, Berkeley

CH 11 ADDING AND SUBTRACTING SIGNED NUMBERS

EECS 470 Lecture 8. P6 µarchitecture. Fall 2018 Jon Beaumont Core 2 Microarchitecture

moose juice recipe maker: pre-picked recipe Juice: Orange Fiesta activity worksheet: Name: Date:

CS302 Digital Logic Design Solved Objective Midterm Papers For Preparation of Midterm Exam

Lecture 1: Introduction to Digital System Design & Co-Design

Resistive Circuits. Lab 2: Resistive Circuits ELECTRICAL ENGINEERING 42/43/100 INTRODUCTION TO MICROELECTRONIC CIRCUITS

CSE502: Computer Architecture Welcome to CSE 502

EECE 321: Computer Organiza5on

Exam #2 EE 209: Fall 2017

EECS 470. Lecture 9. MIPS R10000 Case Study. Fall 2018 Jon Beaumont

CS/ECE 252: INTRODUCTION TO COMPUTER ENGINEERING UNIVERSITY OF WISCONSIN MADISON

(a) (b) (c) (d) (e) (a) (b) (c) (d) (e)

Spec. Instructor: Center

High Speed, Low power and Area Efficient Processor Design Using Square Root Carry Select Adder

For our EC331 project we successfully designed and implemented a PIC based Tic-Tac-Toe game using the PIC16874.

Oscillation Ring Test Using Modified State Register Cell For Synchronous Sequential Circuit

Computer Architecture and Organization:

Disclaimer. Primer. Agenda. previous work at the EIT Department, activities at Ericsson

Design of Low power and Area Efficient 8-bit ALU using GDI Full Adder and Multiplexer

Module 2.B. 9S12C Multiplexed Bus Expansion. Tim Rogers 2017

Computer Elements and Datapath. Microarchitecture Implementation of an ISA

Campus Fighter. CSEE 4840 Embedded System Design. Haosen Wang, hw2363 Lei Wang, lw2464 Pan Deng, pd2389 Hongtao Li, hl2660 Pengyi Zhang, pnz2102

CS152 Computer Architecture and Engineering Lecture 3: ReviewTechnology & Delay Modeling. September 3, 1997

EE 42/100 Lecture 24: Latches and Flip Flops. Rev A 4/14/2010 (8:30 PM) Prof. Ali M. Niknejad

Millman s theorem. Resources and methods for learning about these subjects (list a few here, in preparation for your research):

Millman s theorem. Resources and methods for learning about these subjects (list a few here, in preparation for your research):

Microprocessor & Interfacing Lecture Programmable Interval Timer

EE 331 Devices and Circuits I. Lecture 1 March 31, 2014

Lesson 7. Digital Signal Processors

MASTER PROOFS through GAMES

Transcription:

EE 357 Homework 7 Redekopp Name: Lec: 9:30 / 11:00 Score: Submit answers via Blackboard for all problems except 5.) and 6.). For those questions, submit a hardcopy with your answers, diagrams, circuit schematics, etc. Single-Cycle CPU The following exercises are taken from Hennessy and Patterson, CO&D 2 nd, 3 rd, and 4 th Ed. 1.) (6 pts.) Review your class notes. a. Is it required that the PC is an edge-sensitive register or can it be a level-sensitive latch? [Must be edge-sensitive / Can be level-sensitive] b. Is it essential or is only desirable to have two READ ports and one WRITE port on the register file? [Essential / Only Desirable but not essential] c. Is it required that the individual register in the register file are actually edge-sensitive registers or can they be level-sensitive latches? [Must be edge-sensitive / Can be level-sensitive] 2.) (Exercise 5.2, 3rd Ed.) (12 pts.) Consider the effect that a single stuck-at-0 fault (i.e. a defect during the manufacturing process causes that particular signal to be 0 regardless of the intended design) would have for the signals shown below, in the single-cycle datapath (Figure 1) Which instruction(s), if any, will not work correctly? Place an X in the entry in the table for instructions that may not work if the given signal is stuck-at-0. Signal R-Type LW SW BEQ ALUop1 ALUop0 Branch 3.) (Exercise 5.3, 3 rd Ed.) (12 pts.) Repeat the previous exercise but now assuming stuck-at- 1 faults. Place an X in the entry in the table for instructions that may not work if the given signal is stuck-at-1. Signal R-Type LW SW BEQ ALUop1 ALUop0 Branch

4.) (Exercise 5.5 2 nd Ed.) (9 pts.) We wish to add the instruction addi (add immediate) to the single-cycle datapath. No datapath changes or new control signals are needed. Show the necessary value of current control signals for the execution of the addi. If a control signal can be either 1 or 0, choose 0 as your answer. addi Dst ALUSrc to- Branch ALUOp1 ALUOp0 Figure 1 - Figure 4.17 (p. 322) 4th Ed.

5.) (Exercise 5.6 2 nd Ed.) (15 pts.) We wish to add the instruction jal (jump and link) to the single-cycle datapath. [Note: jal still jumps (i.e. PC = jump addr) but also stores the return address, PC+4, to register 31.] Modify the datapath to support all the current instructions (R-type, lw, sw, beq, j) and now jal by adding: a. a single 32-bit wide 2-to-1 mux b. a single 5-bit wide 2-to-1 mux c. a control signal JAL Show the value of the control signals for this instruction in the table below (use X if the signal is a don t care). jal Jump JAL Dst ALUSrc to- Branch ALUOp1 ALUOp0 jal Figure 2 - Figure 4.24, page 329

6.) (Adapted from Exercise 5.13 and 3 rd Ed.) (6 pts.) Examine the table of control signals (Figure 4.18 in the 4 th Ed.) for the single-cycle datapath from Figure 4.17 in the 4 th Ed. If we did NOT want to generate the control signal Dst, which control signals (list all workable signals) could be used in its place to achieve equivalent operation? If we did not want to generate to, which control signals could be used in its place (without modification) to achieve equivalent operation? Figure 3 - Figure 4.18 4th Ed. Exercises 7.) - 9.) are drawn from Exercise 4.10 4 th Ed. on page 4.18. Consider only the times in row a.) of the tables and do not do problems for row b. Exercise 4.10 - In this exercise we examine how the clock cycle time of the processor affects the design of the control unit and vice versa. Problems in this exercise assume that the logic blocks used to implement the datapath have the following latencies (delays): I- ADD Each Mux ALU s D- Sign Shift-left- ALU Ctrl Extend 2 a. 400 ps 100 ps 30 ps 120 ps 200 ps 350 ps 20 ps 0 ps 50 ps 7.) Exercise 4.10.1 4 th Ed. (p. 418) (5 pts.) To avoid lengthening the critical path of the datapath shown in Figure 4.24 (reprinted earlier in this HW), how much time can the control unit take to generate the signal? Note: You need to think about when the control unit can start generating (hint: it s not at the beginning of the clock cycle) and when is actually required. (Hint: since is a write enable, it is needed at the end of the clock cycle but you ll need to figure out the clock cycle by considering the longest delay of any instruction (i.e. consider all instructions: R-Type, lw, sw, beq, and j and their latencies; then pick the longest latency as your clock cycle time). You can find the time for the by subtracting the clock cycle time minus the time when the control unit can start generating. Control Unit can start generating Clock cycle time (longest path for any instruction) Time the control unit can take to generate Time (in ps)

8.) Exercise 4.10.3 4 th Ed. (p. 418) (28 pts.) Which control signal in Figure 4.24 is the most critical to generate quickly and how much time does the control unit have to generate it if it wants to avoid being on the critical path? Note: This question is asking which of all the control signals is needed the earliest and at what time is it needed. To find this, start with the clock cycle time found in the previous exercise minus I- time (time from when the instruction is valid and the control unit can actually start decoding) and work backwards for all possible instructions: R-type, lw, sw, beq, and j through the necessary datapath units (i.e. to is needed one mux delay before the end of the clock cycle, Jump is needed one mux delay before the end of the cycle, etc.) Pick the signal with the earliest time. Cycle time minus I- minus datapath delay after that control signal Dst Jump Branch to ALUOp ALUSrc 9.) Exercise 4.10.4 4 th Ed. (p. 418) (7 pts.) Assume that the control unit needs the following times to generate the individual control signals as follows in the table below. What is the clock cycle time (i.e. shortest possible clock period)? Dst Jump Branch to ALUOp ALUSrc a.) 720 ps 730 ps 600 ps 400 ps 700 ps 200 ps 710 ps 200 ps 800 ps Note: You should be able to use the values you found in problem 8.) and compare them to when the control signals are actually generated (shown in the table above). Use the differences in that information to calculate the new clock cycle time. (i.e. some of the control signals will not be ready at the time they are needed. Thus we will need to increase the clock period by the difference to compensate for the late arriving control signal.) Time needed from control unit time provided from control unit Dst Jump Branch to ALUOp ALUSrc