10/26/2004Comp 120 Fall 20041 26 October Only 11 to go! Questions? Today Exam Review and Instruction Execution.

Slides:



Advertisements
Similar presentations
Adding the Jump Instruction
Advertisements

REGISTER TRANSFER LANGUAGE (RTL)
Multicycle Datapath & Control Andreas Klappenecker CPSC321 Computer Architecture.
1  1998 Morgan Kaufmann Publishers We will be reusing functional units –ALU used to compute address and to increment PC –Memory used for instruction and.
11/1/2005Comp 120 Fall November Exam Postmortem 11 Classes to go! Read Sections 7.1 and 7.2 You read 6.1 for this time. Right? Pipelining then.
CS-447– Computer Architecture Lecture 12 Multiple Cycle Datapath
Arithmetic CPSC 321 Computer Architecture Andreas Klappenecker.
L14 – Control & Execution 1 Comp 411 – Fall /04/09 Control & Execution Finite State Machines for Control MIPS Execution.
VHDL Development for ELEC7770 VLSI Project Chris Erickson Graduate Student Department of Electrical and Computer Engineering Auburn University, Auburn,
1 5.5 A Multicycle Implementation A single memory unit is used for both instructions and data. There is a single ALU, rather than an ALU and two adders.
CSCE 212 Chapter 5 The Processor: Datapath and Control Instructor: Jason D. Bakos.
Fall 2007 MIPS Datapath (Single Cycle and Multi-Cycle)
1 Chapter Five. 2 We're ready to look at an implementation of the MIPS Simplified to contain only: –memory-reference instructions: lw, sw –arithmetic-logical.
10/18/2005Comp 120 Fall October Questions? Instruction Execution.
The Processor 2 Andreas Klappenecker CPSC321 Computer Architecture.
Arithmetic I CPSC 321 Andreas Klappenecker. Administrative Issues Office hours of TA Praveen Bhojwani: M 1:00pm-3:00pm.
L15 – Control & Execution 1 Comp 411 – Spring /25/08 Control & Execution Finite State Machines for Control MIPS Execution.
331 W10.1Spring :332:331 Computer Architecture and Assembly Language Spring 2005 Week 10 Building a Multi-Cycle Datapath [Adapted from Dave Patterson’s.
1  1998 Morgan Kaufmann Publishers We're ready to look at an implementation of the MIPS Simplified to contain only: –memory-reference instructions: lw,
CPU Architecture Why not single cycle? Why not single cycle? Hardware complexity Hardware complexity Why not pipelined? Why not pipelined? Time constraints.
Class 9.1 Computer Architecture - HUJI Computer Architecture Class 9 Microprogramming.
Processor I CPSC 321 Andreas Klappenecker. Midterm 1 Thursday, October 7, during the regular class time Covers all material up to that point History MIPS.
1 We're ready to look at an implementation of the MIPS Simplified to contain only: –memory-reference instructions: lw, sw –arithmetic-logical instructions:
1  1998 Morgan Kaufmann Publishers CH5 Datapath review.
The Multicycle Processor CPSC 321 Andreas Klappenecker.
Dr. Iyad F. Jafar Basic MIPS Architecture: Multi-Cycle Datapath and Control.
Computing Systems The Processor: Datapath and Control.
1 Modified from  Modified from 1998 Morgan Kaufmann Publishers Chapter Three: Arithmetic for Computers citation and following credit line is included:
Chapter 5 Processor Design. Spring 2005 ELEC 5200/6200 From Patterson/Hennessey Slides We're ready to look at an implementation of the MIPS Simplified.
CPE232 Basic MIPS Architecture1 Computer Organization Multi-cycle Approach Dr. Iyad Jafar Adapted from Dr. Gheith Abandah slides
1 CS/COE0447 Computer Organization & Assembly Language Multi-Cycle Execution.
C HAPTER 5 T HE PROCESSOR : D ATAPATH AND C ONTROL M ULTICYCLE D ESIGN.
1  2004 Morgan Kaufmann Publishers Chapter Five.
EECS 322 Computer Architecture
Multicycle Implementation
Datapath and Control AddressInstruction Memory Write Data Reg Addr Register File ALU Data Memory Address Write Data Read Data PC Read Data Read Data.
Multicycle datapath.
1 CS/COE0447 Computer Organization & Assembly Language Chapter 5 Part 3.
Chapter 4 From: Dr. Iyad F. Jafar Basic MIPS Architecture: Multi-Cycle Datapath and Control.
1. 2 MIPS Hardware Implementation Full die photograph of the MIPS R2000 RISC Microprocessor. The 1986 MIPS R2000 with five pipeline stages and 450,000.
1 CS/COE0447 Computer Organization & Assembly Language Chapter 5 Part 3.
10/25/2005Comp 120 Fall October 25 Review for 2 nd Exam on Tuesday 27 October MUL not MULI Ask Questions!
1 CS/COE0447 Computer Organization & Assembly Language Chapter 5 Part 3 In-Class Exercises.
Multi-Cycle Datapath and Control
CS161 – Design and Architecture of Computer Systems
Control & Execution Finite State Machines for Control MIPS Execution.
Five Execution Steps Instruction Fetch
MIPS Instructions.
CS/COE0447 Computer Organization & Assembly Language
Chapter Five.
Control & Execution Finite State Machines for Control MIPS Execution.
CS/COE0447 Computer Organization & Assembly Language
CSCE 212 Chapter 5 The Processor: Datapath and Control
Chapter Five The Processor: Datapath and Control
Multicycle Approach Break up the instructions into steps
Chapter Five The Processor: Datapath and Control
Vishwani D. Agrawal James J. Danaher Professor
Multicycle Approach We will be reusing functional units
October 24 Programming problems? Read Section 6.1 for November 5
COSC 2021: Computer Organization Instructor: Dr. Amir Asif
Processor: Multi-Cycle Datapath & Control
Multicycle Design.
CS/COE0447 Computer Organization & Assembly Language
Multi-Cycle Datapath Lecture notes from MKP, H. H. Lee and S. Yalamanchili.
5.5 A Multicycle Implementation
October 29 Review for 2nd Exam Ask Questions! 4/26/2019
Drawbacks of single cycle implementation
Drawbacks of single cycle implementation
CS161 – Design and Architecture of Computer Systems
Presentation transcript:

10/26/2004Comp 120 Fall October Only 11 to go! Questions? Today Exam Review and Instruction Execution

10/26/2004Comp 120 Fall [10] How many bits are required to store a 10-digit number (i.e. a phone number that might range from to ) as a binary integer? As ASCII characters? = 10 * 10 9 = 10 * 2 30 < 2 34 = 34 bits 10 characters * 8 bits/character = 80 bits

10/26/2004Comp 120 Fall [5] Suppose the byte at location 1000 in memory contains the hex value 0x87. What is the content of register $t0 after the instruction “lb $t0,1000($zero)”? What is its content after the instruction “lbu $t0,1000($zero)”? We’re comparing the “load byte” instruction to the “load byte unsigned” instruction. The lb instruction will “sign extend” so the result will be 0xffffff87 while the lbu will produce 0x

10/26/2004Comp 120 Fall [10] Which of the following cannot be EXACTLY represented by an IEEE double-precision floating-point number? (a) 0 (b) 10.2 (c) (d) 11.5

10/26/2004Comp 120 Fall [12] All of the following equations are true for the idealized numbers you studied in algebra. Which ones are true for IEEE floating point numbers? Assume that all of the numbers are well within the range of largest and smallest possible numbers (that is, underflow and overflow are not a problem) –A+B=A if and only if B=0 –(A+B)+C = A+(B+C) –A+B = B+A –A*(B+C) = A*B+A*C

10/26/2004Comp 120 Fall CPI1 = 2*0.4+3*0.25+3*0.2+5*0.15 = 2.9 CPI2 = 6*0.4+6*0.25+6*0.2+8*0.15 = 6.3 M1 is faster by (1000/2.9) / (2000/6.3) = M1 cycle time = 1ns, M2 cycle time = 0.5ns

10/26/2004Comp 120 Fall [10] How can the ALU we talked about in class be used to compare two values for equality? Subtract (invert, add, with Cin=1) and OR the 32 bits of the result together with an additional gate. If the output of that gate is 9; then the values are equal.

10/26/2004Comp 120 Fall [5] Using 2’s complement arithmetic, negate 0x1234ffff. What is its value in hex? 0x1234ffff inverted = 0xedcb0000 plus 1 = 0xedcb0001

10/26/2004Comp 120 Fall [10] Show, step by step, how to add -17 (negative 17) and 20 (positive 20) using 2’s complement arithmetic and 8 bit integers. 17 is 0x11, so ~17 is 0xee, so -17 is 0xef = is 0x14 = Add them bit-by-bit to get = 0x03

10/26/2004Comp 120 Fall [6] When multiplying unsigned numbers that are N bits long using the shift and add algorithm, how many additions are required on average if all multipliers are equally likely? N/2 Are all multipliers equally likely?

10/26/2004Comp 120 Fall [15] Draw a block diagram showing how to implement 2’s complement subtraction of 4 bit numbers (A minus B) using 1-bit full-adder blocks with inputs A, B, and Cin and outputs Sum and Cout and any other AND, OR, or INVERT blocks you may need ~ ~ ~ ~ A0 B0 A1 B1 A2 B2 A3 B3 1 Diff0 Diff1 Diff2 Diff3

10/26/2004Comp 120 Fall Grade Distribution

10/26/2004Comp 120 Fall Instruction Execution

10/26/2004Comp 120 Fall Five Execution Steps Instruction Fetch Instruction Decode and Register Fetch Execution, Memory Address Computation, or Branch Completion Memory Access or R-type instruction completion Memory Read Completion INSTRUCTIONS TAKE FROM CYCLES! A FSM looks at the op-code to determine how many...

10/26/2004Comp 120 Fall Use PC to get instruction and put it in the Instruction Register. Increment the PC by 4 and put the result back in the PC. Can be described succinctly using RTL "Register-Transfer Language" IR = Memory[PC]; IR is “Instruction Register” PC = PC + 4; What is the advantage of updating the PC now? Step 1: Instruction Fetch

10/26/2004Comp 120 Fall Read registers rs and rt in case we need them Compute the branch address in case the instruction is a branch RTL: A = Reg[IR[25-21]]; B = Reg[IR[20-16]]; ALUOut = PC + (sign-extend(IR[15-0]) << 2); We aren't setting any control lines based on the instruction type (we are busy "decoding" it in our control logic) Step 2: Instruction Decode and Register Fetch

10/26/2004Comp 120 Fall ALU is performing one of three functions, based on instruction type Memory Reference: ALUOut = A + sign-extend(IR[15-0]); R-type: ALUOut = A op B; Branch: if (A==B) PC = ALUOut; Step 3 (instruction dependent)

10/26/2004Comp 120 Fall Loads and stores access memory MDR = Memory[ALUOut]; MDR is Memory Data Register or Memory[ALUOut] = B; R-type instructions finish Reg[IR[15-11]] = ALUOut; Step 4 (R-type or memory-access)

10/26/2004Comp 120 Fall Reg[IR[20-16]]= MDR; Step 5 Memory Read Completion

10/26/2004Comp 120 Fall Summary:

10/26/2004Comp 120 Fall !