TEST 1 REVIEW. Lectures 1-5

Similar documents
CPU DESIGN The Single-Cycle Implementation

Lecture 13: Sequential Circuits, FSM

Lecture 13: Sequential Circuits, FSM

Computer Engineering Department. CC 311- Computer Architecture. Chapter 4. The Processor: Datapath and Control. Single Cycle

COVER SHEET: Problem#: Points

EC 413 Computer Organization

CPSC 3300 Spring 2017 Exam 2

Lecture 3, Performance

Lecture 3, Performance

EXAMPLES 4/12/2018. The MIPS Pipeline. Hazard Summary. Show the pipeline diagram. Show the pipeline diagram. Pipeline Datapath and Control

CSE Computer Architecture I

Spiral 1 / Unit 3

Processor Design & ALU Design

Implementing the Controller. Harvard-Style Datapath for DLX

CSc 256 Midterm 2 Fall 2010

Project Two RISC Processor Implementation ECE 485

61C In the News. Processor Design: 5 steps

Outcomes. Spiral 1 / Unit 2. Boolean Algebra BOOLEAN ALGEBRA INTRO. Basic Boolean Algebra Logic Functions Decoders Multiplexers

Computer Architecture. ECE 361 Lecture 5: The Design Process & ALU Design. 361 design.1

Building a Computer. Quiz #2 on 10/31, open book and notes. (This is the last lecture covered) I wonder where this goes? L16- Building a Computer 1

Computer Architecture. ESE 345 Computer Architecture. Design Process. CA: Design process

3. (2) What is the difference between fixed and hybrid instructions?

Computer Architecture ELEC2401 & ELEC3441

Pipelining. Traditional Execution. CS 365 Lecture 12 Prof. Yih Huang. add ld beq CS CS 365 2

Design of Digital Circuits Lecture 14: Microprogramming. Prof. Onur Mutlu ETH Zurich Spring April 2017

CS 700: Quantitative Methods & Experimental Design in Computer Science

A Second Datapath Example YH16

ICS 233 Computer Architecture & Assembly Language

Lecture 12: Adders, Sequential Circuits

In 1980, the yield = 48% and the Die Area = 0.16 from figure In 1992, the yield = 48% and the Die Area = 0.97 from figure 1.31.

Goals for Performance Lecture

L07-L09 recap: Fundamental lesson(s)!

Review. Combined Datapath

[2] Predicting the direction of a branch is not enough. What else is necessary?

Lecture 13: Sequential Circuits

From Sequential Circuits to Real Computers

Review: Single-Cycle Processor. Limits on cycle time

4. (3) What do we mean when we say something is an N-operand machine?

Simple Instruction-Pipelining. Pipelined Harvard Datapath

1. (2 )Clock rates have grown by a factor of 1000 while power consumed has only grown by a factor of 30. How was this accomplished?

Lecture 12: Adders, Sequential Circuits

[2] Predicting the direction of a branch is not enough. What else is necessary?

ALU A functional unit

Simple Instruction-Pipelining. Pipelined Harvard Datapath

Lecture 17: Designing Sequential Systems Using Flip Flops

CS/COE0447: Computer Organization

Slides for Lecture 19

ECE/CS 250 Computer Architecture

Lecture 14 Finite state machines

Intro To Digital Logic

ECE 250 / CPS 250 Computer Architecture. Basics of Logic Design Boolean Algebra, Logic Gates


Computer Science 324 Computer Architecture Mount Holyoke College Fall Topic Notes: Digital Logic

CS/COE1541: Introduction to Computer Architecture. Logic Design Review. Sangyeun Cho. Computer Science Department University of Pittsburgh

CS/EE 181a 2010/11 Lecture 4

CA Compiler Construction

Lecture 8: Sequential Networks and Finite State Machines

Overview. Arithmetic circuits. Binary half adder. Binary full adder. Last lecture PLDs ROMs Tristates Design examples

