Flip Flop
Flip Flop
To generate the Y’s: memory devices must be supplied with appropriate input values
• Excitation functions: switching functions that describe the impact of xi’s and yj’s on the
memory-element input
• Excitation table: its entries are the values of the memory-element inputs
Most widely used memory elements: flip-flops, which are made of latches
• Latch: remains in one state indefinitely until an input signals directs it to do otherwise
5
Set-Reset (SR) Latch (NOR Gate)
Working
Set-Reset (SR) Latch (NAND Gate)
Chatterless Switch
Clocked/Gated SR Latch
Timing the SR latch
x1 z1
Tperiod
xl Combinational zm
logic
y1 Y1
ton
y2 Y2 R
S y y
C Clock
y
yk Yk R y
S
(a) Block diagram. (b) Logic diagram.
``Memory’’ devices
S 1 y
1 y T
T Clock
0 y
0 y
R
J S 1 y
J 1 y
Clock C
K 0 y
K 0 y
R
13
The D Latch
The next state of the D latch is equal to its present excitation:
y(t+1) = D(t)
D J 1 y
D 1 y
Clock C
Clock 0 y
K 0 y
14
Clock Timing
Clocked latch: changes state only in synchronization with the clock pulse
and no more than once during each occurrence of the clock pulse
Duration of clock pulse: determined by circuit delays and signal
propagation time through the latches
• Must be long enough to allow latch to change state, and
• Short enough so that the latch will not change state twice due to the same
excitation
Excitation of a JK latch within a sequential circuit:
• Length of the clock pulse must allow the latch to generate the y’s
• But should not be present when the values of the y’s have propagated
through the combinational circuit
Combinational
logic
y J
1
y
0 K Clock
15
JK Flip Flop
Master Slave JK Flip Flop
D Flip Flop with Asynchronous Preset Clear
D Flip Flop with Synchronous Preset Clear
Residual problem with above DFF
• Let the gate delay be Δ
• Let D=0, Clk=1
• Let D=1 and just before Δ time, Clk=0
• Master latch has the invalid input combination of 00
• Before valid inputs could appear at the steering gates of the master latch, Clk=0
• Now, invalid input combination of 11 is presented to the slave steering gates,
with Clock'=1
• Slave latch has the invalid input combination of 00
• Output of DFF is indeterminate
• Problem may be avoided if D remains steady when Clk=1, allowed to change only
when Clk=0
Setup and hold times
• Setup time: It is defined as the minimum amount of time before the active clock edge by which
the data must be stable for it to be latched correctly; any violation in this required time causes
incorrect data to be captured and is known as a setup violation
D
23
Positive Edge Triggered DFF
Counters
Binary Ripple Counter (Asynchronous)
Up/Down Binary Ripple Counter
Decade Counter
Combination of Counters
Counter Applications
Glitch (Temporary Undesired States)
Synchronous Counters
Synchronous Counter using JK Flip Flop
Synchronous Counter
Synchronous Counter
Up/Down Counter
UP Counting
Down Counting
Shift Registers