Docsity

8 Problems Final Exam - Digital Design | ECE 152A, Exams of Electrical and Electronics Engineering

Toggle sidebar
bg1
Name:______________________________________________
Perm #:_____________________________________________
Lab Section TA:______________________________________
ECE 152A-Winter 2005
Prof. Volkan Rodoplu
FINAL EXAMINATION
INSTRUCTIONS:
1. READ THIS PAGE THOROUGHLY WHEN YOU RECEIVE IT, BUT DO NOT
START TURNING TO THE OTHER PAGES UNTIL YOU ARE INSTRUCTED TO
DO SO.
2. WHENEVER INDICATED, YOU MUST WRITE YOUR ANSWERS ON THE
ANSWER LINES PROVIDED IN CERTAIN PROBLEMS. NO PARTIAL CREDIT
WILL BE GIVEN ON THESE PROBLEMS.
3. On other problems, PARTIAL CREDIT will be given only to true statements that
make progress towards the correct answer. Partial credit may be given to correct
reasoning in developing structures such as K-maps, truth tables, state diagrams and state
tables in which the variables are clearly labeled. NO partial credit will be given for
incorrect statements or statements to which no truth value can be assigned (such as a
bunch of numbers or algebraic expressions). NO partial credit will be given for
statements that use symbols that the problem statement or you have not defined. NO
credit will be given for any work that is not clearly labeled with the part and problem
number to which this work provides an answer.
4. All the exam rules in the course syllabus apply to this exam.
5. You may remove the staple from the exam pages, if is more convenient. We will
provide a stapler at the end of the exam.
6. There are 20 pages in this exam (printed on two sides). When you are instructed to
start, first check that you have all the pages.
7. There is a total of 100 points on this exam.
8. Write the solution of each problem in the space provided for that problem.
1
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14

Partial preview of the text

Download 8 Problems Final Exam - Digital Design | ECE 152A and more Exams Electrical and Electronics Engineering in PDF only on Docsity!

Name:______________________________________________

Perm #:_____________________________________________

Lab Section TA:______________________________________

ECE 152A-Winter 2005

Prof. Volkan Rodoplu

FINAL EXAMINATION

INSTRUCTIONS:

1. READ THIS PAGE THOROUGHLY WHEN YOU RECEIVE IT, BUT DO NOT

START TURNING TO THE OTHER PAGES UNTIL YOU ARE INSTRUCTED TO

DO SO.

2. WHENEVER INDICATED, YOU MUST WRITE YOUR ANSWERS ON THE

ANSWER LINES PROVIDED IN CERTAIN PROBLEMS. NO PARTIAL CREDIT

WILL BE GIVEN ON THESE PROBLEMS.

  1. On other problems, PARTIAL CREDIT will be given only to true statements that make progress towards the correct answer. Partial credit may be given to correct reasoning in developing structures such as K-maps, truth tables, state diagrams and state tables in which the variables are clearly labeled. NO partial credit will be given for incorrect statements or statements to which no truth value can be assigned (such as a bunch of numbers or algebraic expressions). NO partial credit will be given for statements that use symbols that the problem statement or you have not defined. NO credit will be given for any work that is not clearly labeled with the part and problem number to which this work provides an answer.
  2. All the exam rules in the course syllabus apply to this exam.
  3. You may remove the staple from the exam pages, if is more convenient. We will provide a stapler at the end of the exam.
  4. There are 20 pages in this exam (printed on two sides). When you are instructed to start, first check that you have all the pages.
  5. There is a total of 100 points on this exam.
  6. Write the solution of each problem in the space provided for that problem.

PROBLEM # 1 ELEMENTARY PROBLEMS [8 points] In this problem, write down your answers in the Answer Box provided at the bottom of the page.

TRUE/FALSE QUESTIONS:

A1. The difference between a Moore and a Mealy machine is that the next state in a Moore machine is a function of only the current output whereas in a Mealy machine, the next state is a function of both the current input and the current output.

A2. The fundamental difference between a positive edge-triggered flip-flop and a positive level-sensitive latch is that the flip-flop samples its data input at the rising clock edge whereas the latch is transparent to its input while the clock is high.

A3. The fundamental difference between Verilog and C++ is that Verilog is a concurrent programming language whereas C++ is a sequential programming language.

B1. For a negative level-sensitive D latch, the data input to the latch must be stable:

a) a D-to-Q delay after the rising edge of the clock b) a set-up time before the falling edge of the clock c) a hold time after the falling edge of the clock d) a set-up time before the rising edge of the clock e) None of the above

Answer Box:

A1 _____________________ (Write "TRUE" or "FALSE") (2 points)

A2 _____________________ (Write "TRUE" or "FALSE") (2 points)

A3 _____________________ (Write "TRUE" or "FALSE") (2 points)

B1 _____________________ (Write "a", "b", "c", "d", or "e") (2 points)

(b) (10 points) Draw the state diagram for a MEALY machine implementation of this FSM. Explain clearly how each state is defined. Define your state variables, and label all of the transition arcs. (Aim for the minimum number of states. Designs that use an unnecessarily large number of states will be penalized.)

PROBLEM # 3 FSMs and VERILOG ________________[12 points] Figure 1 shows the state diagram of a finite state machine that has a 1-bit data input X and a 1-bit output Y. Implement this machine as a module using behavioral Verilog, based directly on this state diagram description. (Note: If Reset is asserted, the machine transitions to state A regardless of the value of its data input X.)

Reset

A

[ 0 ]

D

[1]

C

[1]

B

[0] 0

  • Figure 1 -

Start your work here:

PROBLEM # 4 VERILOG ______________________[15 points] Write down Verilog modules to solve the following problems. (Note that sections (a) and (b) below are independent problems.)

(a) (5 points) Implement in behavioral Verilog , a positive edge-triggered T flip-flop with asynchronous Reset.

PROBLEM # 5______________ADDERS________________________[25 points] Your friend Ace proposes a new adder design that uses “variable-size blocks”. Your job in this problem is to evaluate analytically the delay performance of this new adder, using a 16-bit adder as an example. Figure 3 shows the conceptual diagram of this adder.

a15 a14 a13 a12 a11 a10 a9 a8 a7 a6 a5 a4 a3 a2 a1 a

b15 b14 b13 b12 b11 b10 b9 b8 b7 b6 b5 b4 b3 b2 b1 b +____________________________________________________________________

4-bit CLA adder Hierarchical 8-bit CLA adder 4-bit CLA adder ("Block 2") ("Block 1") ("Block 0")

  • Figure 3 -

In this design, the 16-bit adder is implemented in three consecutive blocks, of sizes 4, 8, and 4 as shown in the figure. The blocks themselves are connected to each other using ripple carry: That is, the carry-out of Block 0 is fed into the carry-in bit of Block 1, and the carry-out of Block 1 is fed into the carry-in bit of Block 2.

Each of the blocks 2 and 0 is implemented as a 4-bit carry lookahead adder (CLA). Block 1 is implemented as a hierarchical 8-bit CLA, made up of two 4-bit CLA's, and a carry lookahead unit connecting the 4-bit CLA's. (This internal structure of the hierarchical 8- bit adder is not shown in Figure 3.)

Throughout the delay analysis in this problem, ASSUME THAT THE DELAY OF EACH GATE IS 1, REGARDLESS OF THE FAN-IN OR FAN-OUT OF THAT GATE.

(a) (20 points) Evaluate the worst-case delay of this 16-bit adder. Carefully draw the blocks, their inputs and outputs as a separate figure below. Carefully define all of your variables (e.g. the propagates and generates) and indicate the scope of each variable in your equations) and show these variables on the blocks in your figure. Show when each of the variables in your figure becomes available and how the worst-case delay of the adder is calculated.

Finally, write down your answer for the worst-case delay of this 16-bit adder below:

Answer: ______________________________________________________________

(b) (5 points) What is the critical path of this 16-bit adder? Give two inputs that achieve the critical delay of the adder. You must fully justify your answer.

Inside the C_L Block, the circuitry is as follows:

A

D Q

CLK

Q

D Q

CLK

B

Flip-flop: TYPE F

Flip-flop: TYPE F

A

X

C_L Block

B

Q1 Y

  • Figure 4 -

(a) (5 points) Compute the minimum clock period such that this fragment of the pipeline will operate correctly.

Answer: ________________________________________________________________

(b) (3 points) Compute the minimum duration for which both of the inputs A and B have to remain stable after the rising edge of the clock:

Answer: _______________________________________________________

(c) (3 points) Compute the minimum duration for which the input A has to remain stable before the rising edge of the clock:

Answer: ________________________________________________________

(3 points) What is the disadvantage of the new design that uses a higher clock frequency?

Answer Box:

(Do your additional work below:)