Faculty of Engineering. FINAL EXAMINATION FALL 2008 (December2008) ANSWER KEY

Similar documents
King Fahd University of Petroleum and Minerals College of Computer Science and Engineering Computer Engineering Department

Reg. No. Question Paper Code : B.E./B.Tech. DEGREE EXAMINATION, NOVEMBER/DECEMBER Second Semester. Computer Science and Engineering

(Boolean Algebra, combinational circuits) (Binary Codes and -arithmetics)

CSE140: Components and Design Techniques for Digital Systems. Midterm Information. Instructor: Mohsen Imani. Sources: TSR, Katz, Boriello & Vahid

Philadelphia University Student Name: Student Number:

BER KELEY D AV IS IR VINE LOS AN GELES RIVERS IDE SAN D IEGO S AN FRANCISCO

Department of Electrical and Computer Engineering University of Wisconsin Madison. Fall Final Examination

KUMARAGURU COLLEGE OF TECHNOLOGY COIMBATORE

UNIVERSITY OF BOLTON SCHOOL OF ENGINEERING BENG (HONS) ELECTRICAL & ELECTRONICS ENGINEERING EXAMINATION SEMESTER /2017

Principles of Computer Architecture. Appendix B: Reduction of Digital Logic. Chapter Contents

University of Guelph School of Engineering ENG 2410 Digital Design Fall There are 7 questions, answer all questions.

The Design Procedure. Output Equation Determination - Derive output equations from the state table

UNIVERSITY OF WISCONSIN MADISON

Written exam for IE1204/5 Digital Design with solutions Thursday 29/

Philadelphia University Student Name: Student Number:

( c) Give logic symbol, Truth table and circuit diagram for a clocked SR flip-flop. A combinational circuit is defined by the function

Dr. Nicola Nicolici COE/EE2DI4 Midterm Test #2 Nov 22, 2006

King Fahd University of Petroleum and Minerals College of Computer Science and Engineering Computer Engineering Department


EE40 Lec 15. Logic Synthesis and Sequential Logic Circuits

Written reexam with solutions for IE1204/5 Digital Design Monday 14/

ELEC Digital Logic Circuits Fall 2014 Sequential Circuits (Chapter 6) Finite State Machines (Ch. 7-10)

Vidyalankar S.E. Sem. III [CMPN] Digital Logic Design and Analysis Prelim Question Paper Solution

ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN. Week 9 Dr. Srinivas Shakkottai Dept. of Electrical and Computer Engineering

Computer Science Final Examination Friday December 14 th 2001

Sample Test Paper - I

Sequential logic and design

Department of Electrical & Electronics EE-333 DIGITAL SYSTEMS

Appendix B. Review of Digital Logic. Baback Izadi Division of Engineering Programs

Synchronous Sequential Circuit Design. Digital Computer Design

EE 209 Logic Cumulative Exam Name:

University of Toronto Faculty of Applied Science and Engineering Final Examination

ELECTRONICS & COMMUNICATION ENGINEERING PROFESSIONAL ETHICS AND HUMAN VALUES

DHANALAKSHMI COLLEGE OF ENGINEERING, CHENNAI DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING CS6201 DIGITAL PRINCIPLES AND SYSTEM DESIGN

University of Minnesota Department of Electrical and Computer Engineering

Synchronous Sequential Logic

Contents. Chapter 3 Combinational Circuits Page 1 of 36

XI STANDARD [ COMPUTER SCIENCE ] 5 MARKS STUDY MATERIAL.

ECE 341. Lecture # 3

Dr. S. Shirani COE2DI4 Midterm Test #2 Nov. 9, 2010

Written exam with solutions IE Digital Design Friday 21/

Digital Logic and Design (Course Code: EE222) Lecture 19: Sequential Circuits Contd..

Different encodings generate different circuits

SAU1A FUNDAMENTALS OF DIGITAL COMPUTERS

Counters. We ll look at different kinds of counters and discuss how to build them

Fundamentals of Boolean Algebra

Digital Logic Design. Midterm #2

CPE100: Digital Logic Design I

Boolean Algebra and Digital Logic 2009, University of Colombo School of Computing

Digital Design. Sequential Logic

Mealy & Moore Machines

Design at the Register Transfer Level

Logic Design I (17.341) Fall Lecture Outline

Exercise booklet - Logic

Review for B33DV2-Digital Design. Digital Design

Fundamentals of Computer Systems

EE 209 Spiral 1 Exam Solutions Name:

Fundamentals of Computer Systems

ELCT201: DIGITAL LOGIC DESIGN

Digital Logic Design - Chapter 5

