Computer Organization EE 3755 Midterm Examination

Similar documents
Computer Organization EE 3755 Midterm Examination

Computer Organization EE 3755 Midterm Examination

Digital Design using HDLs EE 4755 Final Examination

ECE 30 Introduction to Computer Engineering

Digital Design using HDLs EE 4755 Final Examination

EE 4755 Digital Design Using Hardware Description Languages

Digital Design using HDLs EE 4755 Midterm Examination

Computer Architecture EE 4720 Midterm Examination

ECE 2030D Computer Engineering Spring problems, 5 pages Exam Two 8 March 2012

Digital Design using HDLs EE 4755 Midterm Examination

Chapter 3 Arithmetic for Computers

Digital Design using HDLs EE 4755 Midterm Examination

Tailoring the 32-Bit ALU to MIPS

Two-Level CLA for 4-bit Adder. Two-Level CLA for 4-bit Adder. Two-Level CLA for 16-bit Adder. A Closer Look at CLA Delay

ECE331: Hardware Organization and Design

Grading: 3 pts each part. If answer is correct but uses more instructions, 1 pt off. Wrong answer 3pts off.

CENG 3420 Lecture 06: Datapath

The MIPS Processor Datapath

CSE 378 Midterm 2/12/10 Sample Solution

Midterm. CS64 Spring Midterm Exam

Computer Architecture EE 4720 Midterm Examination

ECE 2020B Fundamentals of Digital Design Spring problems, 6 pages Exam Two 26 February 2014

Chapter 3 Arithmetic for Computers. ELEC 5200/ From P-H slides

Digital Design Using Verilog EE Final Examination

Computer Organization EE 3755 Final Examination

Computer Architecture Set Four. Arithmetic

Computer Architecture EE 4720 Midterm Examination

Midterm I October 6, 1999 CS152 Computer Architecture and Engineering

MIPS Integer ALU Requirements

Computer Architecture EE 4720 Midterm Examination

Midterm I March 12, 2003 CS152 Computer Architecture and Engineering

CENG 3420 Computer Organization and Design. Lecture 06: MIPS Processor - I. Bei Yu

Digital Design using HDLs EE 4755 Midterm Examination

ECE/CS 552: Introduction to Computer Architecture ASSIGNMENT #1 Due Date: At the beginning of lecture, September 22 nd, 2010

Computer Organization EE 3755 Final Examination

Computer Architecture EE 4720 Midterm Examination

Problem 3: Theoretical Questions: Complete the midterm exam taken from a previous year attached at the end of the assignment.

ECE 2030B 1:00pm Computer Engineering Spring problems, 5 pages Exam Two 10 March 2010

CS3350B Computer Architecture Winter 2015

Computer Organization EE 3755 Final Examination

Computer Science and Engineering 331. Midterm Examination #1. Fall Name: Solutions S.S.#:

CS 351 Exam 2 Mon. 11/2/2015

ECE331: Hardware Organization and Design

Digital Design Using Verilog EE Midterm Examination

EEM 486: Computer Architecture. Lecture 2. MIPS Instruction Set Architecture

Boolean Unit (The obvious way)

Computer Organization and Components

FPGA Design Challenge :Techkriti 14 Digital Design using Verilog Part 1

Computer Organization EE 3755 Final Examination

Chapter 4. The Processor. Computer Architecture and IC Design Lab

Lecture Topics. Announcements. Today: Integer Arithmetic (P&H ) Next: The MIPS ISA (P&H ) Consulting hours. Milestone #1 (due 1/26)

ECE 341 Midterm Exam

Midterm I March 3, 1999 CS152 Computer Architecture and Engineering

Processor (I) - datapath & control. Hwansoo Han

Chapter 4. The Processor

CPE300: Digital System Architecture and Design

MIPS ISA and MIPS Assembly. CS301 Prof. Szajda

Mips Code Examples Peter Rounce

ECE260: Fundamentals of Computer Engineering

ECE Exam I - Solutions February 19 th, :00 pm 4:25pm

EECS150 - Digital Design Lecture 13 - Combinational Logic & Arithmetic Circuits Part 3

ECE 341 Midterm Exam

Combinational Circuit Design

MIPS ISA. 1. Data and Address Size 8-, 16-, 32-, 64-bit 2. Which instructions does the processor support

Question Total Possible Test Score Total 100

2) Using the same instruction set for the TinyProc2, convert the following hex values to assembly language: x0f

Binary Arithmetic. Daniel Sanchez Computer Science & Artificial Intelligence Lab M.I.T.

