CSE 140 Exam #3 Solution Tajana Simunic Rosing

Similar documents
CSE 140 Exam #3 Tajana Simunic Rosing

problem maximum score 1 28pts 2 10pts 3 10pts 4 15pts 5 14pts 6 12pts 7 11pts total 100pts

Final Exam review: chapter 4 and 5. Supplement 3 and 4

EECS 270 Final Exam Spring 2012

Register Transfer Level (RTL) Design Cont.

Sequential Design Basics

1. Convert the decimal number to binary, octal, and hexadecimal.

Quiz #4 Thursday, April 25, 2002, 5:30-6:45 PM


Read-only memory (ROM) Digital logic: ALUs Sequential logic circuits. Don't cares. Bus

EECS 270 Group Homework 4 Due Friday. June half credit if turned in by June

Digital Fundamentals: A Systems Approach

EECS150 - Digital Design Lecture 19 - Finite State Machines Revisited

YEDITEPE UNIVERSITY DEPARTMENT OF COMPUTER ENGINEERING. EXPERIMENT VIII: FLIP-FLOPS, COUNTERS 2014 Fall

University of California at Berkeley College of Engineering Department of Electrical Engineering and Computer Science SOLUTIONS

EECS 270 Midterm 2 Exam Closed book portion Fall 2014

Figure 30.1a Timing diagram of the divide by 60 minutes/seconds counter

cascading flip-flops for proper operation clock skew Hardware description languages and sequential logic

CSE140L: Components and Design Techniques for Digital Systems Lab. FSMs. Tajana Simunic Rosing. Source: Vahid, Katz

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

CSE Latches and Flip-flops Dr. Izadi. NOR gate property: A B Z Cross coupled NOR gates: S M S R Q M

CSE140L: Components and Design Techniques for Digital Systems Lab. CPU design and PLDs. Tajana Simunic Rosing. Source: Vahid, Katz

Section 6.8 Synthesis of Sequential Logic Page 1 of 8

FE REVIEW LOGIC. The AND gate. The OR gate A B AB A B A B 0 1 1

EET2411 DIGITAL ELECTRONICS

Other Flip-Flops. Lecture 27 1

ELCT201: DIGITAL LOGIC DESIGN

Computer Architecture and Organization

ECE 301 Digital Electronics

CSE140: Components and Design Techniques for Digital Systems. More D-Flip-Flops. Tajana Simunic Rosing. Sources: TSR, Katz, Boriello & Vahid

ECE 263 Digital Systems, Fall 2015

DIGITAL ELECTRONICS MCQs

Switching Circuits & Logic Design, Fall Final Examination (1/13/2012, 3:30pm~5:20pm)

Asynchronous (Ripple) Counters

CS3350B Computer Architecture Winter 2015

Lecture 11: Synchronous Sequential Logic

Course Administration

Department of Electrical and Computer Engineering Mid-Term Examination Winter 2012

Memory elements. Topics. Memory element terminology. Variations in memory elements. Clock terminology. Memory element parameters. clock.

CS6201 UNIT I PART-A. Develop or build the following Boolean function with NAND gate F(x,y,z)=(1,2,3,5,7).

Logic Design. Flip Flops, Registers and Counters

SEMESTER ONE EXAMINATIONS 2002

Introduction. NAND Gate Latch. Digital Logic Design 1 FLIP-FLOP. Digital Logic Design 1

COMP2611: Computer Organization. Introduction to Digital Logic

Microprocessor Design

1. a) For the circuit shown in figure 1.1, draw a truth table showing the output Q for all combinations of inputs A, B and C. [4] Figure 1.

Registers and Counters

Combinational vs Sequential

CS 110 Computer Architecture. Finite State Machines, Functional Units. Instructor: Sören Schwertfeger.

Chapter 6. Flip-Flops and Simple Flip-Flop Applications

Universidad Carlos III de Madrid Digital Electronics Exercises

Universal Asynchronous Receiver- Transmitter (UART)

Registers and Counters

Question Bank. Unit 1. Digital Principles, Digital Logic

Difference with latch: output changes on (not after) falling clock edge

ELE2120 Digital Circuits and Systems. Tutorial Note 7

