EET 310 FFs.pptrljones/310/homework/Chap6/EET 310 FFs.pdf · CLK CLK CLKedge CLK CLK CLKCLK...

136
11/17/2011 1 EET 310 Flip-Flops

Transcript of EET 310 FFs.pptrljones/310/homework/Chap6/EET 310 FFs.pdf · CLK CLK CLKedge CLK CLK CLKCLK...

Page 1: EET 310 FFs.pptrljones/310/homework/Chap6/EET 310 FFs.pdf · CLK CLK CLKedge CLK CLK CLKCLK Trailing CLKedge Leading CLKedge CLKedge CLK CLK These circuits work by using the fact

11/17/2011 1

EET 310Flip-Flops

Page 2: EET 310 FFs.pptrljones/310/homework/Chap6/EET 310 FFs.pdf · CLK CLK CLKedge CLK CLK CLKCLK Trailing CLKedge Leading CLKedge CLKedge CLK CLK These circuits work by using the fact

11/17/2011 2

FF’s and some Definitions

Clock Input: FF’s are controlled by a trigger orClock signal. All FF’s have a clock input. If a devicewhich attempts to do a FF’s task does not havea Clock then it is a LATCH, not a FF.

Page 3: EET 310 FFs.pptrljones/310/homework/Chap6/EET 310 FFs.pdf · CLK CLK CLKedge CLK CLK CLKCLK Trailing CLKedge Leading CLKedge CLKedge CLK CLK These circuits work by using the fact

11/17/2011 3

FF’s and some Definitions

Synchronous Input: Controls the device based onthe timing from a clock signal. When the clockingsignal occurs, the synchronous input is allowed toaffect the output. If the signal does not occur thesynchronous input can not affect anything.

Page 4: EET 310 FFs.pptrljones/310/homework/Chap6/EET 310 FFs.pdf · CLK CLK CLKedge CLK CLK CLKCLK Trailing CLKedge Leading CLKedge CLKedge CLK CLK These circuits work by using the fact

11/17/2011 4

Clk

Q

Q

D

CLR

PRE

AsynchronousInput

AsynchronousInput

SynchronousInput

ClockInput

Asynchronous Input: Affects the output withoutwaiting for a clocking signal. It IGNORESthe clock.

Page 5: EET 310 FFs.pptrljones/310/homework/Chap6/EET 310 FFs.pdf · CLK CLK CLKedge CLK CLK CLKCLK Trailing CLKedge Leading CLKedge CLKedge CLK CLK These circuits work by using the fact

11/17/2011 5

Pre and Clr Inputs‘PRE’ InputThe ‘PRE’ input will cause the Q output to SET (goHIGH) when a ‘0’ is applied to the PRE input. Thisoccurs ASYNCHRONOUSLY (without the clock).

Page 6: EET 310 FFs.pptrljones/310/homework/Chap6/EET 310 FFs.pdf · CLK CLK CLKedge CLK CLK CLKCLK Trailing CLKedge Leading CLKedge CLKedge CLK CLK These circuits work by using the fact

11/17/2011 6

Pre and Clr Inputs‘PRE’ InputThe ‘PRE’ input will cause the Q output to SET (goHIGH) when a ‘0’ is applied to the PRE input. Thisoccurs ASYNCHRONOUSLY (without the clock).

‘CLR’ InputThe ‘CLR’ input will cause the Q output to RESET (goLOW) when a ‘0’ is applied to the ‘CLR’ input. Thisoccurs ASYNCHRONOUSLY (without the clock).

Page 7: EET 310 FFs.pptrljones/310/homework/Chap6/EET 310 FFs.pdf · CLK CLK CLKedge CLK CLK CLKCLK Trailing CLKedge Leading CLKedge CLKedge CLK CLK These circuits work by using the fact

11/17/2011 7

The PRE and CLR inputsACTIVE HIGH or LOW?The activity level of an input or output is determined by the existence of an invertingbubble on the terminal or not. Both thePRE and the CLR inputs below are ACTIVELOW inputs. This means that a ‘0’ is required on the input in order for theinput to affect the output.

Clk

Q

Q

D

CLR

PRE

Page 8: EET 310 FFs.pptrljones/310/homework/Chap6/EET 310 FFs.pdf · CLK CLK CLKedge CLK CLK CLKCLK Trailing CLKedge Leading CLKedge CLKedge CLK CLK These circuits work by using the fact

11/17/2011 8

The CLOCKThere are three types of clock inputs:• Level Triggered (not used often)• Leading Edge Triggered• Trailing Edge Triggered (pictured below)

Page 9: EET 310 FFs.pptrljones/310/homework/Chap6/EET 310 FFs.pdf · CLK CLK CLKedge CLK CLK CLKCLK Trailing CLKedge Leading CLKedge CLKedge CLK CLK These circuits work by using the fact

11/17/2011 9

Level TriggeringThe problem with this type of triggering is that the input could change millions of times during each ‘Level” period, thus affectingthe output millions of times.

Page 10: EET 310 FFs.pptrljones/310/homework/Chap6/EET 310 FFs.pdf · CLK CLK CLKedge CLK CLK CLKCLK Trailing CLKedge Leading CLKedge CLKedge CLK CLK These circuits work by using the fact

11/17/2011 10

Leading Edge Triggering

Clk‘0’

‘1’

time

V(t)

The “Leading” edge of each pulse will allow “one and only

one” input event for each edge to affect the output.

Page 11: EET 310 FFs.pptrljones/310/homework/Chap6/EET 310 FFs.pdf · CLK CLK CLKedge CLK CLK CLKCLK Trailing CLKedge Leading CLKedge CLKedge CLK CLK These circuits work by using the fact

11/17/2011 11

Trailing Edge Triggering

Page 12: EET 310 FFs.pptrljones/310/homework/Chap6/EET 310 FFs.pdf · CLK CLK CLKedge CLK CLK CLKCLK Trailing CLKedge Leading CLKedge CLKedge CLK CLK These circuits work by using the fact

11/17/2011 12

How the edge trigger is accomplished

CLK

CLK

CLKedge

CLKCLK CLK CLKTrailing

CLKedgeLeading

CLKedge

CLKedge

CLK

CLK

These circuits work by using the fact thatthere is no such thing as an “ideal” gate. Instead, there exists a delay from the inputand the output. The gate on the far rightis a “negative logic” representation of a NOR gate.

Page 13: EET 310 FFs.pptrljones/310/homework/Chap6/EET 310 FFs.pdf · CLK CLK CLKedge CLK CLK CLKCLK Trailing CLKedge Leading CLKedge CLKedge CLK CLK These circuits work by using the fact

11/17/2011 13

The RS FF• The RS FF is not seen much anymore

except on tests and in textbooks.

S R Q Q0 0 0 00 0 1 10 1 0 00 1 1 01 0

Neve

0 11 0 1 11 1 01

rN1 1 ever

• The S=1,R=1 condition should never be allowed to happen.

Page 14: EET 310 FFs.pptrljones/310/homework/Chap6/EET 310 FFs.pdf · CLK CLK CLKedge CLK CLK CLKCLK Trailing CLKedge Leading CLKedge CLKedge CLK CLK These circuits work by using the fact

11/17/2011 14

The ‘D’ Flip-flop

Clk

Q

Q

D

CLR

PRE

‘1’

‘1’

The ‘D’ Flip-flop output will take on thevalue of the ‘D’ input. So, if there is alogic ‘1’ on the ‘D’ input when the triggerevent occurs, the ‘1’ will be transferred to the output until the next trigger event. At that point, if ‘D’ changes to a logic ‘0’, so will the Q output.

Page 15: EET 310 FFs.pptrljones/310/homework/Chap6/EET 310 FFs.pdf · CLK CLK CLKedge CLK CLK CLKCLK Trailing CLKedge Leading CLKedge CLKedge CLK CLK These circuits work by using the fact

11/17/2011 15

Present State and Next State• QP = Present state:

The state of the output before the clock signal.

• QN = Q+ = Next state:The state the output will attain based on the flip-flop synchronous inputs after the clock signal occurs. It is what will happen in the FUTURE!

Some books use Qn for present state and Qn+1 for next state.

Page 16: EET 310 FFs.pptrljones/310/homework/Chap6/EET 310 FFs.pdf · CLK CLK CLKedge CLK CLK CLKCLK Trailing CLKedge Leading CLKedge CLKedge CLK CLK These circuits work by using the fact

11/17/2011 16

D FF Transitions

When D is ‘0’ and the present state, Qp, is ‘0’, then the next state , Qn, is ‘0’.

p NQ Q0 00

D

0 11 01 1

Page 17: EET 310 FFs.pptrljones/310/homework/Chap6/EET 310 FFs.pdf · CLK CLK CLKedge CLK CLK CLKCLK Trailing CLKedge Leading CLKedge CLKedge CLK CLK These circuits work by using the fact

11/17/2011 17

D FF Transitions

When D is ‘0’ and Qp, is ‘1’ then Qn is ‘0’.

p N

0 0 0Q Q

1 00

D

1 01 1

Page 18: EET 310 FFs.pptrljones/310/homework/Chap6/EET 310 FFs.pdf · CLK CLK CLKedge CLK CLK CLKCLK Trailing CLKedge Leading CLKedge CLKedge CLK CLK These circuits work by using the fact