LOGIC CIRCUITS. Basic Experiment and Design of Electronics

CPE100: Digital Logic Design I

3. Complete the following table of equivalent values. Use binary numbers with a sign bit and 7 bits for the value

CprE 281: Digital Logic

Review for Test 1 : Ch1 5

Sequential Synchronous Circuit Analysis

Digital Logic: Boolean Algebra and Gates. Textbook Chapter 3

Unit 2 Session - 6 Combinational Logic Circuits

CPE/EE 422/522. Chapter 1 - Review of Logic Design Fundamentals. Dr. Rhonda Kay Gaede UAH. 1.1 Combinational Logic

COMPUTER SCIENCE TRIPOS

DE58/DC58 LOGIC DESIGN DEC 2014

WORKBOOK. Try Yourself Questions. Electrical Engineering Digital Electronics. Detailed Explanations of

Combinational Logic Design Combinational Functions and Circuits

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

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

3 Logic Function Realization with MSI Circuits

CSE 140 Midterm 3 version A Tajana Simunic Rosing Spring 2015

ENEL Digital Circuits Final Examination

Lecture 14: State Tables, Diagrams, Latches, and Flip Flop

Chapter 7 Logic Circuits

UNIVERSITI TENAGA NASIONAL. College of Information Technology

ENEL Digital Circuit Design. Final Examination

LOGIC CIRCUITS. Basic Experiment and Design of Electronics. Ho Kyung Kim, Ph.D.

EECS150 - Digital Design Lecture 17 - Sequential Circuits 3 (Counters)

Appendix A: Digital Logic. Principles of Computer Architecture. Principles of Computer Architecture by M. Murdocca and V. Heuring

Chapter 7. Synchronous Sequential Networks. Excitation for

Vidyalankar S.E. Sem. III [ETRX] Digital Circuits and Design Prelim Question Paper Solution

MAHALAKSHMI ENGINEERING COLLEGE TIRUCHIRAPALLI

CSC 322: Computer Organization Lab

PAST EXAM PAPER & MEMO N3 ABOUT THE QUESTION PAPERS:

Analysis of clocked sequential networks

Combinational Logic. By : Ali Mustafa

Boolean Algebra, Gates and Circuits

S No. Questions Bloom s Taxonomy Level UNIT-I

Digital Electronics Circuits 2017

Written exam with solutions IE1204/5 Digital Design Monday 23/

Ch 7. Finite State Machines. VII - Finite State Machines Contemporary Logic Design 1

Logic and Computer Design Fundamentals. Chapter 8 Sequencing and Control

S.Y. Diploma : Sem. III [CO/CM/IF/CD/CW] Digital Techniques

Digital Electronics II Mike Brookes Please pick up: Notes from the front desk

Transcription:

1 McGill University Faculty of Engineering DIGITAL SYSTEM DESIGN ECSE-323 FINAL EXAMINATION FALL 2008 (December2008) ANSWER KEY STUDENT NAME McGILL I.D. NUMBER Examiner: Prof. J. Clark Signature: Associate Examiner: Prof. Miguel Marin Signature: Date: December 4, 2008 Time: 2:00 pm INSTRUCTIONS: SEE NEXT PAGE.

McGILL UNIVERSITY Electrical and Computer Engineering Department ECSE-323 Fall 2008 FINAL EXAM 2 Question Maximum Points Points Attained Please write down your name: 1 15 2 10 3 20 4 15 5 15 6 15 7 15 8 15 9 15 10 20 11 15 12 10 Total 180 Please write your student ID:ANSWERKEY Instructions/Please read carefully! This is a closed book exam. No books or notes are allowed. You may use a faculty standard calculator. All work is to be done on the attached sheets and under no circumstances are booklets or loose sheets to be used. Write your name at the top of every sheet. Read the question carefully. If something appears ambiguous, write down your assumption. The points have been assigned according to the formula that 1 point = 1 exam minute, so please pace yourself accordingly.

