Skip to main content

Updated 3 min readSDC

SDC timing constraints with examples

SDC timing constraints with working examples: clocks, generated clocks, IO delays, clock groups and multicycle paths, plus the STA commands that audit them.

By the SkyCadEda engineering teamHow these notes are written

  • SDC
  • Timing
  • ASIC
  • EDA Automation

ShareLinkedInX

On this page

SDC (Synopsys Design Constraints) is the Tcl-based format every synthesis, place and route and STA tool reads to know what "on time" means: which clocks exist, when inputs arrive, when outputs are needed, and which paths are exceptions. A wrong SDC does not make a tool fail; it makes it optimize and sign off the wrong thing, which is worse.

A reference constraint set

A compact block-level SDC covering the commands most designs need. Values are illustrative.

# Clocks
create_clock -name clk_core -period 1.25 [get_ports clk]
create_clock -name tck      -period 20.0 [get_ports tck]
create_generated_clock -name clk_div2 -source [get_ports clk] \
    -divide_by 2 [get_pins u_div/q_reg/Q]

set_clock_uncertainty -setup 0.05 [get_clocks clk_core]
set_clock_uncertainty -hold  0.02 [get_clocks clk_core]

# IO budgets relative to the core clock
set_input_delay  -clock clk_core -max 0.40 [remove_from_collection [all_inputs] [get_ports {clk tck}]]
set_input_delay  -clock clk_core -min 0.05 [remove_from_collection [all_inputs] [get_ports {clk tck}]]
set_output_delay -clock clk_core -max 0.30 [all_outputs]
# BUFX4 stands for a buffer cell from your own library
set_driving_cell -lib_cell BUFX4 [remove_from_collection [all_inputs] [get_ports {clk tck}]]
set_load 0.01 [all_outputs]

# clk_core and clk_div2 are synchronous; tck is unrelated
set_clock_groups -asynchronous -group {clk_core clk_div2} -group {tck}

# Two-cycle path from config registers into the datapath
set_multicycle_path 2 -setup -from [get_cells u_cfg/*_reg*] -to [get_cells u_dp/*_reg*]
set_multicycle_path 1 -hold  -from [get_cells u_cfg/*_reg*] -to [get_cells u_dp/*_reg*]

# Quasi-static test-mode select
set_case_analysis 0 [get_ports scan_mode]

A few points engineers get wrong regularly:

  • The generated clock must be defined on the divider output pin; without it the downstream registers are clocked by an ideal copy of clk or are unclocked.
  • set_clock_groups -asynchronous removes every path between the groups from timing. Use it only for crossings that have synchronizers, and confirm that with CDC analysis.
  • A setup multicycle without the matching hold multicycle checks hold one cycle too late and hides real hold paths or reports false ones, depending on the clocks.
  • Wildcard set_false_path -from or -through on a bus name often matches far more than intended. Count what it matches.

Auditing constraints in STA

These PrimeTime commands (Tempus has the same or close equivalents) find most SDC problems before anyone looks at slack:

check_timing -verbose              ;# unclocked registers, unconstrained endpoints, missing IO delays
report_clock                       ;# confirm every clock and generated clock exists with the right period
report_clock -skew                 ;# uncertainty and latency settings per clock
report_exceptions -ignored         ;# exceptions that match nothing or are overridden
report_analysis_coverage           ;# share of timing checks that are met, violated or untested
report_case_analysis               ;# which pins are held constant in this mode

For linting and block-to-top consistency, Cadence Conformal Litmus and Synopsys Timing Constraints Manager check SDC rules and consistency between block and top constraints. A simple scripted check also helps: dump the number of objects each exception matches and diff it between releases, so an RTL rename that silently empties a set_false_path shows up in review.

Keeping one intent through synthesis, PnR and signoff

Synthesis uses ideal clocks, an estimated clock latency (set_clock_latency) and wire-load or physical estimates. After CTS the implementation and signoff tools switch to set_propagated_clock [all_clocks] and drop the estimated latency. Uncertainty usually shrinks after CTS because jitter stays but the skew estimate is no longer needed.

Keep one golden SDC per mode and derive the stage-specific pieces (estimated latency, extra uncertainty for synthesis) from small overlay files instead of hand-editing copies. In MCMM flows each mode gets its own constraint set and each analysis view pairs a mode with a delay corner; see multi-corner multi-mode timing analysis.

Reviewing exceptions

Every false path and multicycle path should have an owner and a reason that a reviewer can check against the RTL: a synchronizer, a quasi-static configuration register, a protocol that guarantees two cycles. Block-level exceptions must be re-checked when the block is integrated, because the top-level clocking may differ. The review process is covered in timing exceptions in signoff.

If you need SDC audits or STA report tooling built around your flow, see our ASIC platform support.

Frequently asked questions

What does an SDC file contain?

Tcl commands that describe the timing environment of a design: clocks and generated clocks, clock uncertainty and latency, input and output delays, driving cells and loads, and timing exceptions such as false paths, multicycle paths and clock groups. Synthesis, place and route and STA tools all read it.

Why does a multicycle path need a separate hold constraint?

set_multicycle_path 2 -setup moves the setup check one cycle later, and by default the hold check moves with it. Adding set_multicycle_path 1 -hold on the same from/to pulls the hold check back to the original edge, which is what a two-cycle path between same-frequency clocks normally needs.

How do you check an SDC file for problems?

In STA run check_timing -verbose for unconstrained endpoints and missing clocks, report_exceptions -ignored for exceptions that match nothing or are overridden, and report_analysis_coverage to see how many checks are actually timed. Dedicated tools such as Cadence Conformal Litmus or Synopsys Timing Constraints Manager lint SDC and compare block and top constraints.

More engineering notes

Working through a problem like this?

Tell us about your flow: the tools, the PDK, what is failing and when it needs to be clean.