11/17/2011 18

D FF Transitions

When D is ‘1’, and Qp is ‘0’, then Qn, is ‘1’.

p N

0 0 00 1 01

D Q Q

0 11 1

Page 19: EET 310 FFs.pptrljones/310/homework/Chap6/EET 310 FFs.pdf · CLK CLK CLKedge CLK CLK CLKCLK Trailing CLKedge Leading CLKedge CLKedge CLK CLK These circuits work by using the fact

11/17/2011 19

D FF Transitions

When D is ‘1’ and Qp, is ‘1’, then Qn, is ‘1’.

p N

0 0 00 1 01

D Q Q

0 11 1 1

Page 20: EET 310 FFs.pptrljones/310/homework/Chap6/EET 310 FFs.pdf · CLK CLK CLKedge CLK CLK CLKCLK Trailing CLKedge Leading CLKedge CLKedge CLK CLK These circuits work by using the fact

11/17/2011 20

D FF wrap up

p N

0 0 00 1 01

D Q Q

0 11 1 1

We note that whenever the D input is a ‘0’, the output will be ‘Reset’ no matter what the present state is.

Page 21: EET 310 FFs.pptrljones/310/homework/Chap6/EET 310 FFs.pdf · CLK CLK CLKedge CLK CLK CLKCLK Trailing CLKedge Leading CLKedge CLKedge CLK CLK These circuits work by using the fact

11/17/2011 21

D FF wrap up

p N

0 0 00 1 01

D Q Q

0 11 1 1

Whenever the D input is a ‘1’, the output will be ‘Set’, no matter what the present state is.

Page 22: EET 310 FFs.pptrljones/310/homework/Chap6/EET 310 FFs.pdf · CLK CLK CLKedge CLK CLK CLKCLK Trailing CLKedge Leading CLKedge CLKedge CLK CLK These circuits work by using the fact

11/17/2011 22

D FF wrap upp N

0 0 00 1 01

D Q Q

0 11 1 1

The main thing to note here is that the NEXT STATE column is always the same as the D column in a D-FF

Page 23: EET 310 FFs.pptrljones/310/homework/Chap6/EET 310 FFs.pdf · CLK CLK CLKedge CLK CLK CLKCLK Trailing CLKedge Leading CLKedge CLKedge CLK CLK These circuits work by using the fact

11/17/2011 23

D FF wrap upp N

0 0 00 1 01

D Q Q

0 11 1 1

The D FF performs two basic named functions:Data: The D-ff is one of the most basic memorycells. Data placed on the input “D” is transferred tothe output “Q” and “stored” there until it is replacedduring the next clock active period.

Page 24: EET 310 FFs.pptrljones/310/homework/Chap6/EET 310 FFs.pdf · CLK CLK CLKedge CLK CLK CLKCLK Trailing CLKedge Leading CLKedge CLKedge CLK CLK These circuits work by using the fact

11/17/2011 24

D FF wrap upp N

0 0 00 1 01

D Q Q

0 11 1 1

The D FF performs two basic named functions:Data: The D-ff is one of the most basic memorycells. Data placed on the input “D” is transferred tothe output “Q” and “stored” there until it is replacedduring the next clock active period.Delay: Data placed on the input “D” is delayed in itstransition to the output “Q” until the clocks active period occurs.

Page 25: EET 310 FFs.pptrljones/310/homework/Chap6/EET 310 FFs.pdf · CLK CLK CLKedge CLK CLK CLKCLK Trailing CLKedge Leading CLKedge CLKedge CLK CLK These circuits work by using the fact

11/17/2011 25

The ‘T’ Flip-flop Transitions

Clk

Q

Q

T

CLR

PRE

‘1’

‘1’

For a ‘T’ FF, whenever the T input is ‘0’, theoutput will be in a ‘Hold’ condition in which whatever Qp is will be held there until the next trigger or clock event.

p N

0 0 00 1 11

T Q Q

0 11 1 0

Page 26: EET 310 FFs.pptrljones/310/homework/Chap6/EET 310 FFs.pdf · CLK CLK CLKedge CLK CLK CLKCLK Trailing CLKedge Leading CLKedge CLKedge CLK CLK These circuits work by using the fact

11/17/2011 26

The ‘T’ Flip-flop Transitions

Clk

Q

Q

T

CLR

PRE

‘1’

‘1’

p N

0 0 00 1 11

T Q Q

0 11 1 0

Whenever the T input is ‘1’. the output willbe in a “Toggle’ condition where if Qpis ‘0’ the output will toggle to a ‘1’ and vice versa.

Page 27: EET 310 FFs.pptrljones/310/homework/Chap6/EET 310 FFs.pdf · CLK CLK CLKedge CLK CLK CLKCLK Trailing CLKedge Leading CLKedge CLKedge CLK CLK These circuits work by using the fact

11/17/2011 27

The ‘JK’ Flip-flop Transitions

Clk

Q

Q

J

CLR

PRE

‘1’

‘1’

K

p N

0 0 0 00 0 1 10 1

Row012345

00 1 11 0 01 0 11 1 0

J

6

K Q Q

7 1 1 1For a JK-ff, when both the J and K inputsare at a logic ‘0’ the output will be in aHOLD condition.

Page 28: EET 310 FFs.pptrljones/310/homework/Chap6/EET 310 FFs.pdf · CLK CLK CLKedge CLK CLK CLKCLK Trailing CLKedge Leading CLKedge CLKedge CLK CLK These circuits work by using the fact

11/17/2011 28

The ‘JK’ Flip-flop Transitions

Clk

Q

Q

J

CLR

PRE

‘1’

‘1’

K

p N

0 0 0 00 0 1 10 1 0

Row012345

J

00 1 1 01 0 01 0 11 1 06

K Q Q

7 1 1 1When J = 0 and K = 1 the output willbe in a RESET condition no matter whatpresent state is.

Page 29: EET 310 FFs.pptrljones/310/homework/Chap6/EET 310 FFs.pdf · CLK CLK CLKedge CLK CLK CLKCLK Trailing CLKedge Leading CLKedge CLKedge CLK CLK These circuits work by using the fact

11/17/2011 29

The ‘JK’ Flip-flop Transitions

Clk

Q

Q

J

CLR

PRE

‘1’

‘1’

K

p N

0 0 0 00 0 1 10 1 0 00 1 1 01 0 0 1

Row0123456

J K Q Q

1 0 1 11 1 0

7 1 1 1When J = 1 and K = 0 the output willbe in a SET condition no matter whatpresent state is.

Page 30: EET 310 FFs.pptrljones/310/homework/Chap6/EET 310 FFs.pdf · CLK CLK CLKedge CLK CLK CLKCLK Trailing CLKedge Leading CLKedge CLKedge CLK CLK These circuits work by using the fact

11/17/2011 30

The ‘JK’ Flip-flop Transitions

Clk

Q

Q

J

CLR

PRE

‘1’

‘1’

K

p NRow01234

J K Q Q0 0 0 00 0 1 10 1 0 00 1 1 01 0 0 11 0 1 11

567

1 0 11 1 1 0

When J = 1 and K = 1 the output willbe in a TOGGLE condition no matter whatpresent state is.

Page 31: EET 310 FFs.pptrljones/310/homework/Chap6/EET 310 FFs.pdf · CLK CLK CLKedge CLK CLK CLKCLK Trailing CLKedge Leading CLKedge CLKedge CLK CLK These circuits work by using the fact

11/17/2011 31

The JK used as a T-FFBefore simplifying the JK truth table we

can note that the table looks like it is made up of both the T and the D flip-flops.

• We can convert the JK into a T-FF by simply shorting the two inputs togetherand using the resulting input as a T input.

Clk

Q

Q

J

CLR

PRE

‘1’

‘1’

K

T

p N

0 0 0 00 0

Row0123

1 1

1 1 0

J K Q

4567

1

Q

1 1 1 0

Page 32: EET 310 FFs.pptrljones/310/homework/Chap6/EET 310 FFs.pdf · CLK CLK CLKedge CLK CLK CLKCLK Trailing CLKedge Leading CLKedge CLKedge CLK CLK These circuits work by using the fact

11/17/2011 32

The JK used as a D-FFAll that is necessary to convert a JK

into a D-FF is to place an inverter between the J and the K inputs so that they will always be opposite values.

Clk

Q

Q

J

CLR

PRE

‘1’

‘1’

K

D

p NRow01234

J K Q Q

0 1 0 00 1 1 01 0 0 11 05 1 1

67

Page 33: EET 310 FFs.pptrljones/310/homework/Chap6/EET 310 FFs.pdf · CLK CLK CLKedge CLK CLK CLKCLK Trailing CLKedge Leading CLKedge CLKedge CLK CLK These circuits work by using the fact

11/17/2011 33

Simplifying the JK truth tableWe can simplify the JK table and

make it more useful at the same time by introducing the concept of the “Don’t Care”.

• An input is in a “Don’t Care” state when it really doesn’t matter what value is placed on the input. There will be no change on the output due to any value on the input.

