the german university in cairo csen 605: digital system...

10
The German University in Cairo CSEN 605: Digital System Design Dr.Mohamed Elmahdy Eng.Yasmin Mohamed Media Engineering and Technology Winter 2015 Problem Set 6 Solution Analysis of Clocked Sequential Circuits Discussion: 7/11/2015 – 14/11/2015 FSM Analysis Steps : 1) Define input equations to flip flops 2) Define State equations 3) State table Where number of states =2 number of fliplflops+number of inputs 4) State diagram Note : if there is no individual output , then next states can be output Mealy and Moore : Mealy : Next state depends on inputs and present state Moore : Next states depends on inputs Flip Flops Summary: Problem set taken from: Digital Design 4th Edition by M. Morris Mano. For further exercises check problems of chapter 5.

Upload: phungkhanh

Post on 12-Apr-2018

258 views

Category:

Documents


5 download

TRANSCRIPT

Page 1: The German University in Cairo CSEN 605: Digital System …met.guc.edu.eg/Download.ashx?id=19681&file=ProblemSet6... · The German University in Cairo CSEN 605: Digital System Design

The German University in Cairo CSEN 605: Digital System Design Dr.Mohamed Elmahdy Eng.Yasmin Mohamed

Media Engineering and Technology Winter 2015

Problem Set 6

Solution

Analysis of Clocked Sequential Circuits

Discussion: 7/11/2015 – 14/11/2015 FSM Analysis Steps :

1) Define input equations to flip flops

2) Define State equations

3) State table

Where number of states =2number of fliplflops+number of inputs

4) State diagram

Note : if there is no individual output , then next states can be output

Mealy and Moore :

Mealy : Next state depends on inputs and present state

Moore : Next states depends on inputs

Flip Flops Summary:

Problem set taken from: Digital Design 4th Edition by M. Morris Mano. For further exercises check problems of chapter 5.

Page 2: The German University in Cairo CSEN 605: Digital System …met.guc.edu.eg/Download.ashx?id=19681&file=ProblemSet6... · The German University in Cairo CSEN 605: Digital System Design

The German University in Cairo CSEN 605: Digital System Design Dr.Mohamed Elmahdy Eng.Yasmin Mohamed

Media Engineering and Technology Winter 2015

*Exercise 6-1: (Problem 5.10)

A sequential circuit has two JK flip-flops A and B, two inputs x and y, and one output z. The flip-flop input equations and circuit output equation are

Flip flop A Ja= B.x + B'.Y'

Ka=B' . x . Y'

Flip Flop B

Jb= A'x

kB=A + x.Y'

a) Draw the logic diagram of the circuit.

***Draw the circuit for the z.

jasmin
Typewriter
B
jasmin
Typewriter
X
jasmin
Typewriter
jasmin
Typewriter
Y
jasmin
Typewriter
jasmin
Typewriter
jasmin
Typewriter
A
jasmin
Typewriter
A'
jasmin
Typewriter
B
jasmin
Typewriter
B'
jasmin
Typewriter
jasmin
Typewriter
jasmin
Typewriter
jasmin
Typewriter
A
Page 3: The German University in Cairo CSEN 605: Digital System …met.guc.edu.eg/Download.ashx?id=19681&file=ProblemSet6... · The German University in Cairo CSEN 605: Digital System Design

The German University in Cairo CSEN 605: Digital System Design Dr.Mohamed Elmahdy Eng.Yasmin Mohamed

Media Engineering and Technology Winter 2015

b) Tabulate the state table and draw the state diagram.

01/0

00

11/0

00/1 01/0

01

10/0

10/0

00/1 10/0

01/0 11 00/1 10/0 11/0

00/1 01/0 10/0 11/0 10