Format. 10 multiple choice 8 points each. 1 short answer 20 points. Same basic principals as the midterm

Mark Redekopp and Gandhi Puvvada, All rights reserved. EE 357 Unit 15. Single-Cycle CPU Datapath and Control

Binvert Operation (add, and, or) M U X

CSE 378 Midterm Sample Solution 2/11/11

CS 151 Quiz 4. Instructions: Student ID. (Last Name) (First Name) Signature

Review: Abstract Implementation View

Chapter 4. The Processor

Unsigned Binary Integers

Chapter 2A Instructions: Language of the Computer

Unsigned Binary Integers

Digital Design with FPGAs. By Neeraj Kulkarni

ECE260: Fundamentals of Computer Engineering

Review from last time. CS152 Computer Architecture and Engineering Lecture 6. Verilog (finish) Multiply, Divide, Shift

CS 61c: Great Ideas in Computer Architecture

Review of Last Lecture. CS 61C: Great Ideas in Computer Architecture. MIPS Instruction Representation II. Agenda. Dealing With Large Immediates

Computer Architecture EE 4720 Midterm Examination

ECE331: Hardware Organization and Design

CPE 335 Computer Organization. MIPS Arithmetic Part I. Content from Chapter 3 and Appendix B

Chapter 4. The Processor. Instruction count Determined by ISA and compiler. We will examine two MIPS implementations

Binary Multiplication

LSU EE 4720 Homework 5 Solution Due: 20 March 2017

University of California, Berkeley College of Engineering Department of Electrical Engineering and Computer Science

Outline. EEL-4713 Computer Architecture Multipliers and shifters. Deriving requirements of ALU. MIPS arithmetic instructions

Review of Last lecture. Review ALU Design. Designing a Multiplier Shifter Design Review. Booth s algorithm. Today s Outline

CS 2506 Computer Organization II

Computer Architecture EE 4720 Midterm Examination

MIPS Coding Continued

CS/COE 0447 Example Problems for Exam 2 Spring 2011

ECE260: Fundamentals of Computer Engineering

CS 2506 Computer Organization II

CS3350B Computer Architecture MIPS Instruction Representation

CS/COE 0447 Example Problems for Exam 2 Fall 2010

Review: MIPS Organization

Transcription:

Name Computer Organization EE 3755 Midterm Examination Wednesday, 30 October 2013, 8:30 9:20 CDT Alias Problem 1 Problem 2 Problem 3 Problem 4 Problem 5 Problem 6 Problem 7 Exam Total (21 pts) (15 pts) (25 pts) (11 pts) (11 pts) (11 pts) (6 pts) (100 pts) Good Luck!

Problem 1: [21 pts] Consider the module below: module prob1is(x,y,a,b,c); input a, b, c; output x, y; wire a, b, c, x, y; <-- HINT: Declare types for parts b and c. assign x =!a ^ y; assign y = b c; (a) Draw a logic diagram corresponding to the module. Don t optimize. Logic diagram of prob1is. (b) Complete the module below so that it performs the same operation as prob1is but is in explicit structural form. Explicit structural form of prob1is. Don t forget to declare types. module prob1es(x,y,a,b,c); input a, b, c; output x, y; (c) Complete the module below so that it performs the same operation as prob1is but is in synthesizable behavioral form. Synthesizable behavioral form of prob1is. Don t forget to declare types. module prob1sb(x,y,a,b,c); input a, b, c; output x, y; 2

Problem 2: [15 pts] Appearing below is the generic carry lookahead block from the CLA lecture slides. Remember that it is part of a hierarchical carry lookahead adder. a b a 0 CLB-x l bits a 1 b0 Value X b1 c i a cin b l-bit type-x adder s s a l-3 a l-2 b l-3 bl-2 G l bits a l-1 P bl-1 s (a) The output of one of the AND gates is labeled Value X. Suppose l = 16. Find inputs to the module such that Value X is 1 but all of the other inputs to the generate OR gate are 0. Value of module inputs needed so that Value X will be 1. (b) Notice that the module does not have a carry out signal. Add logic to the module above to compute a carry out signal. (See next part.) Logic for carry out. Do not add new inputs to the module. (c) The carry out signal from the previous part isn t needed in real life. Why not? What if it were used? Why doesn t the CLB need a carry out signal? What would be the problem with using the carry out signal? 3