Page 34: EET 310 FFs.pptrljones/310/homework/Chap6/EET 310 FFs.pdf · CLK CLK CLKedge CLK CLK CLKCLK Trailing CLKedge Leading CLKedge CLKedge CLK CLK These circuits work by using the fact

11/17/2011 34

The State Transition Table• We start out by switching the order of

the columns so that the state transitions are first. The table now becomes a “Transition Table”.

P N

0 00 11 01

Q JQ K

1

Page 35: EET 310 FFs.pptrljones/310/homework/Chap6/EET 310 FFs.pdf · CLK CLK CLKedge CLK CLK CLKCLK Trailing CLKedge Leading CLKedge CLKedge CLK CLK These circuits work by using the fact

11/17/2011 35

The ‘0’ to ‘0’ transitionNext we look for the two rows that have

transitions from state ‘0’ to state ‘0’. Note that it doesn’t matter what value K assumes because the transition remains the same. So we place a ‘0’ in the J column and an Xfor “don’t care’ in the K column.

p NRow01234

J K Q Q0 0 0 00 0 1 10 1 0 00 1 1 01 0 0 11 0 1 11

567

1 0 11 1 1 0

P NQ Q0 X0 0

0

J

1 1

K

11 0

Page 36: EET 310 FFs.pptrljones/310/homework/Chap6/EET 310 FFs.pdf · CLK CLK CLKedge CLK CLK CLKCLK Trailing CLKedge Leading CLKedge CLKedge CLK CLK These circuits work by using the fact

11/17/2011 36

The ‘0’ to ‘1’ transitionNext we look for the two rows that

have transitions from state ‘0’ to state ‘1’. Note that it doesn’t matter what value Kassumes because the transition remains the same. So we place a ‘1’ in the J column and an X for “don’t care’ in the K column.

p N

0 0 1 1

0 1 1 01 0 0 11 0

Row0123456

1 11 1 0 1

7

J K Q Q

1 1 1 0

P N J K0 X0 0

0 1

Q Q

1 X1 01 1

Page 37: EET 310 FFs.pptrljones/310/homework/Chap6/EET 310 FFs.pdf · CLK CLK CLKedge CLK CLK CLKCLK Trailing CLKedge Leading CLKedge CLKedge CLK CLK These circuits work by using the fact

11/17/2011 37

The ‘1’ to ‘0’ transitionNext we look for the two rows that have

transitions from state ‘1’ to state ‘0’. Note that it doesn’t matter what value J assumes because the transition remains the same. So we place a ‘1’ in the K column and an Xfor “don’t care’ in the J column.

p NRow01234

J K Q Q

0 0 1 1

0 1 1 0

1567

0 1 1

1 1 1 0

P N

0 00

J K0 X11

1 X1

Q

1X

1

Q

0

Page 38: EET 310 FFs.pptrljones/310/homework/Chap6/EET 310 FFs.pdf · CLK CLK CLKedge CLK CLK CLKCLK Trailing CLKedge Leading CLKedge CLKedge CLK CLK These circuits work by using the fact

11/17/2011 38

The ‘1’ to ‘1’ transitionNext we look for the two rows that

have transitions from state ‘1’ to state ‘1’. Note that it doesn’t matter what value Jassumes because the transition remains the same. So we place a ‘0’ in the K column and an X for “don’t care’ in the J column.

p N

0 0 1 1

Row012345 1 0

J K Q Q

1 167

P N

0 00 1

J K0 X1

1

Q Q

X 0

X0

1 1X 1

Page 39: EET 310 FFs.pptrljones/310/homework/Chap6/EET 310 FFs.pdf · CLK CLK CLKedge CLK CLK CLKCLK Trailing CLKedge Leading CLKedge CLKedge CLK CLK These circuits work by using the fact

11/17/2011 39

Timing Diagrams• Quite often it is necessary to examine

how a circuit acts given a set of input signals. The tool used to accomplish this is the Timing Diagram.

• Use a set of signals to examine how the JK-FF below reacts. Note that the PRE and CLR inputs are not set at any logic level.

Page 40: EET 310 FFs.pptrljones/310/homework/Chap6/EET 310 FFs.pdf · CLK CLK CLKedge CLK CLK CLKCLK Trailing CLKedge Leading CLKedge CLKedge CLK CLK These circuits work by using the fact

11/17/2011 40

Timing Diagrams• The figure below is the framework for a

“Timing” diagram. Since the JK-FF had a trailing edge trigger, vertical lines have been added to remind the user about trigger events.

Page 41: EET 310 FFs.pptrljones/310/homework/Chap6/EET 310 FFs.pdf · CLK CLK CLKedge CLK CLK CLKCLK Trailing CLKedge Leading CLKedge CLKedge CLK CLK These circuits work by using the fact

11/17/2011 41

Timing Diagrams• A signals has been added for the PRE

input. Since it is an asynchronous input, a vertical line has been to mark the edges where the input was active.

Page 42: EET 310 FFs.pptrljones/310/homework/Chap6/EET 310 FFs.pdf · CLK CLK CLKedge CLK CLK CLKCLK Trailing CLKedge Leading CLKedge CLKedge CLK CLK These circuits work by using the fact

11/17/2011 42

Timing Diagrams• The Q output is marked at a HIGH level

during the time that PRE was LOW. Again, it makes no difference what the clock is doing here.

Page 43: EET 310 FFs.pptrljones/310/homework/Chap6/EET 310 FFs.pdf · CLK CLK CLKedge CLK CLK CLKCLK Trailing CLKedge Leading CLKedge CLKedge CLK CLK These circuits work by using the fact

11/17/2011 43

Timing Diagrams• Since there is no way that Q can change

until the next trailing edge, the HIGH level extended.

Page 44: EET 310 FFs.pptrljones/310/homework/Chap6/EET 310 FFs.pdf · CLK CLK CLKedge CLK CLK CLKCLK Trailing CLKedge Leading CLKedge CLKedge CLK CLK These circuits work by using the fact

11/17/2011 44

Timing Diagrams• Now a CLR signal is added with its

vertical markers showing the period when the signal is low.

Page 45: EET 310 FFs.pptrljones/310/homework/Chap6/EET 310 FFs.pdf · CLK CLK CLKedge CLK CLK CLKCLK Trailing CLKedge Leading CLKedge CLKedge CLK CLK These circuits work by using the fact

11/17/2011 45

Timing Diagrams• The LOW on the CLR line causes Q to go

LOW asynchronously.

clock

Pre

Clr

J

K

Q

Page 46: EET 310 FFs.pptrljones/310/homework/Chap6/EET 310 FFs.pdf · CLK CLK CLKedge CLK CLK CLKCLK Trailing CLKedge Leading CLKedge CLKedge CLK CLK These circuits work by using the fact

11/17/2011 46

Timing Diagrams• Next, J and K signals are added.

Page 47: EET 310 FFs.pptrljones/310/homework/Chap6/EET 310 FFs.pdf · CLK CLK CLKedge CLK CLK CLKCLK Trailing CLKedge Leading CLKedge CLKedge CLK CLK These circuits work by using the fact

11/17/2011 47

Timing Diagrams• At this point the problem would need to

state what the initial state is. In this case, the initial state is y0 = 0.

Page 48: EET 310 FFs.pptrljones/310/homework/Chap6/EET 310 FFs.pdf · CLK CLK CLKedge CLK CLK CLKCLK Trailing CLKedge Leading CLKedge CLKedge CLK CLK These circuits work by using the fact

11/17/2011 48

Timing Diagrams• The Initial state of y0 = 0 is added to

the Q output. It should go up to the 1st

trailing edge but this time it goes up to where PRE forces the output HIGH.

Page 49: EET 310 FFs.pptrljones/310/homework/Chap6/EET 310 FFs.pdf · CLK CLK CLKedge CLK CLK CLKCLK Trailing CLKedge Leading CLKedge CLKedge CLK CLK These circuits work by using the fact

11/17/2011 49

Timing Diagrams• Note that if the initial state isn’t given,

the state becomes indeterminate until the first trigger event.

clock

Pre

Clr

J

K

Q

Page 50: EET 310 FFs.pptrljones/310/homework/Chap6/EET 310 FFs.pdf · CLK CLK CLKedge CLK CLK CLKCLK Trailing CLKedge Leading CLKedge CLKedge CLK CLK These circuits work by using the fact

11/17/2011 50

Timing Diagrams• OK, back to the original initial state.

Note that PRE holds the output HIGH till the second trailing edge so J and K don’t matter till then.

Page 51: EET 310 FFs.pptrljones/310/homework/Chap6/EET 310 FFs.pdf · CLK CLK CLKedge CLK CLK CLKCLK Trailing CLKedge Leading CLKedge CLKedge CLK CLK These circuits work by using the fact

11/17/2011 51

Timing Diagrams• At the 2nd trigger, J = 0 and K = 0, so

the FF is in a HOLD condition. Q stays HIGH till trigger 3.

Page 52: EET 310 FFs.pptrljones/310/homework/Chap6/EET 310 FFs.pdf · CLK CLK CLKedge CLK CLK CLKCLK Trailing CLKedge Leading CLKedge CLKedge CLK CLK These circuits work by using the fact

11/17/2011 52

