

Some devices will regard a "high" on the control input as "track" and a low input as "hold" others do the opposite. The control input has two states which may be called "track" and "hold". This distinction is relatively recent and is not formal, with many authorities still referring to flip-flops as latches and vice versa, but it is a helpful distinction to make for the sake of clarity.Ī transparent latch is a device with a data input and a control input. The difference between a latch and a flip-flop is that a latch is asynchronous, and the outputs can change as soon as the inputs do (or at least after a small propagation delay).Ī flip-flop, on the other hand, is edge-triggered and only changes state when a control signal goes from high to low or low to high. Latches are very similar to flip-flops, but are not synchronous devices, and do not operate on clock edges as flip-flops do.Ī flip-flop is a device very like a latch in that it is a bistable mutivibrator, having two states and a feedback path that allows it to store a bit of information. Therefore latches can be memory devices, and can store one bit of data for as long as the device is powered.Īs the name suggests, latches are used to "latch onto" information and hold in place. These states are high-output and low-output.Ī latch has a feedback path, so information can be retained by the device. Just showing a t-gate based D-flip flop (notice it is built from two back to back t-gate based D latches with opposite phase clocks).Ī latch is an example of a bistable multivibrator, that is, a device with exactly two stable states. Good text describing latches and flip flops But once you start timing through them the difference becomes crystal clear. A lot of people (even on this site) will mix the two up. The distinction is important if you do any latch based design. This means that if one half cycle path is slow and the other half cycle path is fast with a latch based design the slow path can borrow time into the fast paths cycle.Ī very common design trick when you need to squeeze every picosecond out of a path is to spread the flip flop apart (into two seperate latches) and do logic in between.īasically the setup and hold times are completely different between a latch and a flip flop in terms of how the cycle boundaries are handled. They also allow time borrowing through the entire transparency phase. Latches on the other hand setup to the transparency of the latch and hold until the latch closes. A traditional flip flop will not allow any time borrowing through cycle borders, since the master-slave topology acts like a lock-and-dam system to create a hard edge at the active clock. Pulsing the clock to a gated latch does not make it a flip flop either it makes it a pulse latch ( pulse latch description).įlip flops are edge triggered and the setup and hold times are both relative to this active edge. You can build a SR flip flop out of two gated SR latches however:Īdding a clock pin to a latch (SR or JK) does not make it a flip flop - it makes it a gated latch.

So, once the clock enable is added people start calling it a flip flop. SR latches throw everyone for a loop because the most basic design is transparent all the time. The type of latch is irrelevant (JK, SR, D, T) to this constraint, but it is important that the transparency is controlled by some pin (call it clock or enable or whatever you like). A flip flop is built from two back to back latches with opposite polarity clocks, which form a master slave topology.
