IntermediateQuestion 54 of 112Source: Synopsys PrimeTime User Guide: Multiple Clocks at the Source Pin

Why must a generated clock's master clock be named explicitly with -master_clock when its source pin receives multiple clocks?

From PDVerse STA Mentor Guide ยท pdVerse Mentor Guide

Short Answer

create_generated_clock normally figures out the master clock on its own, by finding whichever clock reaches the named -source pin. When more than one clock can reach that pin โ€” a multiplexed clock source feeding a shared divider, for example โ€” that inference becomes ambiguous, and -master_clock has to name the intended clock explicitly.

Technical Reference DiagramWhy must a generated clock's master clock be named explicitly with -master_clock when its source pin receives multiple clocks?
A clock mux MUX1 selecting between CLK_A and CLK_B feeding a shared divider flip-flop DIV1, with two labeled generated clock definitions each pointing -master_clock at a different upstream clock.

Technical Explanation

A generated clock's -source pin can, in some designs, have more than one clock reaching it, and the tool needs to know which one is the real master.

  • create_generated_clock -source [get_pins DIV1/CP] (SDC) normally infers the master clock automatically from whichever clock the tool finds propagating to that source pin.
  • Some pins genuinely receive more than one clock, for example a multiplexed clock source feeding a divider that is shared between two operating modes, each with its own upstream clock.
  • When more than one clock reaches the source pin, the inference becomes ambiguous, and the tool needs an explicit -master_clock (SDC) argument alongside -source to say which of the candidate clocks the generated clock actually derives from.
  • Without -master_clock in that ambiguous case, the command can fail outright or silently pick an unintended clock, producing a generated clock with the wrong period or phase relationship.
  • report_clock (PT) is the way to confirm the tool resolved it correctly, since that report names the generated clock's actual master clock and master source pin, letting you check it against what you intended.
  • Why it matters: this situation is common in designs with clock muxes feeding a shared divider โ€” leaving -master_clock out is a routine oversight there, and the resulting misidentified generated clock can carry through the whole downstream timing model until someone notices the report looks wrong.

Common Mistake

The Trap: leaving -master_clock out of a generated clock definition on a source pin that actually receives more than one clock, assuming the tool's automatic inference will always pick the right one.

  • On a mux-fed divider shared between two modes, omitting -master_clock can either fail the command or silently attach the generated clock to the wrong upstream clock, giving it the wrong period.
  • The mistake is easy to miss because the command may not always produce a hard error โ€” checking report_clock (PT) afterward is the only reliable way to confirm the tool resolved the intended relationship.

Follow-up Question & Model Response

A clock mux MUX1 selects between CLK_A and CLK_B feeding a shared divider flip-flop, DIV1. How do you make sure the generated clock off DIV1 is correctly tied to CLK_A in the mode where CLK_A is selected?

Candidate Model Response: I would write create_generated_clock -source [get_pins DIV1/CP] -master_clock [get_clocks CLK_A] -divide_by 2 -name DIV_A [get_pins DIV1/Q] (SDC), explicitly naming CLK_A as the master rather than relying on the tool to infer it from the mux's two candidate inputs. I would define a separate generated clock for the CLK_B case the same way, each active in its own mode-specific scenario, and then confirm with report_clock [get_clocks DIV_A] (PT) that the master clock and master source pin match what I intended for each mode.

Practical Example

A shared divider flip-flop DIV1 is fed through clock mux MUX1, which selects between CLK_A (400MHz) and CLK_B (300MHz) depending on operating mode. Without -master_clock, create_generated_clock -source [get_pins DIV1/CP] -divide_by 2 [get_pins DIV1/Q] (SDC) produces a warning about an ambiguous source and picks one candidate clock arbitrarily. The team fixes it with two mode-specific definitions, -master_clock [get_clocks CLK_A] and -master_clock [get_clocks CLK_B], each active only in its own mode's scenario, and confirms with report_clock (PT) that DIV_A shows a 200MHz period derived from CLK_A and DIV_B shows a 150MHz period derived from CLK_B.

Complete STA Handbook

Get the complete 10-chapter STA handbook covering setup/hold margins, clock modeling, OCV/POCV, crosstalk noise, and PrimeTime closure.

Timing Constraints (SDC) Handbook โ€” nine chaptersSDC ConstraintsNine chapters on clocks, exceptions, and constraint linting. โ†’