Timing Diagrams• At the 3rd trigger, J = 1 and K = 0, so

the FF is in a SET condition. Q stays HIGH till trigger 4 since it was already set.

Page 53: EET 310 FFs.pptrljones/310/homework/Chap6/EET 310 FFs.pdf · CLK CLK CLKedge CLK CLK CLKCLK Trailing CLKedge Leading CLKedge CLKedge CLK CLK These circuits work by using the fact

11/17/2011 53

Timing Diagrams• At the 4th trigger, J = 0 and K = 1, so

the FF is in a RESET condition. Q goes low until the next trigger (or in this case until it runs into the CLR’d output).

clock

Pre

Clr

J

K

Q

Page 54: EET 310 FFs.pptrljones/310/homework/Chap6/EET 310 FFs.pdf · CLK CLK CLKedge CLK CLK CLKCLK Trailing CLKedge Leading CLKedge CLKedge CLK CLK These circuits work by using the fact

11/17/2011 54

Frequency Division• A T- FF is also known as a frequency divider.

• Obviously, if it divides frequency then it multiplies time (or periods).

Page 55: EET 310 FFs.pptrljones/310/homework/Chap6/EET 310 FFs.pdf · CLK CLK CLKedge CLK CLK CLKCLK Trailing CLKedge Leading CLKedge CLKedge CLK CLK These circuits work by using the fact

11/17/2011 55

Frequency Division• Before we go any further, lets review the concept of duty cycle.

• Duty cycle is the ratio of Time High to the Period expressed as a percentage.

HTD 100T

Page 56: EET 310 FFs.pptrljones/310/homework/Chap6/EET 310 FFs.pdf · CLK CLK CLKedge CLK CLK CLKCLK Trailing CLKedge Leading CLKedge CLKedge CLK CLK These circuits work by using the fact

11/17/2011 56

Frequency Division• Duty cycle is the ratio of Time High to the Period expressed as a percentage.

• So, if you look at the waveform below, you see the measurements for time high and period.

HTD 100T

Page 57: EET 310 FFs.pptrljones/310/homework/Chap6/EET 310 FFs.pdf · CLK CLK CLKedge CLK CLK CLKCLK Trailing CLKedge Leading CLKedge CLKedge CLK CLK These circuits work by using the fact

11/17/2011 57

Frequency Division• The duty cycle for this waveform is:

HTD 100T250 s 1001%ms

25

Page 58: EET 310 FFs.pptrljones/310/homework/Chap6/EET 310 FFs.pdf · CLK CLK CLKedge CLK CLK CLKCLK Trailing CLKedge Leading CLKedge CLKedge CLK CLK These circuits work by using the fact

11/17/2011 58

Frequency Division• Now, lets supply a 25% duty cycle clock to a two T-FF ripple counter.

Page 59: EET 310 FFs.pptrljones/310/homework/Chap6/EET 310 FFs.pdf · CLK CLK CLKedge CLK CLK CLKCLK Trailing CLKedge Leading CLKedge CLKedge CLK CLK These circuits work by using the fact

11/17/2011 59

Frequency Division• The 1st FF output, y0, will toggle with each clock trailing edge.

Clk

y0

y1

1ms 2ms 3ms 4ms 5ms

Page 60: EET 310 FFs.pptrljones/310/homework/Chap6/EET 310 FFs.pdf · CLK CLK CLKedge CLK CLK CLKCLK Trailing CLKedge Leading CLKedge CLKedge CLK CLK These circuits work by using the fact

11/17/2011 60

Frequency Division• The 2nd FF output, y1, will toggle with each of the 1st FF’s trailing edges.

Clk

y0

y1

1ms 2ms 3ms 4ms 5ms

Page 61: EET 310 FFs.pptrljones/310/homework/Chap6/EET 310 FFs.pdf · CLK CLK CLKedge CLK CLK CLKCLK Trailing CLKedge Leading CLKedge CLKedge CLK CLK These circuits work by using the fact

11/17/2011 61

Frequency Division• Now, lets examine the waveform for y0.

• Note that the duty cycle is now 50%. This is one of the effects of a T-FF.

Clk

y0

y1

1ms 2ms 3ms 4ms 5ms

Page 62: EET 310 FFs.pptrljones/310/homework/Chap6/EET 310 FFs.pdf · CLK CLK CLKedge CLK CLK CLKCLK Trailing CLKedge Leading CLKedge CLKedge CLK CLK These circuits work by using the fact

11/17/2011 62

Frequency Division• The period (T) of y0 is 2ms which is twice the period of the clock. The period has been MULTIPLIED by 2!

Clk

y0

y1

1ms 2ms 3ms 4ms 5ms

Page 63: EET 310 FFs.pptrljones/310/homework/Chap6/EET 310 FFs.pdf · CLK CLK CLKedge CLK CLK CLKCLK Trailing CLKedge Leading CLKedge CLKedge CLK CLK These circuits work by using the fact

11/17/2011 63

Frequency Division• The frequency of the clock was:

Clk

y0

y1

1ms 2ms 3ms 4ms 5ms

1 1T 1m

f khs

1 z

Page 64: EET 310 FFs.pptrljones/310/homework/Chap6/EET 310 FFs.pdf · CLK CLK CLKedge CLK CLK CLKCLK Trailing CLKedge Leading CLKedge CLKedge CLK CLK These circuits work by using the fact

11/17/2011 64

Frequency DivisionThe Frequency of y0 is:

The Frequency has been divided by 2.

Clk

y0

y1

1ms 2ms 3ms 4ms 5ms

12ms

f 500hz

Page 65: EET 310 FFs.pptrljones/310/homework/Chap6/EET 310 FFs.pdf · CLK CLK CLKedge CLK CLK CLKCLK Trailing CLKedge Leading CLKedge CLKedge CLK CLK These circuits work by using the fact

11/17/2011 65

Frequency DivisionThe Frequency of y1 is:

• This is one half of y1 and one fourth of the clocks period!

Clk

y0

y1

1ms 2ms 3ms 4ms 5ms

14ms

f 250hz

Page 66: EET 310 FFs.pptrljones/310/homework/Chap6/EET 310 FFs.pdf · CLK CLK CLKedge CLK CLK CLKCLK Trailing CLKedge Leading CLKedge CLKedge CLK CLK These circuits work by using the fact

11/17/2011 66

Clock Slew Error• Also known as timing skew, Clock skew is a phenomenon in synchronous circuits in which the clock signal reaches different components at different times.

Page 67: EET 310 FFs.pptrljones/310/homework/Chap6/EET 310 FFs.pdf · CLK CLK CLKedge CLK CLK CLKCLK Trailing CLKedge Leading CLKedge CLKedge CLK CLK These circuits work by using the fact

11/17/2011 67

Clock Slew Error• Also known as timing skew, Clock skew is a phenomenon in synchronous circuits in which the clock signal reaches different components at different times.

• The causes vary but the problem can cause serious glitches in some types of circuits.

Page 68: EET 310 FFs.pptrljones/310/homework/Chap6/EET 310 FFs.pdf · CLK CLK CLKedge CLK CLK CLKCLK Trailing CLKedge Leading CLKedge CLKedge CLK CLK These circuits work by using the fact

11/17/2011 68

Master/Slave JK-FF’s• The Master/Slave JK was designed to

compensate for the clock skew problem.

Page 69: EET 310 FFs.pptrljones/310/homework/Chap6/EET 310 FFs.pdf · CLK CLK CLKedge CLK CLK CLKCLK Trailing CLKedge Leading CLKedge CLKedge CLK CLK These circuits work by using the fact

11/17/2011 69

Master/Slave JK-FF’s• The Master/Slave JK was designed to

compensate for the clock skew problem.• This JK contains two latches connected

serially. The first latch is designed to accept the data from the JK inputs on the leading clock edge.

Page 70: EET 310 FFs.pptrljones/310/homework/Chap6/EET 310 FFs.pdf · CLK CLK CLKedge CLK CLK CLKCLK Trailing CLKedge Leading CLKedge CLKedge CLK CLK These circuits work by using the fact

11/17/2011 70

Master/Slave JK-FF’s• The Master/Slave JK was designed to

compensate for the clock skew problem.• This JK contains two latches connected

serially. The first latch is designed to accept the data from the JK inputs on the leading clock edge.

• After the leading edge the contents of the JK inputs are held in the first latch. The inputs could continue to change but will not be accepted. (of course, in reality there exists about a 20ns setup time after the edge as well).

Page 71: EET 310 FFs.pptrljones/310/homework/Chap6/EET 310 FFs.pdf · CLK CLK CLKedge CLK CLK CLKCLK Trailing CLKedge Leading CLKedge CLKedge CLK CLK These circuits work by using the fact

11/17/2011 71

Master/Slave JK-FF’s• The 2nd latch doesn’t act on the JK input

instructions till the Trailing Edge of the clock.

Page 72: EET 310 FFs.pptrljones/310/homework/Chap6/EET 310 FFs.pdf · CLK CLK CLKedge CLK CLK CLKCLK Trailing CLKedge Leading CLKedge CLKedge CLK CLK These circuits work by using the fact

11/17/2011 72

Master/Slave JK-FF’s• The 2nd latch doesn’t act on the JK input