3 Question 1 :Boolean Logic Theory (15 points) The following function, F(A,B,C,D), is given by its k-map representation. K-MAP OF FUNCTION F(A,B,C,D) AB CD 00 01 11 10 00 1 1 1 0 01 1 0 0 0 11 1 1 1 0 10 0 0 1 0 There are two minimal sum-of-products forms of F. (5 points) a) Give the two minimal sum-of-products forms of F, showing the answer on the given k-maps. (5 points) b) Using the Quine-McCluskey method, determine the set of prime implicants of F. (5 points) c) Using the covering table method and the corresponding Petrick function, find the two minimal sum-of-products forms of F. ANSWER FIRST MINIMAL FORM OF F AB CD 00 01 11 10 00 1 1 1 0 01 1 0 0 0 11 1 1 1 0 10 0 0 1 0 SECOND MINIMAL FORM OF F AB CD 00 01 11 10 00 1 1 1 0 01 1 0 0 0 11 1 1 1 0 10 0 0 1 0 F min = A B C + A C D + B C D + A B C F min = A C D + A B D + A B D + B C D b) First and only reduction ID A B C D Prime implicant GROUP A B C D 0 0 0 0 0 P1 (0,1) 0 0 0-1 0 0 0 1 P2 (0,4) 0-0 0 4 0 1 0 0 P3 (1,3) 0 0-1 3 0 0 1 1 P4 (4,12) - 1 0 0 12 1 1 0 0 P5 (3,7) 0-1 1 7 0 1 1 1 P6 (12,14) 1 1-0 14 1 1 1 0 P7 (7,15) - 1 1 1 15 1 1 1 1 P8 (14,15) 1 1 1 -

4 The prime implicants of F are Prime implicants A B C D P1 0 0 0 - A B C P2 0-0 0 A C D P3 0 0-1 A B D P4-1 0 0 B C D P5 0-1 1 A C D P6 1 1-0 A B D P7-1 1 1 B C D P8 1 1 1 - A B C c) COVERING TABLE Minterms Prime implicant GROUP A B C D 0 1 3 4 7 12 14 15 P1 (0,1) 0 0 0 - P2 (0,4) 0-0 0 P3 (1,3) 0 0-1 P4 (4,12) - 1 0 0 P5 (3,7) 0-1 1 P6 (12,14) 1 1-0 P7 (7,15) - 1 1 1 P8 (14,15) 1 1 1 - Petrick function : P = (P1 + P2) (P1 + P3) (P3 + P5) (P2 + P4)(P5 + P7) (P4 + P6) (P6 + P8)(P7 + P8) P = (P1 + P2P3)(P5 + P3P7)(P4 + P2P6)(P8 +P6P7) P = P1P5P4P8 + P2P3P6P7 The two minimal sum-of-products forms are F min = A B C + A C D + B C D + A B C

5 F min = A C D + A B D + A B D + B C D

6 Question 2 : CMOS Technology (10 points) Using only Transmission Gates (TG s) and one inverter draw the circuit of a 1-bit decoder. A 1-bit decoder is a logic circuit that has one input, I, and two outputs, A, B. Each output assumes the value 1 for each one of the binary values of the input. Thus, for each value of the input, there is only one output equal to 1, and the other output equals to 0. The truth table of the 1-bit decoder is shown below INPUT OUTPUTS I A B 0 1 0 1 0 1 Marking scheme: 5 points for a correct solution. 5 extra points for a solution containing ANSWER For each value of I, either 0 or 1 should be passed onto the output variables A and B according to the truth table of the 1-bit decoder and in such a way that both outputs are always assigned. In other words, none of the ouputs should be left flowting. The resulting circuit is shown below

7 Question 3: VHDL (20 points) (10 points) a) Write the Architecture body (only) for a description of the following Boolean function: f = AB + CxorD + CD. Use only component statements and assume that all required components have already been defined (i.e. you only have to do the component instantiations). Continue Question 3b on the next page.

8 Question 3 : VHDL (20 points) (Continued) (10 points) b) Write a complete VHDL description of a 4-bit counter circuit that counts in increments of X-Y, where X and Y are two 4-bit inputs, and wraps around to zero when the count would otherwise be greater than X. No incrementing should be done if X < Y. For example, if X=7 and Y=5 the count sequence should be {0,2,4,6,0,2 }. The circuit should have an asynchronous RESET input as well as a synchronous COUNT_ENABLE input.

9 Question 4 : Combinational Circuit Synthesis (15 points) You are asked to design a combinational logic circuit to be used in determining compatibility of people s blood. For this purpose, peaple s blood has been classified into 4 different types: A, B, AB and O. The rules of blood compatibility between donors and receivers are the following: 1.- Type O can donate blood to any type but receive only O. 2.- Type AB can receive blood from any type but can donate only to AB. 3.- Type A can donate to A or AB and receive from A or O. 4.- Type B can donate to B or AB and receive from B or O The circuit should work thus. For a given pair of donor-receiver, their blood types are entered into the circuit. The output of the circuit, F, assumes the value 1 if the donor blood type is compatible with the receiver blood type. F assumes the value 0 otherwise. (5 points) a) Give the truth table of the circuit and the k-map of F (5 points) b) Draw the circuit, producing F, using fewest number of 4 x 1 Multiplexers (5 points) c) Draw the circuit, producing F, using fewest number of 3-LUT s Hint: Use a binary code, (x,y), to code the four combinations of donor blood type, and, similarly, use a binary code, (w, z), to code the four combinations of receiver blood type. Thus, F is a function of the 4-variables x,y,w,z. ANSWER CODE ASSIGNMENT Donor Receiver BLOOD TYPE X Y W Z O 0 0 0 0 AB 0 1 0 1 A 1 0 1 0 B 1 1 1 1 DONOR O AB B A X Y W Z 00 01 11 10 00 1 0 0 0 01 1 1 1 1 11 1 0 1 0 10 1 0 0 1 O AB B A RECEIVER k-map of function F