EECS 270 Midterm Exam Spring 2011

Chapter 5 Synchronous Sequential Logic

Lecture 8: Sequential Logic

Chapter 5: Synchronous Sequential Logic

Flip-Flops and Sequential Circuit Design

Department of Computer Science and Engineering Question Bank- Even Semester:

RS flip-flop using NOR gate

PHYSICS 5620 LAB 9 Basic Digital Circuits and Flip-Flops

Bachelor Level/ First Year/ Second Semester/ Science Full Marks: 60 Computer Science and Information Technology (CSc. 151) Pass Marks: 24

Digital Logic Design I

EMT 125 Digital Electronic Principles I CHAPTER 6 : FLIP-FLOP

LATCHES & FLIP-FLOP. Chapter 7

CprE 281: Digital Logic

Principles of Computer Architecture. Appendix A: Digital Logic

CHAPTER1: Digital Logic Circuits

Chapter 5 Flip-Flops and Related Devices

Logic and Computer Design Fundamentals. Chapter 7. Registers and Counters

1.b. Realize a 5-input NOR function using 2-input NOR gates only.

Unit 11. Latches and Flip-Flops

1 Hour Sample Test Papers: Sample Test Paper 1. Roll No.

ESE 570 STATIC SEQUENTIAL CMOS LOGIC CELLS. Kenneth R. Laker, University of Pennsylvania, updated 25Mar15

MODULE 3. Combinational & Sequential logic

Chapter 5 Sequential Circuits

Exercise 2: D-Type Flip-Flop

Dr. Shahram Shirani COE2DI4 Midterm Test #2 Nov 19, 2008

NH 67, Karur Trichy Highways, Puliyur C.F, Karur District UNIT-III SEQUENTIAL CIRCUITS

Counter dan Register

CS61C : Machine Structures

11. Sequential Elements

CprE 281: Digital Logic

Fall 2000 Chapter 5 Part 1

Objectives. Combinational logics Sequential logics Finite state machine Arithmetic circuits Datapath

Unit 9 Latches and Flip-Flops. Dept. of Electrical and Computer Eng., NCTU 1

ECE 341. Lecture # 2

ELCT 501: Digital System Design

First Name Last Name November 10, 2009 CS-343 Exam 2

Name: Date: Suggested Reading Chapter 7, Digital Systems, Principals and Applications; Tocci

Solution to Digital Logic )What is the magnitude comparator? Design a logic circuit for 4 bit magnitude comparator and explain it,

CSE115: Digital Design Lecture 23: Latches & Flip-Flops

UNIVERSITI TEKNOLOGI MALAYSIA

CHAPTER 6 COUNTERS & REGISTERS

CprE 281: Digital Logic

Chapter Contents. Appendix A: Digital Logic. Some Definitions

ELE2120 Digital Circuits and Systems. Tutorial Note 8

Transcription:

CSE 140 Exam #3 Solution Tajana Simunic Rosing Winter 2010 Do not start the exam until you are told to. Turn off any cell phones or pagers. Write your name and PID at the top of every page. Do not separate the pages. This is a closed-book, closed-notes, no-calculator exam. You may only refer to one 81/2 x 11 page of handwritten notes. Do not look at anyone else s exam. Do not talk to anyone but an exam proctor during the exam. If you have a question, raise your hand and an exam proctor will come to you. You have 80 minutes to finish the exam. When the time is finished, you must stop writing. Write your answers in the space provided. To get the most partial credit, clearly and neatly show all steps of your work. 1. 10 points 2. 15 points 3. 15 points 4. 20 points 5. 20 points 6. 20 points Total (100 points)