instructions till the Trailing Edge of the clock.

• This concept is known as “Data Lockout”.

Page 73: EET 310 FFs.pptrljones/310/homework/Chap6/EET 310 FFs.pdf · CLK CLK CLKedge CLK CLK CLKCLK Trailing CLKedge Leading CLKedge CLKedge CLK CLK These circuits work by using the fact

11/17/2011 73

Master/Slave JK-FF’s• Data Lockout is analogous to a diver

entering a submarine thru an airlock.

Page 74: EET 310 FFs.pptrljones/310/homework/Chap6/EET 310 FFs.pdf · CLK CLK CLKedge CLK CLK CLKCLK Trailing CLKedge Leading CLKedge CLKedge CLK CLK These circuits work by using the fact

11/17/2011 74

Master/Slave JK-FF’s• Data Lockout is analogous to a diver

entering a submarine thru an airlock.

Page 75: EET 310 FFs.pptrljones/310/homework/Chap6/EET 310 FFs.pdf · CLK CLK CLKedge CLK CLK CLKCLK Trailing CLKedge Leading CLKedge CLKedge CLK CLK These circuits work by using the fact

11/17/2011 75

Master/Slave JK-FF’s• Data Lockout is analogous to a diver

entering a submarine thru an airlock.

Page 76: EET 310 FFs.pptrljones/310/homework/Chap6/EET 310 FFs.pdf · CLK CLK CLKedge CLK CLK CLKCLK Trailing CLKedge Leading CLKedge CLKedge CLK CLK These circuits work by using the fact

11/17/2011 76

The State Diagram• A very useful design tool is the State Diagram.

Page 77: EET 310 FFs.pptrljones/310/homework/Chap6/EET 310 FFs.pdf · CLK CLK CLKedge CLK CLK CLKCLK Trailing CLKedge Leading CLKedge CLKedge CLK CLK These circuits work by using the fact

11/17/2011 77

The State Diagram• A very useful design tool is the State Diagram.

• A State Diagram allows you visualize the state progression of a state machine (Ch. 8).

Page 78: EET 310 FFs.pptrljones/310/homework/Chap6/EET 310 FFs.pdf · CLK CLK CLKedge CLK CLK CLKCLK Trailing CLKedge Leading CLKedge CLKedge CLK CLK These circuits work by using the fact

11/17/2011 78

The State Diagram• A very useful design tool is the State Diagram.

• A State Diagram allows you visualize the state progression of a state machine (Ch. 8).

• The State Diagram can precede the state table or follow it.

Page 79: EET 310 FFs.pptrljones/310/homework/Chap6/EET 310 FFs.pdf · CLK CLK CLKedge CLK CLK CLKCLK Trailing CLKedge Leading CLKedge CLKedge CLK CLK These circuits work by using the fact

11/17/2011 79

The State Diagram• A very useful design tool is the State Diagram.

• A State Diagram allows you visualize the state progression of a state machine (Ch. 8).

• The State Diagram can precede the state table or follow it.

• There are some categories of state machine which depend totally on the State Diagram (Sequence Detector, Ch. 8).

Page 80: EET 310 FFs.pptrljones/310/homework/Chap6/EET 310 FFs.pdf · CLK CLK CLKedge CLK CLK CLKCLK Trailing CLKedge Leading CLKedge CLKedge CLK CLK These circuits work by using the fact

11/17/2011 80

A Two-State Diagram• Lets start out with a two-state diagram.

Page 81: EET 310 FFs.pptrljones/310/homework/Chap6/EET 310 FFs.pdf · CLK CLK CLKedge CLK CLK CLKCLK Trailing CLKedge Leading CLKedge CLKedge CLK CLK These circuits work by using the fact

11/17/2011 81

A Two-State Diagram• Lets start out with a two-state diagram.• A state is represented by a bubble with

the state ID in the center.

Page 82: EET 310 FFs.pptrljones/310/homework/Chap6/EET 310 FFs.pdf · CLK CLK CLKedge CLK CLK CLKCLK Trailing CLKedge Leading CLKedge CLKedge CLK CLK These circuits work by using the fact

11/17/2011 82

A Two-State Diagram• Lets start out with a two-state diagram.• A state is represented by a bubble with

the state ID in the center.• This ID could be a state variable, or it

could be the actual state.

Page 83: EET 310 FFs.pptrljones/310/homework/Chap6/EET 310 FFs.pdf · CLK CLK CLKedge CLK CLK CLKCLK Trailing CLKedge Leading CLKedge CLKedge CLK CLK These circuits work by using the fact

11/17/2011 83

A Two-State Diagram• Lets start out with a two-state diagram.• A state is represented by a bubble with

the state ID in the center.• This ID could be a state variable, or it

could be the actual state.• Or, it could have both as shown here.

Page 84: EET 310 FFs.pptrljones/310/homework/Chap6/EET 310 FFs.pdf · CLK CLK CLKedge CLK CLK CLKCLK Trailing CLKedge Leading CLKedge CLKedge CLK CLK These circuits work by using the fact

11/17/2011 84

A Two-State Diagram• All state diagrams MUST have a legend.

Page 85: EET 310 FFs.pptrljones/310/homework/Chap6/EET 310 FFs.pdf · CLK CLK CLKedge CLK CLK CLKCLK Trailing CLKedge Leading CLKedge CLKedge CLK CLK These circuits work by using the fact

11/17/2011 85

A Two-State Diagram• All state diagrams MUST have a legend.• This legend is normally a rectangle placed

somewhere on the periphery of the diagram

Page 86: EET 310 FFs.pptrljones/310/homework/Chap6/EET 310 FFs.pdf · CLK CLK CLKedge CLK CLK CLKCLK Trailing CLKedge Leading CLKedge CLKedge CLK CLK These circuits work by using the fact

11/17/2011 86

A Two-State Diagram• All state diagrams MUST have a legend.• This legend is normally a rectangle placed

somewhere on the periphery of the diagram

• The contents vary with the problem but normally consists of an input followed by a / and then the output.

Page 87: EET 310 FFs.pptrljones/310/homework/Chap6/EET 310 FFs.pdf · CLK CLK CLKedge CLK CLK CLKCLK Trailing CLKedge Leading CLKedge CLKedge CLK CLK These circuits work by using the fact

11/17/2011 87

A Two-State Diagram• All state diagrams MUST have a legend.• This legend is normally a rectangle placed

somewhere on the periphery of the diagram

• The contents vary with the problem but normally consists of an input (X) followed by a / and then the output (Z).

Page 88: EET 310 FFs.pptrljones/310/homework/Chap6/EET 310 FFs.pdf · CLK CLK CLKedge CLK CLK CLKCLK Trailing CLKedge Leading CLKedge CLKedge CLK CLK These circuits work by using the fact

11/17/2011 88

A Two-State Diagram• Note that the Q output of a FF (or a

counter chip) is not really an output (from a state machine design perspective)

• Instead, it is a STATE.• Outputs are the result of additional

circuitry attached to the circuit.

Page 89: EET 310 FFs.pptrljones/310/homework/Chap6/EET 310 FFs.pdf · CLK CLK CLKedge CLK CLK CLKCLK Trailing CLKedge Leading CLKedge CLKedge CLK CLK These circuits work by using the fact

11/17/2011 89

A Two-State Diagram• For this example, if the input (X) is a 0

and the Present State is A, then the Next state will be A. The circuit outputwill be a 0.

A/0 B/1

X0/Z

0/0

Page 90: EET 310 FFs.pptrljones/310/homework/Chap6/EET 310 FFs.pdf · CLK CLK CLKedge CLK CLK CLKCLK Trailing CLKedge Leading CLKedge CLKedge CLK CLK These circuits work by using the fact

11/17/2011 90

A Two-State Diagram• For this example, if the input (X) is a 0

and the Present State is A, then the Next state will be A. The circuit outputwill be a 0.

• Note that if the legend was not present there would be no way to determine what the contents of the arrow meant!

A/0 B/1

X0/Z

0/0

Page 91: EET 310 FFs.pptrljones/310/homework/Chap6/EET 310 FFs.pdf · CLK CLK CLKedge CLK CLK CLKCLK Trailing CLKedge Leading CLKedge CLKedge CLK CLK These circuits work by using the fact

11/17/2011 91

A Two-State Diagram• Next, if the input (X) is a 1 and the

Present State is A, then the Next statewill be B and the circuit output will be a 1.

Page 92: EET 310 FFs.pptrljones/310/homework/Chap6/EET 310 FFs.pdf · CLK CLK CLKedge CLK CLK CLKCLK Trailing CLKedge Leading CLKedge CLKedge CLK CLK These circuits work by using the fact

11/17/2011 92

A Two-State Diagram• Next, if the input (X) is a 0 and the

Present State is B, then the Next statewill be B and the circuit output will be a 1.

Page 93: EET 310 FFs.pptrljones/310/homework/Chap6/EET 310 FFs.pdf · CLK CLK CLKedge CLK CLK CLKCLK Trailing CLKedge Leading CLKedge CLKedge CLK CLK These circuits work by using the fact

11/17/2011 93

A Two-State Diagram• And finally, if the input (X) is a 1 and

