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

Similar documents
CS 151 Midterm. (Last Name) (First Name)

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

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

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

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

EPC6055 Digital Integrated Circuits EXAM 1 Fall Semester 2013

The Need of Datapath or Register Transfer Logic. Number 1 Number 2 Number 3 Number 4. Numbers from 1 to million. Register

Digital Circuit Design and Language. Datapath Design. Chang, Ik Joon Kyunghee University

Digital Design Using Digilent FPGA Boards -- Verilog / Active-HDL Edition

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

Final Exam Solution Sunday, December 15, 10:05-12:05 PM

ECE 341 Midterm Exam

SIR C.R.REDDY COLLEGE OF ENGINEERING, ELURU DEPARTMENT OF INFORMATION TECHNOLOGY LESSON PLAN

University of Toronto Faculty of Applied Science and Engineering Edward S. Rogers Sr. Department of Electrical and Computer Engineering

UNIVERSITY OF TORONTO FACULTY OF APPLIED SCIENCE AN:p ENGINEERING. ECE241F - Digital Syst~ms Final Examination

BUILDING BLOCKS OF A BASIC MICROPROCESSOR. Part 1 PowerPoint Format of Lecture 3 of Book

Contents. Chapter 9 Datapaths Page 1 of 28

problem maximum score 1 10pts 2 8pts 3 10pts 4 12pts 5 7pts 6 7pts 7 7pts 8 17pts 9 22pts total 100pts

University of California at Berkeley College of Engineering Department of Electrical Engineering and Computer Sciences. Spring 2010 May 10, 2010

Sequential Circuits. inputs Comb FFs. Outputs. Comb CLK. Sequential logic examples. ! Another way to understand setup/hold/propagation time

Introduction to Digital Logic Missouri S&T University CPE 2210 Registers

EE 109L Review. Name: Solutions

University of California, Berkeley College of Engineering

University of California, Berkeley College of Engineering

R07. Code No: V0423. II B. Tech II Semester, Supplementary Examinations, April

IA Digital Electronics - Supervision I

Design of Digital Circuits ( L) ETH Zürich, Spring 2017

Let s put together a Manual Processor

ECE 545 Fall 2010 Exam 1

MASSACHUSETTS INSTITUTE OF TECHNOLOGY Department of Electrical Engineering and Computer Sciences

Two hours - online EXAM PAPER MUST NOT BE REMOVED FROM THE EXAM ROOM UNIVERSITY OF MANCHESTER SCHOOL OF COMPUTER SCIENCE

CS303 LOGIC DESIGN FINAL EXAM

EE 109L Final Review

Question Total Possible Test Score Total 100

ECE 341 Final Exam Solution

University of Toronto Mississauga. Flip to the back cover and write down your name and student number.

Philadelphia University Student Name: Student Number:

Register Transfer Methodology II

Outline. Register Transfer Methodology II. 1. One shot pulse generator. Refined block diagram of FSMD

CPSC 121 Some Sample Questions for the Final Exam Tuesday, April 15, 2014, 8:30AM

NAME: 1a. (10 pts.) Describe the characteristics of numbers for which this floating-point data type is well-suited. Give an example.


One and a half hours. Section A is COMPULSORY UNIVERSITY OF MANCHESTER SCHOOL OF COMPUTER SCIENCE

Many ways to build logic out of MOSFETs

CSE 140L Final Exam. Prof. Tajana Simunic Rosing. Spring 2008

Real Digital Problem Set #6

problem maximum score 1 8pts 2 6pts 3 10pts 4 15pts 5 12pts 6 10pts 7 24pts 8 16pts 9 19pts Total 120pts

CS 2630 Computer Organization. Meeting 13: Faster arithmetic and more operations Brandon Myers University of Iowa

ELCT 501: Digital System Design

Elec 326: Digital Logic Design

11/22/1999 7pm - 9pm. Name: Login Name: Preceptor Name: Precept Number:

Department of Electrical and Computer Engineering University of Wisconsin - Madison. ECE/CS 352 Digital System Fundamentals.

One and a half hours. Section A is COMPULSORY UNIVERSITY OF MANCHESTER SCHOOL OF COMPUTER SCIENCE

R a) Simplify the logic functions from binary to seven segment display code converter (8M) b) Simplify the following using Tabular method

Control and Datapath 8

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

(ii) Simplify and implement the following SOP function using NOR gates:

SHRI ANGALAMMAN COLLEGE OF ENGINEERING. (An ISO 9001:2008 Certified Institution) SIRUGANOOR, TIRUCHIRAPPALLI

EKT 422/4 COMPUTER ARCHITECTURE. MINI PROJECT : Design of an Arithmetic Logic Unit

ECE 341 Midterm Exam

REGISTER TRANSFER LANGUAGE

Problem Points Your Points Total 80

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

ENEE 245 Lab 1 Report Rubrics

