G5.8.1 Will This Path Meet Timing?

MediumImplementIcarus · browser samples / server checksReview the topic

Check three paths between flip-flops for setup and hold, find the highest clock frequency, and see what a slower clock cannot fix.

Hardware context: A 1 GHz block with three flop-to-flop paths, and a two-stage circuit whose capture flop gets a late clock. Compute setup and hold slack for three paths and the highest clock frequency.

A block runs at 1 GHz. Its timing review lists three paths between flip-flops on the same clock, with no clock skew. The team wants to know which paths fail, what clock the block could reach, and whether slowing the clock would save them.

This is an Implement problem with no logic to write. Work out each answer by hand and write it into the answer module as a constant. The first three constants are worked examples and are already correct.

The check compares every constant with the right value and names the first one that is wrong.

Signals in the Timeline

SignalWidthRole
question8input of each check
Full specification
Flip-flopValue
Clock-to-Q, latest (t_pcq)120 ps
Clock-to-Q, earliest (t_ccq)90 ps
Setup time60 ps
Hold time100 ps
Clock period1000 ps
PathLogic propagation delayLogic contamination delay
P1750 ps40 ps
P2850 ps30 ps
P30 ps0 ps
ConstantWhat to write
ARRIVAL_P1The latest time after the launch edge that P1 data arrives, in ps (120 + 750).
REQUIREDThe latest time after the launch edge that data may arrive and still meet setup, in ps (1000 - 60).
SETUP_SLACK_P1The setup slack of P1 in ps (940 - 870).
SETUP_SLACK_P2The setup slack of P2 in ps (negative if it fails).
MIN_PERIODThe shortest clock period at which every path meets setup, in ps.
FMAX_MHZThe highest clock frequency, in MHz, rounded down to a whole number.
HOLD_SLACK_P1The hold slack of P1 in ps (negative if it fails).
HOLD_SLACK_P3The hold slack of P3, a wire straight from one flop to the next, in ps.
HOLD_SLACK_P3_SLOWThe hold slack of P3 if the clock period is doubled to 2000 ps.

Setup slack = period − (t_pcq + t_pd) − setup. Hold slack = (t_ccq + t_cd) − hold. A slack below 0 fails. These numbers are an exercise, not a cell library.

Examples

Example 1

Worked Example: The Latest Arrival
Input
the latest time after the launch edge that P1 data arrives, in ps (120 + 750)
Output
arrival_p1 = 870

Data leaves the launch flop at most 120 ps after the edge. It needs at most 750 ps through the logic of P1: 870 ps in all. This constant is already filled in.

Example 2

Worked Example: The Required Time
Input
the latest time after the launch edge that data may arrive and still meet setup, in ps (1000 - 60)
Output
required = 940

The next edge comes 1000 ps after the launch edge, and data must be stable 60 ps before it: 940 ps. This constant is already filled in.

Example 3

Worked Example: Setup Slack
Input
the setup slack of P1 in ps (940 - 870)
Output
setup_slack_p1 = 70

Required minus arrival: 940 - 870 = 70 ps. Positive, so P1 meets setup. This constant is already filled in.

Constraints and Contract

  • Keep the module name answer and the names of the constants.
  • Slacks may be negative; write them with a minus sign.

Hints

Hint 1

Setup is about the latest arrival: the slowest clock-to-Q plus the slowest logic, compared with the next edge minus the setup time.

Hint 2

Hold is about the earliest arrival: the fastest clock-to-Q plus the fastest logic, compared with the same edge plus the hold time.

Hint 3

The clock period appears in the setup check only. Look at the hold formula again before you answer the last question.

What the grader checks: The check reads nine constants and compares each with a value computed in JavaScript from the tables. It cannot see how a value was found. The delays are exercise numbers.

9 checks on Icarus · browser samples / server checks. Run the examples first, then check the full regression. Full checks use the server judge. Downloads contain public samples only. A passing result establishes the tested cases, not a proof for all possible inputs.

See all 2 steps and the final capstone

Report a problem with this page

Your code SystemVerilogSaved locally
Ln 1, Col 1Tab indents · Ctrl/⌘ + Enter runs samples
Not run yet

Worked Example: The Latest Arrival

Input
the latest time after the launch edge that P1 data arrives, in ps (120 + 750)
Expected output
arrival_p1 = 870

Data leaves the launch flop at most 120 ps after the edge. It needs at most 750 ps through the logic of P1: 870 ps in all. This constant is already filled in.

Run samples executes all 3 public checks. Check all tests runs 9 checks on the server.

Icarus · browser samples / server checks