the Present State is B, then the Next state will be A and the circuit output will be a 0.

A/0 B/1

X0/Z

0/0

1/1

0/1

1/0

Page 94: EET 310 FFs.pptrljones/310/homework/Chap6/EET 310 FFs.pdf · CLK CLK CLKedge CLK CLK CLKCLK Trailing CLKedge Leading CLKedge CLKedge CLK CLK These circuits work by using the fact

11/17/2011 94

A JK FF State Diagram• Lets examine what the state diagram for

a JK-FF would look like. Note that a JK-FF, just like any FF, does not have an output, just a state out. For this reason, the legend will be J/K.

Page 95: EET 310 FFs.pptrljones/310/homework/Chap6/EET 310 FFs.pdf · CLK CLK CLKedge CLK CLK CLKCLK Trailing CLKedge Leading CLKedge CLKedge CLK CLK These circuits work by using the fact

11/17/2011 95

A JK FF State Diagram• Any single FF will result in a two-state

diagram. We will call state 0, A and state 1, B.

Page 96: EET 310 FFs.pptrljones/310/homework/Chap6/EET 310 FFs.pdf · CLK CLK CLKedge CLK CLK CLKCLK Trailing CLKedge Leading CLKedge CLKedge CLK CLK These circuits work by using the fact

11/17/2011 96

A JK FF State Diagram• It might help at this point to remind

ourselves of the JK Transition Table

P N

0 00 1

J K0 X1

1X

X 1X 0

01 1

Q Q

Page 97: EET 310 FFs.pptrljones/310/homework/Chap6/EET 310 FFs.pdf · CLK CLK CLKedge CLK CLK CLKCLK Trailing CLKedge Leading CLKedge CLKedge CLK CLK These circuits work by using the fact

11/17/2011 97

A JK FF State Diagram• According to the table, if J is 0 and Qp

is 0, then QN will be 0. Note that K is a don’t care.

P N

0

Q

1

Q J K

1 XX 1X

1

0 0

1 1 00

0 X

Page 98: EET 310 FFs.pptrljones/310/homework/Chap6/EET 310 FFs.pdf · CLK CLK CLKedge CLK CLK CLKCLK Trailing CLKedge Leading CLKedge CLKedge CLK CLK These circuits work by using the fact

11/17/2011 98

A JK FF State Diagram• According to the table, if J is 1 and Qp

is 0, then QN will be 1.

P NQ Q

0 1 1

J K

X0 0

1

0 X

X 1X 0

01 1

Page 99: EET 310 FFs.pptrljones/310/homework/Chap6/EET 310 FFs.pdf · CLK CLK CLKedge CLK CLK CLKCLK Trailing CLKedge Leading CLKedge CLKedge CLK CLK These circuits work by using the fact

11/17/2011 99

A JK FF State Diagram• According to the table, if J is 1 and Qp

is 0, then QN will be 1.

P NQ Q

0 1 1

J K

X0 0

1

0 X

X 1X 0

01 1

Page 100: EET 310 FFs.pptrljones/310/homework/Chap6/EET 310 FFs.pdf · CLK CLK CLKedge CLK CLK CLKCLK Trailing CLKedge Leading CLKedge CLKedge CLK CLK These circuits work by using the fact

11/17/2011 100

A JK FF State Diagram• According to the table, if K is 1 and Qp

is 1, then QN will be 0. Note that J is now a don’t care.

P N

0 00 1

J K0 X1

Q Q

1 0X

X1 01X 1

Page 101: EET 310 FFs.pptrljones/310/homework/Chap6/EET 310 FFs.pdf · CLK CLK CLKedge CLK CLK CLKCLK Trailing CLKedge Leading CLKedge CLKedge CLK CLK These circuits work by using the fact

11/17/2011 101

A JK FF State Diagram• And finally, if K is 0 and Qp is 1, then

QN will be 1.

P N

0 00 1

J K0 X1

1

Q Q

1 1 X 0

X0 X 1

Page 102: EET 310 FFs.pptrljones/310/homework/Chap6/EET 310 FFs.pdf · CLK CLK CLKedge CLK CLK CLKCLK Trailing CLKedge Leading CLKedge CLKedge CLK CLK These circuits work by using the fact

11/17/2011 102

Problem Example• Consider a sequential circuit having one