10 Question 4 : Combinational Circuit Synthesis (15 points)(continued) b) c) F = x y + w z + x y z + y w z = f1 + f2, where f1 (x, y,z) = x y + x y z f2 (w,y,z ) = w z + y w z x y z f1 0 0 0 1 0 0 1 1 0 1 0 0 0 1 1 0 10 0 0 10 1 0 1 1 0 0 1 1 1 1 w y z f2 a f1 f2 F 0 0 0 0 0 0 0 0 0 0 1 1 0 0 1 1 0 1 0 0 0 1 0 1 0 1 1 1 0 1 1 1 10 0 1 10 0 X 10 1 0 10 1 X 1 1 0 0 1 1 0 X 1 1 1 0 1 1 1 X

11 Question 5 : Testing of Combinational Circuits (15 points) Given the following circuit A B!A C B C i j k F (5 points) a) Find a test vector that detects the fault k stuck-at-0. (5 points) b) Find a test vector that detects the fault k stuck-at-1. (5 points) c) Is the circuit fully testable for all the single stuck-at fault? If not, then explain why and modify the circuit to be completely testable without changing the function.. ANSWER a) b) A B C F F k/0 F F k/0 0 0 0 0 0 0 0 0 1 1 1 0 0 1 0 0 0 0 0 1 1 1 1 0 1 0 0 0 0 0 1 0 1 0 0 0 1 1 0 1 1 0 1 1 1 1 1 0 A B C F F k/1 F F k/1 0 0 0 0 1 1 0 0 1 1 1 0 0 1 0 0 1 1 0 1 1 1 1 0 1 0 0 0 1 1 1 0 1 0 1 1 1 1 0 1 1 0 1 1 1 1 1 0 No vector exists to test k s-at-0 Test vectors for k s-at-1 are {000,010,100,101} c) The circuit is not fully testable because k is not testable for s-at-0 fault. The term BC is redundant. One possibility of a modified fully testable circuit is F = B(A+C) + A B. Another one is F = A B + A C.

12 Question 6: Sequential circuits (15 points) Given a D-type flip-flop, convert it into a JK-type flip-flop. Proceed as follows (5 points) a) Draw the corresponding Mealy-type state transition diagrams for the D-type and JK-type flip-flops. (5 points) b) Derive the input D of the D-type flip-flop in terms of the inputs J and K. (5 points) c) Draw the circuit realization, using AND, OR NOT gates, of the JK-type flipflop using the given D-type flipflop. ANSWER a) b) 1/1 0/0 A 0/0 11/1 10/1 B 1/1 Q Q + J K D 0 0 0 X 0 0 1 1 X 1 1 0 X 1 0 1 1 X 0 1 00/0 01/0 A 01/0 11/0 B 10/1 00/1 c) JK Q 00 01 11 10 0 0 0 1 1 1 1 0 0 1 D = Q J + K Q

13 Question 7: Register and Counter Design (15 points) Using the programmable counter shown in the figure below, produce the circuit of a multiplesequence counter that counts in different sequences depending on the values of the control signals x, y. The counter counts according to the following table: Control signals Counting Mode x y 0 0 Reset counter 0 1 Counter modulo 12 1 0 Counter modulo 10 1 1 Not used (8 points) a) Draw the complete circuit using 4 x 1 multiplexers and gates as needed (7 points) b) Is your counter self-starting? If not, add whatever is needed to make it self-starting. Explain your result. Hint: A modulo-n counter is a counter that follows N different states, and not necessarily following the ascendeing or descending order of the natural sequence. a) For the counter modulo-12 and modulo-10 we use the RCO signal to activate the LOAD reseting the counter to the corresponding initial state of its counting sequence, namely, 4 in the case of modulo-12 and 6 in the case of modulo-10 counter. b) The counter is self starting because what ever the initial state, when RCO is reached, the counter will follow the selected counting mode.

