Académique Documents
Professionnel Documents
Culture Documents
1 History
1
2 3 FLIP-FLOP TYPES
VCC VCC
A1 A2
E1 E2
Q
R
An SR latch constructed from cross-coupled NAND gates.
3.2 Gated latches and conditional trans- A gated D latch based on an SR NAND latch
parency
R
Q
Q
An animated gated D latch.
S (A) D = 1, E = 1: set
(B) D = 1, E = 0: hold
A gated SR latch circuit diagram constructed from AND gates (on (C) D = 0, E = 0: hold
left) and NOR gates (on right). (D) D = 0, E = 1: reset
3.3 D ip-op
E_L
The D ip-op is widely used. It is also known as a data
or delay ip-op.
The D ip-op captures the value of the D-input at a def-
Earle latch uses complementary enable inputs: enable active low inite portion of the clock cycle (such as the rising edge of
(E_L) and enable active high (E_H) the clock). That captured value becomes the Q output.
At other times, the output Q does not change.[22][23] The
The classic gated latch designs have some undesirable D ip-op can be viewed as a memory cell, a zero-order
[24]
characteristics.[17] They require double-rail logic or an in- hold, or a delay line.
verter. The input-to-output propagation may take up to Truth table:
three gate delays. The input-to-output propagation is not
constant some outputs take two gate delays while others
take three.
Designers looked for alternatives.[18] A successful alter-
native is the Earle latch. It requires only a single data in- ('X' denotes a Don't care condition, meaning the signal is
put, and its output takes a constant two gate delays. In ad- irrelevant)
dition, the two gate levels of the Earle latch can, in some Most D-type ip-ops in ICs have the capability to be
cases, be merged with the last two gate levels of the cir- forced to the set or reset state (which ignores the D and
6 3 FLIP-FLOP TYPES
S
D Q Q
Clock
Q
R
Data
A positive-edge-triggered D ip-op
D ip-op symbol
D D Q D Q Q D Clk R
Q
Clock E Q E Q Q
Clk Clk
Clk Q
A masterslave D ip-op. It responds on the falling edge of the
enable input (usually a clock)
T Q
maintains the current state. To synthesize a D ip-op,
simply set K equal to the complement of J. Similarly, to
synthesize a T ip-op, set K equal to J. The JK ip-op
is therefore a universal ip-op, because it can be con-
gured to work as an SR ip-op, a D ip-op, or a T
ip-op.
The characteristic equation of the JK ip-op is:
Q Qnext = JQ + KQ
and the corresponding truth table is:
4 Timing considerations
A circuit symbol for a T-type ip-op
4.1 Timing parameters
3.5 JK ip-op
Clock
J Q Data
th
tsu tco
K Q Q
Flip-op setup, hold and clock-to-output timing parameters
A circuit symbol for a positive-edge-triggered JK ip-op The input must be held steady in a period around the ris-
ing edge of the clock known as the aperture. Imagine tak-
ing a picture of a frog on a lily-pad.[27] Suppose the frog
clock
then jumps into the water. If you take a picture of the frog
J as it jumps into the water, you will get a blurry picture of
K the frog jumping into the waterits not clear which state
the frog was in. But if you take a picture while the frog
Q T T T
sits steadily on the pad (or is steadily in the water), you
Q will get a clear picture. In the same way, the input to a
T = toggle ip-op must be held steady during the aperture of the
ip-op.
JK ip-op timing diagram
Setup time is the minimum amount of time the data input
The JK ip-op augments the behavior of the SR ip-op should be held steady before the clock event, so that the
(J=Set, K=Reset) by interpreting the J = K = 1 condition data is reliably sampled by the clock.
as a ip or toggle command. Specically, the combi- Hold time is the minimum amount of time the data input
nation J = 1, K = 0 is a command to set the ip-op; should be held steady after the clock event, so that the
4.3 Propagation delay 9
data is reliably sampled by the clock. in particular, if two dierent logical paths use the output
Aperture is the sum of setup and hold time. The data in- of a ip-op, one path can interpret it as a 0 and the other
put should be held steady throughout this time period.[27] as a 1 when it has not resolved to stable state, putting the
machine into an inconsistent state.[28]
Recovery time is the minimum amount of time the asyn-
The metastability in ip-ops can be avoided by ensur-
chronous set or reset input should be inactive before the
clock event, so that the data is reliably sampled by the ing that the data and control inputs are held valid and
constant for specied periods before and after the clock
clock. The recovery time for the asynchronous set or re-
set input is thereby similar to the setup time for the data pulse, called the setup time (t ) and the hold time (t )
input. respectively. These times are specied in the data sheet
for the device, and are typically between a few nanosec-
Removal time is the minimum amount of time the asyn- onds and a few hundred picoseconds for modern devices.
chronous set or reset input should be inactive after the Depending upon the ip-ops internal organization, it is
clock event, so that the data is reliably sampled by the possible to build a device with a zero (or even negative)
clock. The removal time for the asynchronous set or re- setup or hold time requirement but not both simultane-
set input is thereby similar to the hold time for the data ously.
input.
Unfortunately, it is not always possible to meet the setup
Short impulses applied to asynchronous inputs (set, re- and hold criteria, because the ip-op may be connected
set) should not be applied completely within the recovery- to a real-time signal that could change at any time, out-
removal period, or else it becomes entirely indeter- side the control of the designer. In this case, the best the
minable whether the ip-op will transition to the appro- designer can do is to reduce the probability of error to
priate state. In another case, where an asynchronous sig- a certain level, depending on the required reliability of
nal simply makes one transition that happens to fall be- the circuit. One technique for suppressing metastability
tween the recovery/removal time, eventually the ip-op is to connect two or more ip-ops in a chain, so that
will transition to the appropriate state, but a very short the output of each one feeds the data input of the next,
glitch may or may not appear on the output, dependent and all devices share a common clock. With this method,
on the synchronous input signal. This second situation the probability of a metastable event can be reduced to
may or may not have signicance to a circuit design. a negligible value, but never to zero. The probability of
Set and Reset (and other) signals may be either syn- metastability gets closer and closer to zero as the number
chronous or asynchronous and therefore may be char- of ip-ops connected in series is increased. The number
acterized with either Setup/Hold or Recovery/Removal of ip-ops being cascaded is referred to as the rank-
times, and synchronicity is very dependent on the design ing"; dual-ranked ip ops (two ip-ops in series) is a
of the ip-op. common situation.
Dierentiation between Setup/Hold and Recov- So-called metastable-hardened ip-ops are available,
ery/Removal times is often necessary when verifying the which work by reducing the setup and hold times as much
timing of larger circuits because asynchronous signals as possible, but even these cannot eliminate the problem
may be found to be less critical than synchronous signals. entirely. This is because metastability is more than sim-
The dierentiation oers circuit designers the ability ply a matter of circuit design. When the transitions in the
to dene the verication conditions for these types of clock and the data are close together in time, the ip-op
signals independently. is forced to decide which event happened rst. However
fast we make the device, there is always the possibility
that the input events will be so close together that it can-
not detect which one happened rst. It is therefore logi-
4.2 Metastability cally impossible to build a perfectly metastable-proof ip-
op. Flip-ops are sometimes characterized for a maxi-
Main article: Metastability in electronics mum settling time (the maximum time they will remain
metastable under specied conditions). In this case, dual-
Flip-ops are subject to a problem called metastability, ranked ip-ops that are clocked slower than the maxi-
which can happen when two inputs, such as data and clock mum allowed metastability time will provide proper con-
or clock and reset, are changing at about the same time. ditioning for asynchronous (e.g., external) signals.
When the order is not clear, within appropriate timing
constraints, the result is that the output may behave un-
predictably, taking many times longer than normal to set- 4.3 Propagation delay
tle to one state or the other, or even oscillating several
times before settling. Theoretically, the time to settle Another important timing value for a ip-op is the
down is not bounded. In a computer system, this metasta- clock-to-output delay (common symbol in data sheets:
bility can cause corruption of data or a program crash if tCO) or propagation delay (tP), which is the time a ip-
the state is not stable before another circuit uses its value; op takes to change its output after the clock edge. The
10 7 REFERENCES
time for a high-to-low transition (tPHL) is sometimes dif- [3] William Henry Eccles and Frank Wilfred Jordan,
ferent from the time for a low-to-high transition (tPLH). "Improvements in ionic relays" British patent number: GB
148582 (led: 21 June 1918; published: 5 August 1920).
When cascading ip-ops which share the same clock (as
in a shift register), it is important to ensure that the tCO [4] See:
of a preceding ip-op is longer than the hold time (t ) of
W. H. Eccles and F. W. Jordan (19 Septem-
the following ip-op, so data present at the input of the ber 1919) A trigger relay utilizing three-electrode
succeeding ip-op is properly shifted in following the thermionic vacuum tubes, The Electrician, 83 :
active edge of the clock. This relationship between tCO 298.
and t is normally guaranteed if the ip-ops are physi-
Reprinted in: Radio Review, 1 (3) : 143146 (De-
cally identical. Furthermore, for correct operation, it is cember 1919).
easy to verify that the clock period has to be greater than
Summary in: W. H. Eccles and F. W. Jordan (1919)
the sum t + t .
A trigger relay utilising three electrode thermionic
vacuum tubes, Report of the Eighty-seventh Meet-
ing of the British Association for the Advancement
5 Generalizations of Science: Bournemouth: 1919, September 913,
pp. 271272.
Flip-ops can be generalized in at least two ways: by mak- [5] Pugh, Emerson W.; Johnson, Lyle R.; Palmer, John H.
ing them 1-of-N instead of 1-of-2, and by adapting them (1991). IBMs 360 and early 370 systems. MIT Press. p.
to logic with more than two states. In the special cases 10. ISBN 978-0-262-16123-7.
of 1-of-3 encoding, or multi-valued ternary logic, these
[6] Flowers, Thomas H. (1983), The Design of Colos-
elements may be referred to as ip-ap-ops.[29]
sus, Annals of the History of Computing, 5 (3): 249,
In a conventional ip-op, exactly one of the two com- doi:10.1109/MAHC.1983.10079
plementary outputs is high. This can be generalized to a
[7] Gates, Earl D. (2000-12-01). Introduction to electronics
memory element with N outputs, exactly one of which is
(4th ed.). Delmar Thomson (Cengage) Learning. p. 299.
high (alternatively, where exactly one of N is low). The ISBN 978-0-7668-1698-5.
output is therefore always a one-hot (respectively one-
cold) representation. The construction is similar to a con- [8] Fogiel, Max; Gu, You-Liang (1998). The Electronics
ventional cross-coupled ip-op; each output, when high, problem solver, Volume 1 (revised ed.). Research & Edu-
inhibits all the other outputs.[30] Alternatively, more or cation Assoc. p. 1223. ISBN 978-0-87891-543-9.
less conventional ip-ops can be used, one per output, [9] P. L. Lindley, Aug. 1968, EDN (magazine), (letter dated
with additional circuitry to make sure only one at a time June 13, 1968).
can be true.[31]
[10] Phister, Montgomery (1958). Logical Design of Digital
Another generalization of the conventional ip-op is a Computers. Wiley. p. 128.
memory element for multi-valued logic. In this case the
memory element retains exactly one of the logic states [11] US 2850566, Eldred C. Nelson, High-Speed Printing
until the control inputs induce a change.[32] In addition, System, published Sept. 8, 1953, issued Sept. 2, 1958;
page 15
a multiple-valued clock can also be used, leading to new
[33]
possible clock transitions. [12] Shiva, Sajjan G. (2000). Computer design and architecture
(3rd ed.). CRC Press. p. 81. ISBN 978-0-8247-0368-4.
[1] Pedroni, Volnei A. (2008). Digital electronics and design [16] Farhat, Hassan A. (2004). Digital design and computer
with VHDL. Morgan Kaufmann. p. 329. ISBN 978-0-12- organization. 1. CRC Press. p. 274. ISBN 978-0-8493-
374270-4. 1191-8.
[2] Latches and Flip Flops (EE 42/100 Lecture 24 from [17] Kogge, Peter M. (1981). The Architecture of Pipelined
Berkeley) "...Sometimes the terms ip-op and latch are Computers. McGraw-Hill. pp. 2527. ISBN 0-07-
used interchangeably... 035237-2.
11
[31] US 6975152
9.2 Images
File:4_Bit_Shift_Register_001.svg Source: https://upload.wikimedia.org/wikipedia/commons/5/5b/4_Bit_Shift_Register_001.svg Li-
cense: CC BY-SA 2.0 de Contributors: This vector image was created with Inkscape. Original artist: MichaelFrey {{{Date}}}
File:Commons-logo.svg Source: https://upload.wikimedia.org/wikipedia/en/4/4a/Commons-logo.svg License: PD Contributors: ? Origi-
nal artist: ?
File:D-Type_Flip-flop.svg Source: https://upload.wikimedia.org/wikipedia/commons/8/8c/D-Type_Flip-flop.svg License: Public do-
main Contributors: Own Drawing in Inkscape 0.43 Original artist: Inductiveload
File:D-Type_Flip-flop_Diagram.svg Source: https://upload.wikimedia.org/wikipedia/commons/3/37/D-Type_Flip-flop_Diagram.svg
License: Public domain Contributors: Own drawing, done in Inkscape 0.43 Original artist: jjbeard
File:D-Type_Transparent_Latch.svg Source: https://upload.wikimedia.org/wikipedia/commons/2/2f/D-Type_Transparent_Latch.svg
License: Public domain Contributors: Own Drawing in Inkscape 0.46 Original artist: Inductiveload
File:D-type_Transparent_Latch_(NOR).svg Source: https://upload.wikimedia.org/wikipedia/commons/c/cb/D-type_Transparent_
Latch_%28NOR%29.svg License: Public domain Contributors: Own work Original artist: Inductiveload
File:EarleLatch-lowres.gif Source: https://upload.wikimedia.org/wikipedia/commons/f/f6/EarleLatch-lowres.gif License: CC BY-SA
4.0 Contributors: Own work Original artist: Marble machine
File:Eccles-Jordan_trigger_circuit_flip-flip_drawings.png Source: https://upload.wikimedia.org/wikipedia/commons/9/98/
Eccles-Jordan_trigger_circuit_flip-flip_drawings.png License: Public domain Contributors: GB 148582 (led: 21 June 1918; published:
5 August 1920). Original artist: Eccles and Jordan
File:Edge_triggered_D_flip_flop.svg Source: https://upload.wikimedia.org/wikipedia/commons/9/99/Edge_triggered_D_flip_flop.svg
License: CC BY-SA 3.0 Contributors: using XCircuit Original artist: Nolanjshettle
9.3 Content license 13