IAE Academy

GATE 2020 EC Q.50: solution and answer

GATE 2020 · ECQ.50 · 2 marks · NAT

For the components in the sequential circuit shown below, is the propagation delay, is the setup time, and is the hold time. The maximum clock frequency (rounded off to the nearest integer), at which the given circuit can operate reliably, is ________ MHz.

GATE 2020 EC question 50: Two positive-edge-triggered flip-flops share one clock (Clk, drawn as a square wave on the left, wired to the clock input…Tap to open full size
Figure from the GATE 2020 EC paper. It is part of the question.
Figure description

Two positive-edge-triggered flip-flops share one clock (Clk, drawn as a square wave on the left, wired to the clock input (triangle) of both). Flip Flop1 is labelled t_pd = 3 ns, t_setup = 5 ns, t_hold = 1 ns. Flip Flop2 is labelled t_pd = 8 ns, t_setup = 4 ns, t_hold = 3 ns. Flip Flop1's output (right side) runs right to one input of a 2-input XOR gate (t_pd = 2 ns). The XOR's second input comes from an external line marked IN, and IN also feeds the second input of a 2-input NAND gate (t_pd = 2 ns). The XOR output goes to the NAND's first input. The NAND output runs right, down along the bottom of the drawing, back left and up into the D input (left side) of Flip Flop2. Flip Flop2's output (right side) runs right to a vertical wire. That wire goes up, crosses Flip Flop1's output line at a hop (no connection), continues over the top of Flip Flop1 and comes down into Flip Flop1's D input (left side). So the two register-to-register paths are FF1 -> XOR -> NAND -> FF2 and FF2 -> FF1 directly.

Answer and solution

ANSWER

The slowest register-to-register path is FF2 to FF1 at , so , which rounds to 77 MHz.

Official answer: 76 to 77Source: Official answer key, GATE 2020 EC (IIT Delhi)

  1. Read the circuit as two register-to-register paths. Both flip-flops are clocked by the same edge. The figure does not label the pins, so take the left-side inputs as D and the right-side outputs as Q. Path A runs from Q of FF1 through the XOR () and the NAND () to D of FF2. Path B runs from Q of FF2 straight back to D of FF1. The hop where this wire crosses FF1's output line is not a connection. IN is an external input with no timing given, so it does not set a flip-flop-to-flip-flop constraint.

  2. Setup constraint for every path: .

  3. Path A (FF1 launches, FF2 captures): .

  4. Path B (FF2 launches, FF1 captures, no gates in between): .

  5. The clock period has to cover the slowest path: .

  6. Hold check: after a clock edge, the new data must not reach a flip-flop before that flip-flop's has passed. On Path A the data reaches FF2 after . On Path B it reaches FF1 after . Neither path violates hold, so the hold times do not limit the frequency.

KEY IDEA

For each flip-flop-to-flip-flop path, the clock period must cover the launching flip-flop's , plus the gate delays on the path, plus the capturing flip-flop's . The largest of these sets . Check hold separately: it cannot be fixed by slowing the clock. Here the path with no gates at all (FF2 to FF1) is the slowest, because FF2's 8 ns propagation delay and FF1's 5 ns setup time outweigh the two 2 ns gates on the other path.

WATCH OUT FOR

Only timing the obvious path through the gates (FF1 to XOR to NAND to FF2, 11 ns, which gives about 90.9 MHz) and missing the feedback wire from FF2 back to FF1. Another is reading the hop on FF1's output line as a junction, or pairing the wrong setup time with a path: the setup time always belongs to the flip-flop that CAPTURES the data. Adding hold times into the period is also wrong. Hold is a separate minimum-delay check.

From the GATE 2020 EC paper. Every question of this paper · Download the full paper · All 30 Sequential questions, with notes

More Sequential questions