input (x), 2 states (y2 and y1), and one output variable. (Note: The book got the y2 and y1 backwards.

• Make the indicated state assignments. The initial state of the machine is y0 = A. 2 1

A 00B 01

State y y

C 10D 11

Page 103: EET 310 FFs.pptrljones/310/homework/Chap6/EET 310 FFs.pdf · CLK CLK CLKedge CLK CLK CLKCLK Trailing CLKedge Leading CLKedge CLKedge CLK CLK These circuits work by using the fact

11/17/2011 103

Problem Example• If the circuit has the following input (x)

sequence applied to it: X=0110101100,the following behavior will be observed:

2 1

A 00B 01

State y y

C 10D 11

0 1 1 0 1 0 1 1 0 0A D B A D B B A C C C

Trigger 0 1 2 3 4 5 6 7 8 9 10xPSNSz

D B A D B B A C C C0 1 0 0 1 1 0 1 1 1

Page 104: EET 310 FFs.pptrljones/310/homework/Chap6/EET 310 FFs.pdf · CLK CLK CLKedge CLK CLK CLKCLK Trailing CLKedge Leading CLKedge CLKedge CLK CLK These circuits work by using the fact

11/17/2011 104

Problem Example• Using the provided answer, create a

state table. The left side of the table starts the same as always. The state assignment table was used to assign the state variables.

2 1 2 1

0 0 A 00 0 B 10 1 C 0

1 0 A 01 0 B

x y y z

0 1 D 1

1 1 C 01

1 1 D 1

Y Y

2 1

A 00B 01

State y y

C 10D 11

Page 105: EET 310 FFs.pptrljones/310/homework/Chap6/EET 310 FFs.pdf · CLK CLK CLKedge CLK CLK CLKCLK Trailing CLKedge Leading CLKedge CLKedge CLK CLK These circuits work by using the fact

11/17/2011 105

Problem Example• Use the behavior table to complete the

next state and output columns:2 1 2 1

0 0 A 0 D 00 0 B 10 1 C 0

1 0 A 01 0 B

x y y z

0 1 D 1

1 1 C 01

1 1 D 1

Y Y0 1 ...A D ..

Trig 0 1 ...xPSN

.D B ...S

z 0 1 ...

Page 106: EET 310 FFs.pptrljones/310/homework/Chap6/EET 310 FFs.pdf · CLK CLK CLKedge CLK CLK CLKCLK Trailing CLKedge Leading CLKedge CLKedge CLK CLK These circuits work by using the fact

11/17/2011 106

Problem Example• Use the behavior table to complete the

next state and output columns:2 1 2 1

0 0 A 0 D 00 0 B 10 1 C 0

1 0 A 01 0 B 1

x y y z

0 1 D 1

11 1 B

C 01

1D 1

Y Y0 1 ...A D ..

Trig 0 1 ...xPSN

.D B ...S

z 0 1 ...

Page 107: EET 310 FFs.pptrljones/310/homework/Chap6/EET 310 FFs.pdf · CLK CLK CLKedge CLK CLK CLKCLK Trailing CLKedge Leading CLKedge CLKedge CLK CLK These circuits work by using the fact

11/17/2011 107

Problem Example• Use the behavior table to complete the

next state and output columns:2 1 2 1x y y z

0

0 0 A 0 D 00 0 B 10 1 C 0

1 0 A 01 0 B 1 A

1 D 1

1 1 C0

1 10

D 1 B 1

Y Y... 1 0 1 ...... B A D ...... A D B ..

Trig 2

...

3 4xP

. 0 0

SNSz 1 ...

Page 108: EET 310 FFs.pptrljones/310/homework/Chap6/EET 310 FFs.pdf · CLK CLK CLKedge CLK CLK CLKCLK Trailing CLKedge Leading CLKedge CLKedge CLK CLK These circuits work by using the fact

11/17/2011 108

Problem Example• Use the behavior table to complete the

next state and output columns:2 1 2 1x y y z

0

0 0 A 0 D 00 0 B 10 1 C 0

1 0 A 01 0 B 1 A

1 D 1

1 1 C0

1 10

D 1 B 1

Y Y... 1 0 1 ...... B A D ...... A D B ..

Trig 2

...

3 4xP

. 0 0

SNSz 1 ...

Already finishedcolumns 3 and 4associated tablerows.

Page 109: EET 310 FFs.pptrljones/310/homework/Chap6/EET 310 FFs.pdf · CLK CLK CLKedge CLK CLK CLKCLK Trailing CLKedge Leading CLKedge CLKedge CLK CLK These circuits work by using the fact

11/17/2011 109

Problem Example• Use the behavior table to complete the

next state and output columns:2 1 2 1

0 0 A 0 D 00 0 B 10 1 C 0

1 0 A 01 0 B 1 A

x y y z

B 1

0 1 D 1

1 1 C0

1 10

D 1 B 1

Y Y... 0 1 1 ...... B B A ...... B A C ..

Trig 5

...

6 7xP

. 1 0

SNSz 1 ...

Page 110: EET 310 FFs.pptrljones/310/homework/Chap6/EET 310 FFs.pdf · CLK CLK CLKedge CLK CLK CLKCLK Trailing CLKedge Leading CLKedge CLKedge CLK CLK These circuits work by using the fact

11/17/2011 110

Problem Example• Use the behavior table to complete the

next state and output columns:2 1 2 1x y y z

0

0 0 A 0 D 00 0 B 1 B 10 1 C 0

1 0 A 01 0 B 1

1 D 1C 1

1 1 C 0A 0

1 1 D 1 B 1

Y Y... 0 1 1 ...... B B A ...... B A C ..

Trig 5

...

6 7xP

. 1 0

SNSz 1 ...

Column 6 wasn’tneeded.

Page 111: EET 310 FFs.pptrljones/310/homework/Chap6/EET 310 FFs.pdf · CLK CLK CLKedge CLK CLK CLKCLK Trailing CLKedge Leading CLKedge CLKedge CLK CLK These circuits work by using the fact

11/17/2011 111

Problem Example• Use the behavior table to complete the

next state and output columns:2 1 2 1x y y z

C 1

0 0 A 0 D 00 0 B 1 B 10 1 C 0

1 0 A 0 C 11 0 B

0 1 D 1

1 1 C 01 A 0

1 1 D 1 B 1

Y Y... 0 0... C C C

Trigger 8 9 10

... C

xPSNSz

C... 1 1

Page 112: EET 310 FFs.pptrljones/310/homework/Chap6/EET 310 FFs.pdf · CLK CLK CLKedge CLK CLK CLKCLK Trailing CLKedge Leading CLKedge CLKedge CLK CLK These circuits work by using the fact

11/17/2011 112

Problem Example• Use the behavior table to complete the

next state and output columns:2 1 2 1

0 0 A 0 D 00 0 B 1 B 10 1 C 0 C 1

1 0 A 0 C 11 0 B 1 A 0

x y y z

0 1 D 1

11 1 B

C 01

1D 1

Y YRows 3 and 6 are not covered by theproblem so are considered to be undefined or “illegal” states.

Page 113: EET 310 FFs.pptrljones/310/homework/Chap6/EET 310 FFs.pdf · CLK CLK CLKedge CLK CLK CLKCLK Trailing CLKedge Leading CLKedge CLKedge CLK CLK These circuits work by using the fact

11/17/2011 113

Problem Example• Use the behavior table to complete the

next state and output columns:2 1 2 1x y y z

0 1

0 0 A 0 D 00 0 B 1 B 10 1 C 0 C 1

1 0 A 0 C 11 0 B 1

D 1 A 0

1 1 C 0 D 0A 0

1 1 D 1 B 1

Y YSo, the designer is free to assign them in such a way as to lead to “legal” states.

Page 114: EET 310 FFs.pptrljones/310/homework/Chap6/EET 310 FFs.pdf · CLK CLK CLKedge CLK CLK CLKCLK Trailing CLKedge Leading CLKedge CLKedge CLK CLK These circuits work by using the fact

11/17/2011 114

Problem Example• Use the state assignment table to

complete the Next state columns ID’s.2 1 2 1x y y z

0 1 D 1

0 0 A 0 D 00 0 B 1 B 10 1 C 0 C 1

1 0 A 0 C 11 0 B 1 0 A

0 A 0 0

1 1 C 0 D 00 0

1 1 D 1 B 1

Y Y2 1State y y

A 0B 01C 1

0

0D 11

Page 115: EET 310 FFs.pptrljones/310/homework/Chap6/EET 310 FFs.pdf · CLK CLK CLKedge CLK CLK CLKCLK Trailing CLKedge Leading CLKedge CLKedge CLK CLK These circuits work by using the fact

11/17/2011 115

Problem Example• Use the state assignment table to

complete the Next state columns ID’s.2 1 2 1x y y z

0 1 D 1

0 0 A 0 D 00 0 B 1 0 B 1 10 1 C 0 C 1

1 0 A 0 C 11 0 B 1 0 A 0

0 A 0 0

1 1 C 00

1 1 D 1 1 1D 0

0 B

Y Y2 1

A 0State y y

B0

C 1010

D 11

Page 116: EET 310 FFs.pptrljones/310/homework/Chap6/EET 310 FFs.pdf · CLK CLK CLKedge CLK CLK CLKCLK Trailing CLKedge Leading CLKedge CLKedge CLK CLK These circuits work by using the fact

11/17/2011 116

Problem Example• Use the state assignment table to

complete the Next state columns ID’s.2 1 2 1x y y z

0 1 D 1

0 0 A 0 D 00 0 B 1 0 B 1 10 1 C 0 1 C 0 1

1 0 A 0 1 C 0 11 0 B 1 0 A

0 A 0 0

1 1 C 00 0

1 1 D 1 1 1D 0

0 B

Y Y2 1

A 00B 01

State y y

C 10D 11

Page 117: EET 310 FFs.pptrljones/310/homework/Chap6/EET 310 FFs.pdf · CLK CLK CLKedge CLK CLK CLKCLK Trailing CLKedge Leading CLKedge CLKedge CLK CLK These circuits work by using the fact

11/17/2011 117

Problem Example• Use the state assignment table to

complete the Next state columns ID’s.2 1 2 1x y y z

0 1 D 1

0 0 A 0 1 D 1 00 0 B 1 0 B 1 10 1 C 0 1 C 0 1

1 0 A 0 1 C 0 11 0 B 1 0 A 0

0 A 0 0

1 1 C 0 10

1 1 D 1D 1

1 10

0 B

Y Y2 1

A 00B 01

State y y

C 10D 11

Page 118: EET 310 FFs.pptrljones/310/homework/Chap6/EET 310 FFs.pdf · CLK CLK CLKedge CLK CLK CLKCLK Trailing CLKedge Leading CLKedge CLKedge CLK CLK These circuits work by using the fact

11/17/2011 118

Problem Example• Before going, convert the table to a more

concise form.2 1 2 1x y y z

0 1 D 1

0 0 A 0 1 D 1 00 0 B 1 0 B 1 10 1 C 0 1 C 0 1

1 0 A 0 1 C 0 11 0 B 1 0 A 0

0 A 0 0

1 1 C 0 10

1 1 D 1D 1

1 10

0 B

Y Y

2 1

NS NSPS

y y / z / z0 A

X 0

0 D

X

/ 00 B 1

1

1

1 C 0D 1

2 1 2 1Y Y Y Y

Page 119: EET 310 FFs.pptrljones/310/homework/Chap6/EET 310 FFs.pdf · CLK CLK CLKedge CLK CLK CLKCLK Trailing CLKedge Leading CLKedge CLKedge CLK CLK These circuits work by using the fact

11/17/2011 119

Problem Example• Before going, convert the table to a more

concise form.2 1 2 1x y y z

0 1 D 1 0 A 0 0

0 0 B 1 0 B 1 10 1 C 0 1 C 0 1

1 0 A 0 1 C 0 1

1 1 C 0 1 D 11 0 B 1 0 A 0 0

1 1 D 1 1 10

0 B

Y Y

2 1

NS NSPS

y y /0 A 0 D / 0 C /10 B 11 C

X 0 X 1

01 D

z / z

1

2 1 2 1Y Y Y Y

Page 120: EET 310 FFs.pptrljones/310/homework/Chap6/EET 310 FFs.pdf · CLK CLK CLKedge CLK CLK CLKCLK Trailing CLKedge Leading CLKedge CLKedge CLK CLK These circuits work by using the fact

11/17/2011 120

Problem Example• Before going, convert the table to a more

concise form.2 1 2 1x y y z

0 1 D 1

0 0 B 1 0 B 1 10 1 C 0 1 C 0 1

1 0

0 A 0 0

1 1 C 0 1 D 1 0B 1 0 A 0 0

1 1 D 1 0 B 1 1

Y Y

2 1

N

0 A 0 D / 0 C /10 B 1 B /11 C

S NSPS

y yX 0 X 1

01 D

/ z / z

1

2 1 2 1Y Y Y Y

Page 121: EET 310 FFs.pptrljones/310/homework/Chap6/EET 310 FFs.pdf · CLK CLK CLKedge CLK CLK CLKCLK Trailing CLKedge Leading CLKedge CLKedge CLK CLK These circuits work by using the fact

11/17/2011 121

Problem Example• Before going, convert the table to a more

concise form.2 1 2 1x y y z

0 1 D 1 0 A 0 00 1 C 0 1 C 0 1

1 0 B 1 0 A 0 01 1 C 0 1 D 1 01 1 D 1 0 B 1 1

Y Y

2 1

NS NSPS

y y / z /0 A 0 D / 0 C /10

X 0 X 1

B 1 B /1 A / 0

z

1 C 01 D 1

2 1 2 1Y Y Y Y

Page 122: EET 310 FFs.pptrljones/310/homework/Chap6/EET 310 FFs.pdf · CLK CLK CLKedge CLK CLK CLKCLK Trailing CLKedge Leading CLKedge CLKedge CLK CLK These circuits work by using the fact

11/17/2011 122

Problem Example• Before going, convert the table to a more

concise form.2 1 2 1x y y z

0 1 D 1 0 A 0 0

1 1 C 0 1 D 1

0 1 C 0 1 C 0 1

1 1 D0

1 0 B 1 1

Y Y

2 1

NS NSPS

y y / z / z0 A 0 D / 0 C /10 B 1 B /

X

1 A / 01 C 0 C /1

0

1

X

D

1

1

2 1 2 1Y Y Y Y

Page 123: EET 310 FFs.pptrljones/310/homework/Chap6/EET 310 FFs.pdf · CLK CLK CLKedge CLK CLK CLKCLK Trailing CLKedge Leading CLKedge CLKedge CLK CLK These circuits work by using the fact

11/17/2011 123

Problem Example• Before going, convert the table to a more

concise form.2 1 2 1x y y z

0 1 D 1 0 A 0 0

1 1 C 0 1 D 1 01 1 D 1 0 B 1 1

Y Y

2 1

0 A 0 D /

X

0

0

C

NS NSPS X

/10 B 1 B /1 A / 01 C 0 C /11 D

y y / z / z1

D /1

0

2 1 2 1Y Y Y Y

Page 124: EET 310 FFs.pptrljones/310/homework/Chap6/EET 310 FFs.pdf · CLK CLK CLKedge CLK CLK CLKCLK Trailing CLKedge Leading CLKedge CLKedge CLK CLK These circuits work by using the fact

11/17/2011 124

Problem Example• Before going, convert the table to a more

concise form.2 1 2 1x y y z

0 1 D 1

1 1 D

0

1

A 0

1 1

0

0 B

Y Y

2 1

0 A 0 D / 0 C /

X 0 X

10 B

NS NS

1 B /1

PSy y / z

A / 01 C 0 C /11 D

1

1

/ z

D / 0A / 0

2 1 2 1Y Y Y Y

Page 125: EET 310 FFs.pptrljones/310/homework/Chap6/EET 310 FFs.pdf · CLK CLK CLKedge CLK CLK CLKCLK Trailing CLKedge Leading CLKedge CLKedge CLK CLK These circuits work by using the fact

11/17/2011 125

Problem Example• Before going, convert the table to a more

concise form.2 1 2 1x y y z

1 1 D 1 0 B 1 1

Y Y

2 1

0 A 0 D / 0 C /10 B

NS NSPS

y

1 B /1 A / 0

y / z /

1 C 0 C

X 0

/1

X 1z

D / 0A / 01 D 1 B /1

2 1 2 1Y Y Y Y

Page 126: EET 310 FFs.pptrljones/310/homework/Chap6/EET 310 FFs.pdf · CLK CLK CLKedge CLK CLK CLKCLK Trailing CLKedge Leading CLKedge CLKedge CLK CLK These circuits work by using the fact

11/17/2011 126

Problem Example• Finally, create the

state diagram.2 1

0 A 0 D / 0 C /10 B

NS NSPS

y

1 B /1 A / 0

y / z /

1 C 0 C

X 0

/1

X 1z

D / 0A / 01 D 1 B /1

2 1 2 1Y Y Y Y

Page 127: EET 310 FFs.pptrljones/310/homework/Chap6/EET 310 FFs.pdf · CLK CLK CLKedge CLK CLK CLKCLK Trailing CLKedge Leading CLKedge CLKedge CLK CLK These circuits work by using the fact

11/17/2011 127

Problem Example• Finally, create the

state diagram.2 1

0 A 0 D / 0 C /10 B

NS NSPS

y

1 B /1 A / 0

y / z /

1 C 0 C

X 0

/1

X 1z

D / 0A / 01 D 1 B /1

2 1 2 1Y Y Y Y

A C

Legendx/z

B D

0/0

Page 128: EET 310 FFs.pptrljones/310/homework/Chap6/EET 310 FFs.pdf · CLK CLK CLKedge CLK CLK CLKCLK Trailing CLKedge Leading CLKedge CLKedge CLK CLK These circuits work by using the fact

11/17/2011 128

Problem Example• Finally, create the

state diagram.2 1

0 A 0 D / 0 C /10 B

NS NSPS

y

1 B /1 A / 0

y / z /

1 C 0 C

X 0

/1

X 1z

D / 0A / 01 D 1 B /1

2 1 2 1Y Y Y Y

Page 129: EET 310 FFs.pptrljones/310/homework/Chap6/EET 310 FFs.pdf · CLK CLK CLKedge CLK CLK CLKCLK Trailing CLKedge Leading CLKedge CLKedge CLK CLK These circuits work by using the fact

11/17/2011 129

Problem Example• Finally, create the

state diagram.2 1

0 A 0 D / 0 C /10 B

NS NSPS

y

1 B /1 A / 0

y / z /

1 C 0 C

X 0

/1

X 1z

D / 0A / 01 D 1 B /1

2 1 2 1Y Y Y Y

Page 130: EET 310 FFs.pptrljones/310/homework/Chap6/EET 310 FFs.pdf · CLK CLK CLKedge CLK CLK CLKCLK Trailing CLKedge Leading CLKedge CLKedge CLK CLK These circuits work by using the fact

11/17/2011 130

Problem Example• Finally, create the

state diagram.2 1

0 A 0 D / 0 C /10 B

NS NSPS

y

1 B /1 A / 0

y / z /

1 C 0 C

X 0

/1

X 1z

D / 0A / 01 D 1 B /1

2 1 2 1Y Y Y Y

Page 131: EET 310 FFs.pptrljones/310/homework/Chap6/EET 310 FFs.pdf · CLK CLK CLKedge CLK CLK CLKCLK Trailing CLKedge Leading CLKedge CLKedge CLK CLK These circuits work by using the fact

11/17/2011 131

Problem Example• Finally, create the

state diagram.2 1

0 A 0 D / 0 C /10 B

NS NSPS

y

1 B /1 A / 0

y / z /

1 C 0 C

X 0

/1

X 1z

D / 0A / 01 D 1 B /1

2 1 2 1Y Y Y Y

Page 132: EET 310 FFs.pptrljones/310/homework/Chap6/EET 310 FFs.pdf · CLK CLK CLKedge CLK CLK CLKCLK Trailing CLKedge Leading CLKedge CLKedge CLK CLK These circuits work by using the fact

11/17/2011 132

Problem Example• Finally, create the

state diagram.2 1

0 A 0 D / 0 C /10 B

NS NSPS

y

1 B /1 A / 0

y / z /

1 C 0 C

X 0

/1

X 1z

D / 0A / 01 D 1 B /1

2 1 2 1Y Y Y Y

1/1

1/00/0

A C

Legendx/z

B D

0/0

0/1

0/1

Page 133: EET 310 FFs.pptrljones/310/homework/Chap6/EET 310 FFs.pdf · CLK CLK CLKedge CLK CLK CLKCLK Trailing CLKedge Leading CLKedge CLKedge CLK CLK These circuits work by using the fact

11/17/2011 133

Problem Example• Finally, create the

state diagram.2 1

0 A 0 D / 0 C /10 B

NS NSPS

y

1 B /1 A / 0

y / z /

1 C 0 C

X 0

/1

X 1z

D / 0A / 01 D 1 B /1

2 1 2 1Y Y Y Y

Page 134: EET 310 FFs.pptrljones/310/homework/Chap6/EET 310 FFs.pdf · CLK CLK CLKedge CLK CLK CLKCLK Trailing CLKedge Leading CLKedge CLKedge CLK CLK These circuits work by using the fact

11/17/2011 134

Problem Example• Finally, create the

state diagram.2 1

0 A 0 D / 0 C /10 B

NS NSPS

y

1 B /1 A / 0

y / z /

1 C 0 C

X 0

/1

X 1z

D / 0A / 01 D 1 B /1

2 1 2 1Y Y Y Y

Page 135: EET 310 FFs.pptrljones/310/homework/Chap6/EET 310 FFs.pdf · CLK CLK CLKedge CLK CLK CLKCLK Trailing CLKedge Leading CLKedge CLKedge CLK CLK These circuits work by using the fact

11/17/2011 135

Problem Example• The completed

solution.2 1

0 A 0 D / 0 C /10 B

NS NSPS

y

1 B /1 A / 0

y / z /

1 C 0 C

X 0

/1

X 1z

D / 0A / 01 D 1 B /1

2 1 2 1Y Y Y Y

1/1

1/1

1/01/0

0/0

A C

Legendx/z

B D

0/0

0/1

0/1

Page 136: EET 310 FFs.pptrljones/310/homework/Chap6/EET 310 FFs.pdf · CLK CLK CLKedge CLK CLK CLKCLK Trailing CLKedge Leading CLKedge CLKedge CLK CLK These circuits work by using the fact

11/17/2011 136

An alternate concise table

2 1

0 A 0 D / 0 C /10 B

NS NSPS

y

1 B /1 A / 0

y / z /

1 C 0 C

X 0

/1

X 1z

D / 0A / 01 D 1 B /1

2 1 2 1Y Y Y Y

2 1

0 A 0 D C 0 10 B 1 B A 1 01 C 0 C 11 D 1 B

X 0 X 1 XNS NS NS NS

PSy y z z

D0

1

A

0 X

10

2 1 2 1Y Y Y Y