jasmin
Typewriter
jasmin
Oval
jasmin
Oval
jasmin
Oval
jasmin
Oval
jasmin
Arrow
jasmin
Arrow
jasmin
Arrow
jasmin
Arrow
jasmin
Arrow
jasmin
Arrow
jasmin
Arrow
jasmin
Arrow
jasmin
Arrow
jasmin
Oval
jasmin
Arrow
jasmin
Oval
jasmin
Pencil
Page 4: The German University in Cairo CSEN 605: Digital System …met.guc.edu.eg/Download.ashx?id=19681&file=ProblemSet6... · The German University in Cairo CSEN 605: Digital System Design

The German University in Cairo CSEN 605: Digital System Design Dr.Mohamed Elmahdy Eng.Yasmin Mohamed

Media Engineering and Technology Winter 2015

c) Derive the state equations for A and B.

B(t+1) = A’B’x + A’Bx’ + A’By = A’B’x + A’B(x’+y)

Page 5: The German University in Cairo CSEN 605: Digital System …met.guc.edu.eg/Download.ashx?id=19681&file=ProblemSet6... · The German University in Cairo CSEN 605: Digital System Design

The German University in Cairo CSEN 605: Digital System Design Dr.Mohamed Elmahdy Eng.Yasmin Mohamed

Media Engineering and Technology Winter 2015

*Exercise 6-5: (Problem 5.29)

Write a behavioral description of the state machine described by the state diagram shown in figure of exercise 4-4. Write a test bench and verify the functionality of the description.

Page 6: The German University in Cairo CSEN 605: Digital System …met.guc.edu.eg/Download.ashx?id=19681&file=ProblemSet6... · The German University in Cairo CSEN 605: Digital System Design

The German University in Cairo CSEN 605: Digital System Design Dr.Mohamed Elmahdy Eng.Yasmin Mohamed

Media Engineering and Technology Winter 2015

*Exercise 6-7: (Problem 5.31)

How should the code below be written so that the circuit has the same behavior when the assignments are made with = instead of <= ?

Page 7: The German University in Cairo CSEN 605: Digital System …met.guc.edu.eg/Download.ashx?id=19681&file=ProblemSet6... · The German University in Cairo CSEN 605: Digital System Design

The German University in Cairo CSEN 605: Digital System Design Dr.Mohamed Elmahdy Eng.Yasmin Mohamed

Media Engineering and Technology Winter 2015

*Exercise 6-8 (5.8 in book ) Derive the state table and the state diagram of the sequential circuit shown in Fig. P 5.8. Explain the function that the circuit performs. (HDL—see Problem 5.36.)

Page 8: The German University in Cairo CSEN 605: Digital System …met.guc.edu.eg/Download.ashx?id=19681&file=ProblemSet6... · The German University in Cairo CSEN 605: Digital System Design

The German University in Cairo CSEN 605: Digital System Design Dr.Mohamed Elmahdy Eng.Yasmin Mohamed

Media Engineering and Technology Winter 2015

Exercise 6-9 (5.11 in book)

For the circuit described by the state diagram of Fig.5.16 ,

(a) * Determine the state transitions and output sequence that will be generated when an input

sequence of 010110111011110 is applied to the circuit and it is initially in the state 00.

(b) Find all of the equivalent states in Fig. 5 .16 and draw a simpler, but equivalent, state diagram.

(c) Using D flip-flops, design the equivalent machine (including its logic diagram) described by the

state diagram in (b).

jasmin
Typewriter
jasmin
Typewriter
1
jasmin
Typewriter
Page 9: The German University in Cairo CSEN 605: Digital System …met.guc.edu.eg/Download.ashx?id=19681&file=ProblemSet6... · The German University in Cairo CSEN 605: Digital System Design

The German University in Cairo CSEN 605: Digital System Design Dr.Mohamed Elmahdy Eng.Yasmin Mohamed

Media Engineering and Technology Winter 2015

Solution :

Page 10: The German University in Cairo CSEN 605: Digital System …met.guc.edu.eg/Download.ashx?id=19681&file=ProblemSet6... · The German University in Cairo CSEN 605: Digital System Design

The German University in Cairo CSEN 605: Digital System Design Dr.Mohamed Elmahdy Eng.Yasmin Mohamed

Media Engineering and Technology Winter 2015