CPU DESIGN The Single-Cycle Implementation

Logic design? Transistor as a switch. Layered design approach. CS/COE1541: Introduction to Computer Architecture. Logic Design Review.

CS/COE0447: Computer Organization

CS/EE 181a 2008/09 Lecture 4

Arithmetic and Logic Unit First Part

Computing via boolean logic. COS 116: 3/8/2011 Sanjeev Arora

Lecture 2: Metrics to Evaluate Systems

CS61C : Machine Structures

ECEN 651: Microprogrammed Control of Digital Systems Department of Electrical and Computer Engineering Texas A&M University

ECE/CS 250: Computer Architecture. Basics of Logic Design: Boolean Algebra, Logic Gates. Benjamin Lee

Outline. policies for the first part. with some potential answers... MCS 260 Lecture 10.0 Introduction to Computer Science Jan Verschelde, 9 July 2014

Measurement & Performance

CS61C : Machine Structures

Measurement & Performance

Formal Verification of Systems-on-Chip

Sequential Logic (3.1 and is a long difficult section you really should read!)

Topics: A multiple cycle implementation. Distributed Notes

PERFORMANCE METRICS. Mahdi Nazm Bojnordi. CS/ECE 6810: Computer Architecture. Assistant Professor School of Computing University of Utah

CSE370 HW6 Solutions (Winter 2010)

Designing MIPS Processor

Self-reproducing programs. And Introduction to logic. COS 116, Spring 2012 Adam Finkelstein

Performance Metrics for Computer Systems. CASS 2018 Lavanya Ramapantulu

UNIVERSITY OF WISCONSIN MADISON

Computer Architecture

Unit 8A Computer Organization. Boolean Logic and Gates

INF2270 Spring Philipp Häfliger. Lecture 8: Superscalar CPUs, Course Summary/Repetition (1/2)

Professor Fearing EECS150/Problem Set Solution Fall 2013 Due at 10 am, Thu. Oct. 3 (homework box under stairs)

SOLUTION. Homework 1. Part(a) Due: 15 Mar, 2018, 11:55pm

Practice Midterm Exam Solutions

Mark Redekopp, All rights reserved. Lecture 1 Slides. Intro Number Systems Logic Functions

Philadelphia University Student Name: Student Number:

Propositional Logic: Semantics and an Example

COMPUTER SCIENCE TRIPOS

CSC9R6 Computer Design. Practical Digital Logic

Slides for Lecture 16

Design at the Register Transfer Level

From Greek philosophers to circuits: An introduction to boolean logic. COS 116, Spring 2011 Sanjeev Arora

Lecture: Pipelining Basics

Unit 6: Branch Prediction

ENEE350 Lecture Notes-Weeks 14 and 15

ELCT201: DIGITAL LOGIC DESIGN

CSCI 2150 Intro to State Machines

Transcription:

TEST 1 REVIEW Lectures 1-5

REVIEW Test 1 will cover lectures 1-5. There are 10 questions in total with the last being a bonus question. The questions take the form of short answers (where you are expected to write briefly on a topic) and homework-like problems. The distribution of points is as follows: Lecture 1: 34% Lecture 2: 18% Lecture 3: 10% Lecture 4: 22% Lecture 5: 16%

REVIEW This slide set is intended to give you some practice with problems that are similar to those that will appear on the test. Try to work out all of the problems before looking at the solutions, which are on the slide right after the problem statement.

DATAPATH Fill in the datapath for the sub instruction. sub $rd, $rs, $rt

DATAPATH Fill in the datapath for the sub instruction. Now, add in the bit width values. 4

DATAPATH Fill in the datapath for the sub instruction. Now, add in the bit width values. 4 5 5 Which of the following control lines need to be set: RegWrite, MemWrite, MemRead? 5

DATAPATH Fill in the datapath for the sub instruction. Now, add in the bit width values. 4 5 5 Which of the following control lines need to be set? RegWrite Set! We don t care about MemWrite and MemRead. 5