EECS Components and Design Techniques for Digital Systems. Lec 07 PLAs and FSMs 9/ Big Idea: boolean functions <> gates.

CSE 140L Final Exam. Prof. Tajana Simunic Rosing. Spring 2008

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

CMPT 250 : Week 3 (Sept 19 to Sept 26)

CS 61C Summer 2012 Discussion 11 State, Timing, and CPU (Solutions)

RealDigital. Problem Set #7 S1 S2 S3 Y Z X Y + Y Z X Z

Injntu.com Injntu.com Injntu.com R16

EECS 150 Homework 7 Solutions Fall (a) 4.3 The functions for the 7 segment display decoder given in Section 4.3 are:

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

ECE 341 Midterm Exam

UNIT-III REGISTER TRANSFER LANGUAGE AND DESIGN OF CONTROL UNIT

INTRODUCTION OF MICROPROCESSOR& INTERFACING DEVICES Introduction to Microprocessor Evolutions of Microprocessor

FPGA Matrix Multiplier

Prerequisite Quiz January 23, 2007 CS252 Computer Architecture and Engineering

Register Transfer Level (RTL) Design

ECE 313 Computer Organization EXAM 2 November 11, 2000

McGill University Faculty of Engineering FINAL EXAMINATION Fall 2007 (DEC 2007)

SKEE2263 Sistem Digit

COVER SHEET: Total: Regrade Info: 7 (6 points) 2 (14 points) 4 (12 points) 8 (20 points) 9 (24 points) 10 (5 extra credit points)

CSE140: Components and Design Techniques for Digital Systems

Design Example: 4-bit Multiplier

Student Number: UTORid: Question 0. [1 mark] Read and follow all instructions on this page, and fill in all fields.

Cpr E 281 FINAL PROJECT ELECTRICAL AND COMPUTER ENGINEERING IOWA STATE UNIVERSITY. FINAL Project. Objectives. Project Selection

1 /10 2 /12 3 /16 4 /30 5 /12 6 /20

Register Transfer Level in Verilog: Part I

INSTITUTE OF AERONAUTICAL ENGINEERING Dundigal, Hyderabad ELECTRONICS AND COMMUNICATIONS ENGINEERING

6.1 Combinational Circuits. George Boole ( ) Claude Shannon ( )

HANSABA COLLEGE OF ENGINEERING & TECHNOLOGY (098) SUBJECT: DIGITAL ELECTRONICS ( ) Assignment

Written exam for IE1204/5 Digital Design Thursday 29/

Finite-State Machine (FSM) Design

CONCORDIA UNIVERSITY Department of Computer Science and Software Engineering COMP 228/4 Section PP Midterm Exam

KING FAHD UNIVERSITY OF PETROLEUM & MINERALS COMPUTER ENGINEERING DEPARTMENT

COS 226 Fall 2015 Midterm Exam pts.; 60 minutes; 8 Qs; 15 pgs :00 p.m. Name:

Using Library Modules in Verilog Designs

Luleå University of Technology Kurskod SMD152 Datum Skrivtid

MLR Institute of Technology

Transcription:

CS 151 Final Name Student ID Signature :, (Last Name) (First Name) : : Instructions: 1. Please verify that your paper contains 20 pages including this cover. 2. Write down your Student-Id on the top of each page of this final. 3. This exam is closed book. No notes or other materials are permitted. 4. Total credits of this final are 115 + 10 EXTRA CREDIT. 5. To receive credit you must show your work clearly. 6. Calculators are NOT allowed. 7. If necessary, state your assumptions clearly. Total Q1 Q2 Q3 Q4 Q5 Q6 [Extra Credit] 115+10 10 10 20 15 40 20 10 CS 151 Digital Logic Design, Spring Quarter 2008, Final Page 1

Q1: [Sequential Circuit Timing Analysis] [10 Points] The circuit below shows a sequential circuit using D Flip Flops, and Multiplexers. Assuming that A 1, A 0, and S are the inputs of the circuit, and Q 1 is 0, Q 0 is 1 when time equals 0 (t0), show the timing diagram for Q 1 and Q 0. NOTE: You can assume that gate delay is negligible. CS 151 Digital Logic Design, Spring Quarter 2008, Final Page 2

Q2: [Register Design] [10 points] Design a 4-bit register with 2 control inputs s 1 and s 0, 4 data inputs I 3..I 0, and 4 data outputs Q 3..Q 0. Shown below is the function table for the 4-bit register. In this question you have to design the circuit inside the Black Box. S1 S0 Action 0 0 Clear the contents of the register 0 1 Load I 1 0 Rotate right by one bit 1 1 Rotate left by one bit I3 I2 I1 I0 Q3 Q2 Q1 Q0 s1 s0 Black Box D D D D clk Q clk Q clk Q clk Q Q3 Q2 Q1 Q0 CS 151 Digital Logic Design, Spring Quarter 2008, Final Page 3

<This page is intentionally left blank> CS 151 Digital Logic Design, Spring Quarter 2008, Final Page 4