Problem 3: [25 pts] A population count module based on Homework 3 Problem 2 appears below. module red_pop(p,a); parameter N = 20; parameter M = 4; // Number of parts. parameter N_PER_PART = N/M; input wire [N-1:0] a; output reg [8:0] p; reg [8:0] pa; integer i, j; always @( a ) begin for ( j=0; j<m; j=j+1 ) begin pa = a[ j*n_per_part ]; for ( i=1; i<n_per_part; i=i+1 ) pa = pa + a[ j*n_per_part + i ]; if ( j == 0 ) p = pa; else p = p + pa; end end (a) Sketch the logic that would be inferred for this module (the logic that would be synthesized without optimization). Show adders as a box with a + inside. Show synthesized logic without optimization. 4

Problem 3, continued: The module below is the same as the one on the previous page. module red_pop(p,a); parameter N = 20; parameter M = 4; // Number of parts. parameter N_PER_PART = N/M; input wire [N-1:0] a; output reg [8:0] p; reg [8:0] pa; integer i, j; always @( a ) begin for ( j=0; j<m; j=j+1 ) begin pa = a[ j*n_per_part ]; for ( i=1; i<n_per_part; i=i+1 ) pa = pa + a[ j*n_per_part + i ]; if ( j == 0 ) p = pa; else p = p + pa; end end (b) Compute the cost of the logic from the previous part assuming that all adders are ripple adders and that the cost of a BFA is 7 units. The size of the adders has been made as small as possible. Assume that the gates outside of the BFAs have a cost of one unit each. Cost of circuit. Show work for partial credit. Account for size of adders, the sizes have been minimized. (c) Suppose the delay of each ripple adder is just 1 time unit. (Yes, just 1 time unit.) Find the delay of the circuit in terms of N and M. That is, don t assume N=20 and M=4. Delay in terms of N and M assuming 1-time-unit ripple adders. (d) In the module above M was set to 4 and N to 20. Consider the case where N is some arbitrary value, and we want to compute a value for M that minimizes delay for this N. Using the delay model from the previous part, find an expression for M in terms of N that will minimize delay. Best value of M in terms of N. 5

Problem 4: [11 pts] Answer the computer arithmetic questions below. (a) Show the longhand steps needed to multiply 1234 16 1203 16 using a radix-16 (four bit) multiplication algorithm, but do not add together the partial products. Show the work in binary or hexadecimal. This is without Booth recoding. (The product is 147de9c 16, but remember there is no need to add the partial products.) Longhand steps for radix-16 (4 bit) 1234 16 1203 16 (b) Show the value of IEEE 754 single-precision floating point number 0x 42fa 0000. For your convenience the layout of an IEEE 754 single is shown below. IEEE Single: S 31 E 30 23 F 22 0 Value of number (in decimal or as a formula to compute value) is: 6

Problem 5: [11 pts] Appearing below is unoptimized logic for an ordinary radix-4 multiplier. start msb 2'b0 multiplicand 16 2'b0 16 msb 1'b0 1'b0 multiplicand_x_1 + Unoptimized logic. multiplicand_x_3 = 0!bit 5'd1-5'd8 bit en bit ready 31:16 multiplicand_x_2 + + pp multiplier 16'd0 en product product + mb 1:0 15:2 multiplier clk (a) As described in class, the logic around the four-input multiplexor can be reduced in cost. Show how. Sketch of lower-cost logic around the 4-input mux. (b) One of the adders in the illustrated multiplier would not be necessary in a radix-4 multiplier using Booth recoding. Show which adder would not be necessary, and explain what would be done instead. Indicate which adder not necessary. Explain what would be done instead. 7

Problem 6: [11 pts] Answer the following MIPS questions. (a) Show the values in register $s0 after the execution of each instruction below in the spaces indicated. Fill in the s0 = blanks below. # Initial register values: $s1 = 0x18, $s2 = 0x30 or $s0, $s1, $s2 sll $s0, $s2, 2 slt $s0, $s1, $s2 addi $s0, $s1, 0xffff ori $s0, $s1, 0xffff (b) There is a problem with the instruction below. Describe what the problem is and show replacement instruction(s) that do what was intended. addi $s0, $s0, 0x12345 The problem with the instruction is: Replacement that does the same thing: 8

Problem 7: [6 pts] Answer each MIPS encoding question below. (a) Show the encoding of each assembly language instruction below. Some field values would have to be looked up in a table, for those write look up instead of the value. For your convenience the layout of the MIPS R and I formats are shown, answers can be written in these or they can be copied. opcode rs rt rd sa func Format R: 31 26 25 21 20 16 15 11 10 6 5 0 opcode rs rt imm Format I: 31 26 25 21 20 16 15 0 Encoding for sub $20, $21, $22 Encoding for lui $8, 0x1234 Encoding for sra $9, $2, 31 9