Electronic – application of latch in VLSI design

digital-logicflipfloplatchrtl

I went through the documents stating difference between latch and flip flop. I even came across the scenarios where unintentional latches are created in RTL designs.

My doubt is there any real application for latch?

Best Answer

To realize the point of a latch, consider that a flip flop is two back to back latches with opposite polarity clocks. This forms a lock-and-dam system which causes the output to change one cycle after the input (assuming setup and hold conditions are met).

So, the in->out path of a flip flop 'crosses' the cycle boundary. A circuit bound by flip flops will require two cycles for an input to show up at the output. If you only have a single cycle, you need to use a latch-bound circuit. This is essentially spreading out the two latches which comprise the flip flop and stuffing logic in between, instead of on either side (and causes the delay from input to output to be one cycle).

Below is an example of "spreading the flip flop" into its separate latches for a single cycle circuit:

latch based design

Latches by themselves also allow much more flexibility in their usage. They allow "time-borrowing" which is a very powerful concept used all the time in VLSI design. In contrast, a standard flip flop only allows "time-stealing".

Below is a time-borrowing example with latches

latch-time borrowing

And time-stealing with a flip flop:

time stealing with ff

On top of that, latches are almost exclusively used as the storage elements for clock or power gating circuits; they require less area/power than a flip-flop and accomplish the required job of storing a value (enable signal generally) across a half-cycle boundary.

As one further note, latches are often used in a way that mimics the flip-flop behavior. This is done by pulsing the clock very quickly; just long enough for whatever data is at the input to show up at the output, and not much longer. In this configuration, they are called pulse latches, as described by IEEE