DATAPATH Fill in the datapath for the lw instruction. lw $rt, immed($rs)

DATAPATH Fill in the datapath for the lw instruction. Now add in the bit width values. 4

DATAPATH Fill in the datapath for the lw instruction. Now add in the bit width values. Which of the following control lines need to be set: RegWrite, MemWrite, MemRead? 4 5 5 16

DATAPATH Fill in the datapath for the lw instruction. Now add in the bit width values. Which of the following control lines need to be set? RegWrite Set! MemWrite Unset! MemRead Set! 4 5 5 16

LOGIC Consider the following monstrous logic equation: D = ( A B C) A B C A B Fill in the truth table for this equation. C + A B C + A + B + C

LOGIC Consider the following monstrous logic equation: D = ( A B C) A B C A B C + A B C + A + B + C A B C D 0 0 0 0 0 0 1 1 0 1 0 1 0 1 1 0 1 0 0 1 1 0 1 0 1 1 0 0 1 1 1 0 Express this equation in the canonical sum-ofproducts form.

LOGIC Consider the following monstrous logic equation: D = ( A B C) A B C A B C + A B C + A + B + C A B C D 0 0 0 0 0 0 1 1 0 1 0 1 0 1 1 0 1 0 0 1 1 0 1 0 1 1 0 0 1 1 1 0 Express this equation in the canonical sum-of-products form. D = A B C + A B C + (A B C) Now, try to draw the hardware for this logic equation.

LOGIC Consider the following logic equation: D = A B C + A B C + (A B C) A B C D 0 0 0 0 0 0 1 1 0 1 0 1 0 1 1 0 1 0 0 1 1 0 1 0 1 1 0 0 1 1 1 0

MIPS Translate the following C code fragment into MIPS. Let a and b be associated with $t0 and $t1, respectively. Let the base addresses of A and B be associated with $s0 and $s1, respectively. if(a < b){ for(i = 0; i < a; i++){ A[i] = B[i] } }

MIPS Translate the following C code fragment into MIPS. Let a and b be associated with $t0 and $t1, respectively. Let the base addresses of A and B be associated with $s0 and $s1, respectively. Let i be associated with $t7. if(a < b){ for(i = 0; i < a; i++){ A[i] = B[i] } } slt $t2, $t0, $t1 beq $t2, $zero, L1 addi $t7, $zero, 0 LP: slt $t2, $t7, $t0 beq $t2, $zero, L1 sll $t3, $t7, 2 add $t4, $s1, $t3 lw $t4, 0($t4) add $t5, $s0, $t3 sw $t4, 0($t5) addi $t7, $t7, 1 j LP L1:

CLASSIC CPU PERFORMANCE EQUATION The Classic CPU Performance Equation is: CPU Time = #Instructions CPI Clock Period Alternatively, CPU Time = #Instructions CPI Clock Rate A program on a machine has a clock rate of 3 GHz, each instruction takes 2 clock cycles on average, and the execution time is 4 seconds. How many instructions were executed in this program?

CLASSIC CPU PERFORMANCE EQUATION The Classic CPU Performance Equation is: CPU Time = #Instructions CPI Clock Period Alternatively, CPU Time = #Instructions CPI Clock Rate A program on a machine has a clock rate of 3 GHz, each instruction takes 2 clock cycles on average, and the execution time is 4 seconds. How many instructions were executed in this program? Answer: 6 10 9 instructions

FINAL THOUGHTS Knowing how to approach each of these problems (or related problems) will get you pretty far on the exam, but you still need to be comfortable with everything on the topics list. Especially: The details of how the MIPS instruction set works. Do you know what each of the fields is for and how the field is constructed? Great Architecture Ideas and ISA Design Principles. Trends in implementation technology, the power wall, and the effect of these on today s computers. How is high-level source code converted into a running process? Etc