Problem 1 (10 points, 2pts each). Please circle all the answers that apply. a) Which of the following is the correct way to convert a JK flip-flop to a T flip-flop? i. J = T, K = T ii. J = T, K = T iii. J = TQ, K = TQ iv. J = TQ, K = T Q b) Which of the following conditions is/are likely to incur timing errors on a path that starts at flip-flop A and terminates at flip-flop B? i. The path is very short, and the clock skew causes the clock edge of flip-flop A to come slightly later than flip-flop B ii. The path is very long, and the clock skew causes the clock edge of flip-flop A to come slightly earlier than flip-flop B iii. The path is very short, and the clock skew causes the clock edge of flip-flop A to come slightly earlier than flip-flop B iv. The path is very long, and the clock skew causes the clock edge of flip-flop A to come slightly later than flip-flop B c) How many transistors are needed in the minimum CMOS implementation of function A+B(C+D)? i. 6 ii. 8 iii. 10 iv. 12 True or faulse? T F A+A B is the dual of A(A +B) DRAM is larger than SRAM because of the need to implement large capacitors. F R-type MIPS instructions are longer than J-type because R-type has more register operands T is equivalent to

Problem 2 (15 points) a) A partial timing diagram of the following circuit is shown below. Draw the waveform of D and Q assuming clock cycle time is 8ns and the following: Delay(AND) = Delay(OR) = 3ns, Delay(NOT) = 3ns, Delay(D FF) = 3ns, Setup(D FF) = 1ns, Hold(D FF) = 1ns. a b c D clk Q clk a b c D Q b) If the clock cycle time is 8ns, is there a problem with the operation of this circuit? If so, fix it without changing the clock cycle time or any of the logic gate/d-ff timing parameters. (Hint: you may change the combinational logic while keeping its functionality the same) Static hazard on D causes Q to capture incorrect signal in the last cycle Fix the static hazard: F = a c + a b + ac + bc

Problem 3(15 points) A 4-bit ring counter counts according to the sequence 1000 0100 0010 0001 1000 and repeats. A reset input places the counter into state 1000. Design this circuit using the following pre-designed components: A 2-to-4 decoder; A pre-designed, positive edge-triggered, 2-bit up-counter that counts as 00 01 10 11 00 and repeats. In addition to the clock trigger input, this counter has a reset input which can be used to reset it to 00. The counter has outputs q1, q0. A minimum number of AND/OR/NOT gates, if needed.

Problem 4 (20 points) A recognizer has a single input X and two outputs (Z1 and Z2). The output Z1 becomes 1 each time the input sequence 101 is observed. Otherwise Z1=0. The output Z2=1 each time input sequence 011 is observed, otherwise Z2=0. For example, for the input X={10101101}, the outputs are: Z1={00101001}, and Z2={00000100}. a. (5 points)draw the Mealy style state diagram of this machine. b. (5 points) Implement the FSM using a shift register and a minimum number of gates.

c. Now add to your design a circuit that outputs a 1 each time you detect 13 instances of 3-bit input patterns that are different from both pattern Z1 and Z2. Use a standard counter and a minimum number of gates. (Hint: use Z1 and Z2 as your inputs).

Problem 5 (20 points) Given the state diagram in figure below, implement the state machine using a minimum number of connections on the PLA given below. Make sure to define all relevant signals/connections. Note that this PLA uses T-flip flops! State encoding is given as: A=00, B=01, C=10, D=11. Show all your work. T 0 =Q 0 I+Q 0 I T 1 =Q 1 Q 0 +I Q 0

Problem 6 (20 points) a) Create a high-level state machine that describes the following system behavior. The machine sequentially reads 32 numbers from a 32-word register file and identify the length of the longest sequence of identical values. Example: 0 1 4 7 3 9 9 2 5 5 5 8 8 1 length of the longest sequence of identical values = 3 start Addr = 32 end Addr = 0 length = 0 Max=0 Reg_n = V[addr] Addr++ Reg_o = Reg_n Reg_n = V[addr] Addr++ Addr < 32 && Reg_o < > Reg_n Addr < 32 && Reg_o = Reg_n Length = 0 Max = length Length <= Max Length > Max Length ++

b) Draw the block diagram of how controller connects to the datapath. Show details of the datapath, and label all signals. You can use memory, register, comparator, counter and adder/subtractor in your datapath design. datapath Controller rd rd addr MEM ld_val ld Reg_n ld Reg_o last Addr_inc Rst up Addr counter = equal clr = 32 rst_length length_inc Rst up Length counter ld MAX Rst gte ld_max >

This page is intentionally left blank. Use as scratch paper or to provide additional answers.