|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
THE MASTER SLAVE D FLIPFLOP
|
TRUTH TABLE | ||||
---|---|---|---|---|
Input | Output | |||
CLK | D | Q | not-Q | |
X | 0 | no change | no change | |
X | 1 | no change | no change | |
↑ | 0 | 0 | 1 | |
↑ | 1 | 1 | 0 |
A problem with the latches simple design, however, is that latches are too sensitive to input conditions. During a single clock cycle, the state of a latch may experience multiple changes depending on the behavior of the input signal during the period when Clk = 1. While for some applications such sensitivity bears no relevancy or are often beneficial; there are applications where it is necessary that the output of a latch change only once during a single clock cycle. For such systems, the master slave flipflop provides the appropriate depth of defense and reliability.
Ckt 1 below is a packaged version of the Presentation Interactive Circuit above. It is also interactive so play around with it to see that it works exactly as the one above. The first data latch is the master, and it changes state when the clock signal is not asserted (Clk = 0); notice that the master is directly controlled by the input signal D. The second data latch is the slave latch. It changes state only at the rising edge of the clock. When the clock signal is changing from 0 to 1, the output Qs of the slave latch takes the value of the output Qm of the master latch. Because by the time the slave gate is opened the master latch has already captured a signal and is blocked from receiving further inputs, the output Qs can only change state at most once during a single clock cycle.
Hence by placing two redundant latches in series, we get a reliable D flipflop. This version of the master slave D flipflop is also known as a positive edge triggered D flipflop because the slave output Qs can only change at the positive edge of the clock.
The analysis of the D Master-Slave Flipflop involves exposing four aspects of the circuit. As with all circuits, we want to know a Boolean function that defines the behavior of the circuit. From the Boolean expression, it will be obvious how many states the circuit can be in. Third, we want to see what input conditions will cause the circuit to move between states. And finally we want to know which states are unstable.
Because the D Master-Slave Flipflop is constituted of two D Latches connected in series, getting its Boolean function is as easy as combining two D Latch Boolean expressions. Seeing as the expression for the D Latch is Q = D C + D q + C q, we will distinguish the master latch as Qm and the slave latch as Qs. In addition, we account for the NOT gates by inverting the Clock variable C of the master latch.
Qm | = | D C + D qm + C qm | ||
Qs | = | qm C + qm qs + C qs |
As evidenced by the Boolean expression we just derived, the master-slave flipflop has two state variables qm and qs and two input variables C and D. As such, the flipflop has four states and four different input conditions. We show the resulting state transition table below.
Given state qmqs |
||||
Input Condition | ||||
CD=00 | CD=01 | CD=10 | CD=11 | |
00 | ||||
01 | ||||
10 | ||||
11 |
Table 1
To fill the table, we will evaluate the system of equations for Qs. For example, the value of Qs when qmqs = 00 and CD = 00 is
Qm | = | D C + D qm - Cqm = 0 0 + 0 0 + 0 0 = 0 1 + 0 + 0 = 0 | ||
Qs | = | qm C + qm qs + C qs = 0 0 + 0 0 + 1 0 = 0 |
Given state qmqs |
||||
Input Condition | ||||
CD=00 | CD=01 | CD=10 | CD=11 | |
00 | 00 | |||
01 | ||||
10 | ||||
11 |
Table 2
Given state qmqs |
||||
Input Condition | ||||
CD=00 | CD=01 | CD=10 | CD=11 | |
00 | 00 | 10 | 00 | 00 |
01 | 01 | 11 | 00 | 00 |
10 | 00 | 10 | 11 | 11 |
11 | 01 | 11 | 11 | 11 |
Table 3
Although the table sufficiently shows how the D Master-Slave Flipflop transitions from state to state, it is necessary to represent the operation of the circuit in a state diagram (for people who dont like tables, if you will).
Figure 1
Finally, we identify the unstable transitions either from the transition table or the state diagram. From Table 3 the unstable transitions are the cells where QmQs &ne qmqs. From Figure 2, the unstable transitions are the arrows pointing from one ellipse to another; as distinguished from the looping arrows. Table 4 below marks the unstable transitions in green.
Given state qmqs |
||||
Input Condition | ||||
CD=00 | CD=01 | CD=10 | CD=11 | |
00 | 00 | 10 | 00 | 00 |
01 | 01 | 11 | 00 | 00 |
10 | 00 | 10 | 11 | 11 |
11 | 01 | 11 | 11 | 11 |
Table 4: Unstable Transitions in Green
Although the article presented and analyzed the positive edge triggered version of the master-slave D flipflop, below we show you the negative edge triggered counterpart. The only difference between the two circuits is the complementation of the clock signal. Since the circuits are essentially the same, we leave the analysis of the circuit below for the reader.