Q3: [Counter-based Design] [20 points] Using only a 4-bit up binary counter, you are going to design a circuit that detects odd numbers in a sequence of numbers, its output (denoted by ODD) is 1 when the sequence value is an odd number, 0 otherwise. The sequence is defined below in Q3a. You can use any of the following components (Specify the bit widths, and name all inputs/outputs): 1) Adders 2) Shifters 3) Comparators 4) Multiplexers 5) Subtractors Make sure you answer both parts 3a, and 3b. 3a. Using the 4-bit up binary counter, create a circuit that generates the following sequence [10 points]: 48 45 42 39 36 33 30 27 24 21 18 15 12 9 6 3 48 45 42 CS 151 Digital Logic Design, Spring Quarter 2008, Final Page 5

<This page is intentionally left blank> CS 151 Digital Logic Design, Spring Quarter 2008, Final Page 6

3b. Using the circuit designed in part 3a, modify it so that whenever an odd number is encountered in the sequence generated, your circuit outputs a 1 (ODD signal is 1), otherwise, it outputs a 0. [5 points] CS 151 Digital Logic Design, Spring Quarter 2008, Final Page 7

Q4: [State minimization] [15 points] 4a. Reduce the number of states in the following state machine using the implication table method. Which states are the same? [10 points] A B C D E A B C D E CS 151 Digital Logic Design, Spring Quarter 2008, Final Page 8

4b. Draw the reduced state machine below. [5 points] CS 151 Digital Logic Design, Spring Quarter 2008, Final Page 9

Q5: [C to RTL design] [40 points] The following C-code computes the intensity histogram of a series of pixel values while keeping track of the largest intensity count. Inputs: byte pixels[256], bit start Outputs: byte max_out, bit done main() { byte max; byte pvalue; byte hvalue; byte i; byte histogram[256]; // assume when cleared, all entries are set to 0 while(1) { while(!start); // wait for start signal done = 0; i=0; max = 0; pvalue = 0; hvalue = 0; while(i<256) { // for simplicity the following lines are split statements // from histogram[pixel[i]]++; } pvalue = pixel[i]; hvalue = histogram[pvalue]; hvalue++; histogram[pvalue] = hvalue; if(hvalue>max) max = hvalue; i++; } } max_out=max; done=1; CS 151 Digital Logic Design, Spring Quarter 2008, Final Page 10

To help you understand, below is a block diagram of the datapath. It consists of the datapath black box, and two memory interfaces, the histogram memory (256 bytes), and main memory which contains the pixel array. CS 151 Digital Logic Design, Spring Quarter 2008, Final Page 11

5a. Derive the high-level state machine from the provided C-code. [5 points] CS 151 Digital Logic Design, Spring Quarter 2008, Final Page 12

5b. Design the data-path for this system. [15 points] You may use any of the following components: 1) Registers 2) Adders 3) Comparators 4) Multiplexers CS 151 Digital Logic Design, Spring Quarter 2008, Final Page 13

5c. Design the interface of the system and the interface between the controller and the datapath. [5 points] CS 151 Digital Logic Design, Spring Quarter 2008, Final Page 14

5d. Design the FSM of the controller. [15 points] HINT: There is no timing issue for this system so you do not have to consider timing issues in designing the controller s FSM. CS 151 Digital Logic Design, Spring Quarter 2008, Final Page 15

<This page is intentionally left blank> CS 151 Digital Logic Design, Spring Quarter 2008, Final Page 16

Question 6 [Pipeline utilization] [20 points] 6a. Using only Adders, Subtractors, and Multipliers, design a circuit that performs the following operation: [5 point] Z = (A-B)*(C+D) + (E+F)*(H-G) A, B, C, D, E, F, G, H and Z are 8 bit registers. 6b. If addition/subtraction takes 10 ns and multiplication takes 30 ns, what is the maximum allowed clock frequency for the above circuit? [5 points] CS 151 Digital Logic Design, Spring Quarter 2008, Final Page 17

6c. Add pipeline registers to your design in part (a) to make your design as fast as possible. [5 points] 6d. If addition/subtraction takes 10 ns and multiplication takes 30 ns, what is the maximum allowed clock frequency for the above circuit? [5 points] CS 151 Digital Logic Design, Spring Quarter 2008, Final Page 18

EXTRA CREDIT E1: Consider the schedule below for computing Z = (A-B)*(C+D) + (E+F)*(H-G) that uses 5 adder/subtractors and 2 multipliers: A. Draw a new schedule that uses only 2 add/sub modules and 1 multiplier. How many cycles it will take to compute a new value for Z? [5 points] CS 151 Digital Logic Design, Spring Quarter 2008, Final Page 19

B. Draw the new datapath based on the schedule in part (e) [Hint: Add the required multiplexers] [5 points] CS 151 Digital Logic Design, Spring Quarter 2008, Final Page 20