14 Question 8: Circuit Implementation Strategies/Logic arrays (15 points) Given the function F(A,B,C,D) = m(0,2,3,7,9,10,11,14), if Φ (A,D) = A D + A D, (5 points) a) Find F1 such that F (A,B,C,D) = F1[Φ (A,D),B,C] (5 points) b) Program the given PAL schematic to produce F. (5 points) c) Draw a gate logic circuit (using NAND, EXOR, NOT gates) that will produce the function F. a) AB CD 00 01 11 10 00 1 0 0 0 01 0 0 0 1 11 1 1 0 1 10 1 0 1 1 F(A,B,C,D) = B C + A B D + A C D + A C D + A B D The Shannon expansion with respect to B, C produces the following expression F(A,B,C,D) = B C [ A D + A D] + B C[ 1 ] + B C[ 0 ] + B C[ A D + A D ] F(A,B,C,D) = B C [Φ (A,D)] + B C + B C [ Φ (A,D)] F(A,B,C,D) = C Φ + B Φ, where Φ (A,D) = A D + A D. Continue Question 8 on next page..

15 Question 8: Circuit Implementation Strategies/Logic arrays (Continued) b) A B C D X X X X X X X X F c)

16 Question 9: Finite State Machine Design (15 points) Design a Mealy-type finite state machine that has one input X and one output Z. The output Z = 1 if and only if 4 consecutive 1 s have been received at input X, and Z = 0 otherwise. (5 points) a) Give the state transition diagram of this machine using a minimum number of states.(four states are sufficient) (5 points) b) Give the state transition table of the FSM. (5 points) c) Give the minimal two-level NAND-NAND implementation of the FSM using D-type edge-trigger flip-flops. ANSWER a) b) Present state Next state Output Z y1 y2 X =0 X=1 X =0 X=1 S1 = 0 0 00 01 0 0 S2 = 0 1 00 10 0 0 S3 = 1 0 00 11 0 0 S4 = 1 1 00 00 0 1 Y1 Y2 c) DY1 = Y1 = y1 y2 X + y1 y2 X ; DY2 = Y2 = y2 X ; Z = X y1 y2 Continue Question 9 on next page.

17 Question 9: Finite State Machine Design (Continued) X D Q Y1 >!Q Z D Q >!Q Y2

18 Question 10 : Design of Sequential Systems(20 points) Design a datapath/controller system that computes the following continued fraction approximation of log(1+z): x log(1 + x) = x 1+ x 2 + 3 + x Let x be the input to the system, and let y be the output of the system (which should be equal to the approximation to log(1+x)). Let the presence of a new input value be signalled by the rising edge of an external input signal START. Set a signal called DONE to high when the computation is finished. Assume that only one datapath module of each type is available (e.g. one divider, one adder, etc). Provide an asynchronous reset. a) (8 points) Draw the datapath. b) (4 points) List all of the controller inputs and outputs. c) (8 points) Draw the state transition diagram for the controller (use a Moore machine approach). Continue Question 10 on next page.

19 Question 10 : Design of Sequential Systems (Continued)

20 Question 11: Optimization of Finite State Machines (15 points) Simplify the following state table Present Next state Outputs state X = 0 X = 1 Z1 Z2 1 5 3 0 0 2 3 1 0 0 3 2 7 0 0 4 7 1 0 0 5 6 2 1 0 6 5 4 0 0 7 4 7 0 0 (8 points) a) Give the result obtained at each step of the application of the partition method to the given state table. (7 points) b) Give the minimal state table. ANSWER a) Initial sate group: (1 2 3 4 5 6 7) 1 st partition: different outputs : (1 2 3 6 7) (5) 2 nd partition: (1) (2 3 4 6 7)(5) 3 rd partition: (1)(2 3 4 7) (5) (6) 4 th partition: (1) (2,4) (3,7) (5) (6) 5 th and final partition is equal to 4 th partition, therefore the result is (1) (2,4) (3,7) (5) (6). b) Replacing (1) for A, (2,4) for B, (3,7) for C, (5) for D, and (6) for E, we obtain the following minimal state table Present Next state Outputs state X = 0 X = 1 Z1 Z2 A D C 0 0 B C A 0 0 C B C 0 0 D E B 1 0 E D B 0 0

21 Question 12 : Testing of Sequential Circuits (10 points) (5 points) a) Explain why testing of sequential circuits is more difficult than test of combination circuits. (5 points) b) Draw the circuit diagram of a 4-bit MISR (multi-input LFSR for signature analysis).