TEAHLAB NEW ADDITION
BUILD. SAVE. SHARE.
The world's first and only Integrated Simulator Community.

The Master Slave D Flipflop

The interactive Master Slave Data Flip-flop digital logic circuit, with Boolean function and truth table.
Click on the applet to energize the circuit.VHDL Program
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
Watch Short Film

INTRODUCTION TO THE MASTER-SLAVE DESIGN

Because latches are so straightforward in their operations, it may be unclear why we would need master-slave counterparts. For example, during the active period of the clock signal (i.e. Clk = 1) the output Q of the data latch is supposed to simply reflect the input signal D. And while the clock signal is not asserted (i.e. Clk = 0), the output Q is supposed to ignore changes in the input D. This is simple enough.

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 - C•qm = 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

In accordance with our value for Qs when qmqs = 00 and CD = 00, we put 0 in the first cell of the transition table, as we show in Table 2. Actually, we put 00 to reflect that both Qm and Qs are 0.

Given state
qmqs
Input Condition
CD=00 CD=01 CD=10 CD=11
00 00
01
10
11

Table 2


Without showing all the evaluations, we fill the state transition table for you in Table 3. In filling the table, we use the system of equations to solve for Qm and Qs. However, you can use the interactive circuits to fill the table. But if you do decide to use the circuits, you must adhere to the convention of assuming that the clock signal always comes in before the D input signal. Such convention hides the fact that in reality critical race conditions may occur; as in qmqs = 00 & CD = 11, and in qmqs = 01 & CD = 11. In both of these examples, the value of QmQs may end up being 00 or 11 depending on which of the signals C and D came in first. (Test the examples using Ckt 1). The phrase critical race condition means exactly what the examples show: the circuit may end up in two or more different states depending on the order in which the inputs changed.

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 don’t 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

The Negative Edge Triggered Counterpart

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.

The interactive Master Slave Data Flip flop digital logic circuit, with Boolean function and truth table.
Ckt 2: Master Slave D Flipflop – Play around with the circuit

Teahlab on LinkedIn     Teahlab on Facebook