SDC Constraints in VLSI: Clocks, I/O Delays, Exceptions and Checks

SDC constraints in VLSI explained: create_clock, virtual and generated clocks, latency, I/O delays with examples, clock groups, exceptions, checks and Q&As.

SDC Constraints in VLSI: Clocks, I/O Delays, Exceptions and Checks
On this page 16 sections
  1. What are SDC constraints?
  2. Anatomy of an SDC file
  3. Clocks: create_clock and virtual clocks
  4. Generated clocks
  5. Latency, uncertainty and transition
    1. Worked example A: why set latency on the virtual clock too (illustrative)
  6. Input and output delays
    1. Worked example B: deriving I/O delays (illustrative)
  7. The port environment: drive, load and transition
  8. Modes: case analysis and clock groups
  9. Timing exceptions
    1. Worked example C: an exception that is too wide (illustrative)
  10. Checking your constraints
  11. Common SDC mistakes
  12. Debug flowchart for constraint problems
  13. Interview questions and answers
  14. FAQ
  15. Summary## Summary
  16. References

An SDC file is the contract between the design and every timing-driven tool. Synthesis, placement, CTS and sign-off STA all optimize or report against it, so a missing clock, an unrealistic input delay or a too-wide false path makes every tool close timing on the wrong problem. That is why "explain your SDC" is one of the most common physical design and STA interview topics.

This guide covers what goes into an SDC file and why, how to check it, a debug flowchart and interview Q&As. The worked examples are illustrative: numbers show the method and are not taken from any foundry, library or project, except where an open-source flow is named. Command syntax follows the OpenSTA documentation; commercial tools accept the same core SDC commands but add their own options, so check your tool's manual. Related reading on iVLSI: Static Timing Analysis (STA) in VLSI, Setup and Hold Violations, Generated Clocks in STA and Multicycle Path and False Path in STA.

What are SDC constraints?#

SDC stands for Synopsys Design Constraints (you will also hear "standard design constraints"). It is a Tcl-based format that Synopsys licenses as open source through its TAP-in program, which describes it as capturing "design intent" for synthesis, clocking, timing, power, test and operating conditions. An SDC file tells a timing tool:

  • Clocks: period, waveform and where they enter the design.
  • Clock behaviour before CTS: latency, uncertainty and transition.
  • I/O timing: when data arrives at inputs and is needed at outputs.
  • The environment: what drives each input and what each output drives.
  • Design rule limits: maximum transition, capacitance and fanout.
  • Special paths: mode constants, unrelated clocks, false and multicycle paths, point-to-point limits.

SDC does not describe logic (the netlist), cell timing (the Liberty library), parasitics (SPEF) or power intent (UPF).

Figure 1. What an SDC file holds and the flow steps that read it.

Because SDC is Tcl, a file can use variables, expr arithmetic and object queries like get_ports and all_inputs. A typo in a query can silently match nothing, so check what each command was applied to.

Anatomy of an SDC file#

Order matters, because later commands refer to objects created earlier (an input delay needs its clock). A minimal single-clock skeleton (illustrative names and values):

Code
# 1. units and design current_design my_block set_units -time ns -capacitance pF # 2. clocks create_clock -name core_clk -period 2.0 [get_ports clk] create_clock -name vclk -period 2.0 ;# virtual clock for I/O # 3. clock properties (pre-CTS) set_clock_latency 0.30 [get_clocks {core_clk vclk}] set_clock_uncertainty -setup 0.10 [get_clocks core_clk] set_clock_uncertainty -hold 0.03 [get_clocks core_clk] set_clock_transition 0.08 [get_clocks core_clk] # 4. I/O timing set_input_delay -clock vclk -max 1.20 [all_inputs -no_clocks] set_input_delay -clock vclk -min 0.30 [all_inputs -no_clocks] set_output_delay -clock vclk -max 0.85 [all_outputs] set_output_delay -clock vclk -min -0.10 [all_outputs] # 5. environment and design rules set_driving_cell -lib_cell BUF_X2 [all_inputs -no_clocks] set_load 0.02 [all_outputs] set_max_transition 0.25 [current_design] # 6. modes and exceptions set_case_analysis 0 [get_ports scan_mode] set_false_path -from [get_ports rst_n_async]

The sections below explain each group.

Clocks: create_clock and virtual clocks#

create_clock defines a clock's period and waveform and attaches it to a port or pin. The OpenSTA documentation spells out the defaults clearly:

  • If no waveform is given, the clock rises at 0 and falls at half the period.
  • The waveform is a list: the first element is the rise time, the second the fall time. -waveform {1 8} with -period 10 rises at 1 and falls at 8.
  • If no pin list is given, the clock is virtual: it has no pins in the design but can be used as the reference for input and output delays.
  • Defining a clock on a pin that already has one replaces it unless you add -add.

Two clocks on one pin (say functional and test) are normal, but then tell the tool how they relate, usually with set_clock_groups.

Virtual clocks model the flops outside your block. The open-source OpenROAD-flow-scripts designs show the pattern well: their constraint.sdc files for designs such as gcd, aes and ibex create the real clock on the clock port and a second clock named vclk_<name> with the same period and no pins, then reference all I/O delays to the virtual clock. Using a virtual clock keeps I/O timing independent of how the internal clock tree is built.

Generated clocks#

Clocks created inside the design by dividers, multipliers or clock muxes are declared with create_generated_clock, relative to a master clock with -source. OpenSTA supports -divide_by, -multiply_by and -edges (mutually exclusive), plus -duty_cycle and -invert. Its documentation gives a useful example:

Code
create_clock -period 10 -waveform {1 8} clk1 create_generated_clock -name gclk1 -source clk1 -divide_by 4 r1/Q

The result has a period of 40, rises at 1 and falls at 21: for a power-of-two divisor the period is multiplied, the rise edge stays where the master's rise is, and the fall is half a period later.

Figure 2. Default waveform, -waveform {1 8} and a divide-by-4 generated clock (OpenSTA documentation example).

Without a generated clock, downstream flops may be timed with the wrong period or have no clock at all, leaving them unconstrained. iVLSI's Generated Clocks in STA covers source latency and clock muxes in depth.

Latency, uncertainty and transition#

Before CTS the clock network is ideal, so the tool needs estimates.

  • set_clock_latency gives the expected clock delay. With -source it is the source latency (insertion delay outside the design or before the clock definition point, such as a PLL and board path). Without -source it is network latency, the delay of the on-chip clock tree. OpenSTA notes that set_clock_latency describes delays "when analyzing a design using ideal clocks".
  • set_propagated_clock switches a clock from ideal to propagated, so the tool uses calculated or back-annotated buffer and wire delays. After CTS, network latency comes from the real tree; estimated network latency is no longer used for propagated clocks, but source latency still applies.
  • set_clock_uncertainty models jitter plus margin for effects you have not modelled yet. Pre-CTS it usually also reserves room for skew; after CTS that part is removed because real skew is now computed. Separate -setup and -hold values are normal, and inter-clock uncertainty can be given with -from / -to.
  • set_clock_transition gives an ideal clock slew at the flops before CTS, since ideal clocks otherwise have unrealistically sharp edges.
Figure 3. Source latency, network latency, and ideal versus propagated clocks (illustrative).

Worked example A: why set latency on the virtual clock too (illustrative)#

A block has an internal clock tree whose expected insertion delay is 0.30 ns. Before CTS, core_clk is ideal with set_clock_latency 0.30. The I/O delays reference vclk.

  • If vclk has no latency, an output path launches from an internal flop whose clock arrives at 0.30 ns, but is captured by a virtual flop whose clock edge is at 0. The output path loses 0.30 ns compared with what the budget intended. Input paths gain the same 0.30 ns for setup and lose it for hold.
  • If vclk also has 0.30 ns latency, launch and capture are referenced the same way and the I/O budget means what you wrote.

The OpenROAD-flow-scripts examples follow this approach: for Nangate45 gcd they set set_clock_latency 0.070 on both core_clock and vclk_core_clock, and swerv does the same with 0.360. Whether you model external clock arrival this way or with -source latency depends on chip-level clocking; what matters is that the I/O reference matches how the internal clock is timed after CTS. More on how CTS changes clock arrival: Clock Tree Synthesis (CTS).

Input and output delays#

set_input_delay says when data arrives at an input port, measured from a clock edge. set_output_delay says how long before the capturing edge data must be ready at an output, which is the time used up outside the block.

  • Input delay (max) = external clock-to-Q (max) + external logic (max) + board or top-level wire (max).
  • Input delay (min) = the same terms using minimum values. It drives hold checks on input-to-register paths.
  • Output delay (max) = external logic (max) + wire (max) + external setup time.
  • Output delay (min) = external logic (min) + wire (min) − external hold time. This is often negative, which is legal and common.
Figure 4. Input and output delays model the external part of each path; the rest is the internal budget (illustrative).

Two OpenSTA details matter. A set_input_delay without -max or -min sets both, and a delay relative to a second clock needs -add_delay or it overwrites the first. And paths from inputs without set_input_delay are not reported by default, so a missing input delay hides paths instead of failing them.

Worked example B: deriving I/O delays (illustrative)#

The clock period is 2.0 ns, and setup uncertainty is 0.10 ns.

Input din: the external flop has clock-to-Q of 0.35 ns max / 0.10 ns min, external logic 0.65 / 0.15 ns and board delay 0.20 / 0.05 ns.

  • Input delay max = 0.35 + 0.65 + 0.20 = 1.20 ns
  • Input delay min = 0.10 + 0.15 + 0.05 = 0.30 ns
  • Internal setup budget = 2.0 − 1.20 − 0.10 (uncertainty) − 0.05 (capture flop setup) = 0.65 ns for logic and wires from din to the first flop, before clock latency differences.

Output dout: external logic is 0.40 / 0.05 ns, board 0.20 / 0.05 ns, the receiving flop needs 0.25 ns setup and 0.15 ns hold.

  • Output delay max = 0.40 + 0.20 + 0.25 = 0.85 ns
  • Output delay min = (0.05 + 0.05) − 0.15 = −0.05 ns

The internal path from the launching flop's clock pin through clock-to-Q and logic to dout must then fit in 2.0 − 0.85 − 0.10 = 1.05 ns.

When the external numbers are unknown, teams budget a fraction of the period. The OpenROAD-flow-scripts examples use a variable clk_io_pct of 0.2, so for gcd (period 0.25 ns) both input and output delays are 0.25 × 0.2 = 0.05 ns, and for black_parrot (period 6.0 ns) the minimum input arrival is 6.0 × 0.2 = 1.2 ns with explicit -max values on individual ports. A percentage rule is a starting point, not sign-off; in hierarchical flows the budgets should come from the parent, as described in Time Budgeting in VLSI.

The port environment: drive, load and transition#

Without environment constraints, input ports switch with ideal edges and outputs drive no load, which is optimistic.

  • set_driving_cell names a library cell that drives an input, so the tool computes a realistic transition and delay that depends on the input's load.
  • set_input_transition gives a fixed slew instead, when the driver is unknown.
  • set_load adds external capacitance on an output (OpenSTA also uses it to annotate net wire capacitance).
  • set_max_transition, set_max_capacitance, set_max_fanout set design rule limits (the tighter of SDC and library limits applies). See Design Rule Violations (DRVs) in VLSI.

Modes: case analysis and clock groups#

set_case_analysis ties a pin or port to a constant for analysis. OpenSTA documents that no paths propagate from constant pins and that constants propagate through downstream gates. Typical uses are selecting functional versus scan mode, fixing a clock-mux select or disabling a test-only path in a given mode. Each mode usually gets its own SDC, and the modes are combined with corners in MMMC analysis.

set_clock_groups tells the tool which clocks do not interact. OpenSTA defines three kinds:

  • -asynchronous: the clocks have no fixed phase relationship; paths between groups are not timed, but they are still considered for noise analysis.
  • -logically_exclusive: the clocks cannot interact logically (for example, two inputs of a clock mux) but can be physically present on the chip at the same time; noise is still considered.
  • -physically_exclusive: the clocks can never exist at the same time; paths between them are ignored for noise as well.

Use -physically_exclusive only when it is true, or real crosstalk can be hidden.

Asynchronous crossings still need synchronizers and CDC verification; the SDC only stops STA from reporting an impossible path.

Timing exceptions#

Exceptions change how specific paths are timed:

  • set_false_path removes timing from, through or to the listed objects.
  • set_multicycle_path gives a path more than one cycle for setup (and usually needs a matching hold adjustment).
  • set_max_delay / set_min_delay set point-to-point limits, often used for asynchronous interfaces or combinational feed-throughs.
  • set_disable_timing breaks specific timing arcs, for example to cut a combinational loop.

Every exception should have a written reason and the narrowest possible -from / -through / -to. The rules for setup and hold multipliers, -start / -end and precedence are covered in Multicycle Path and False Path in STA; asynchronous reset checks are in Recovery and Removal in STA.

Worked example C: an exception that is too wide (illustrative)#

A designer wants to stop timing on a quasi-static configuration register cfg_reg that is written once after reset, and writes:

Code
set_false_path -to [get_clocks core_clk]

That turns off every path captured by core_clk, so the report looks clean because almost nothing is timed. Constrain the intent instead, for example set_false_path -from [get_cells cfg_reg*], and compare the number of timed endpoints before and after; a sudden drop is a warning sign.

Checking your constraints#

Good SDC is validated, not just written. With OpenSTA (and similar commands in commercial tools):

  • check_setup runs sanity checks. Its options include -no_clock (register clock pins without a clock), -multiple_clock, -no_input_delay, -no_output_delay, -unconstrained_endpoints, -loops (combinational loops) and -generated_clocks (generated clocks whose source is not a clock). Use -verbose to see the offending objects.
  • report_checks -unconstrained shows the unconstrained path group, which is hidden by default.
  • report_clock_properties confirms periods and waveforms.
  • write_sdc writes the constraints the tool actually holds. Comparing it with your source file catches commands that matched nothing or were overwritten.

Run these checks at every hand-off and keep one golden SDC per mode.

Common SDC mistakes#

  1. Unclocked flops behind a divider or clock mux with no generated clock.
  2. Missing I/O delays, so port paths are never reported.
  3. I/O delays with no latency plan, which shifts budgets after CTS.
  4. -add forgotten, so a second create_clock replaces the first.
  5. No drive or load models, giving optimistic port timing.
  6. Over-wide exceptions and SDCs that drift apart between synthesis, PnR and sign-off.

Debug flowchart for constraint problems#

When timing results look suspicious, check the constraints before touching the netlist: clocks on every flop (check_setup -no_clock -verbose), generated clocks at dividers and muxes, I/O delays on every port, the unconstrained path group, realistic budgets and clock relationships, the scope of every exception, and drive and load models.

Figure 5. Debugging suspicious timing results by checking the constraints first.

Interview questions and answers#

Q1. What is an SDC file and which tools use it? A Tcl-based constraint file describing clocks, I/O timing, environment, design rules and exceptions. Synthesis, placement, CTS, routing optimization and sign-off STA all read it.

Q2. What is a virtual clock and why use it? A clock with no pin in the design. It represents the external flops' clock and is the reference for I/O delays, so I/O timing does not depend on the internal clock tree.

Q3. How do you calculate input delay and output delay? Input delay is external clock-to-Q plus external logic plus wire delay. Output delay (max) is external logic plus wire plus the external flop's setup time. Min values use minimum delays, and min output delay subtracts the external hold time, so it is often negative.

Q4. What is the difference between source latency and network latency? Source latency is delay before the clock definition point (PLL, board). Network latency is the on-chip clock tree delay, estimated before CTS and calculated after it.

Q5. Why does clock uncertainty change after CTS? Before CTS it covers jitter, margin and expected skew. After CTS skew is computed from the real tree, so the skew part is removed while jitter and margin stay.

Q6. What is the difference between asynchronous, logically exclusive and physically exclusive clock groups? Asynchronous clocks have no phase relationship; logically exclusive clocks cannot interact logically but can both be active; physically exclusive clocks can never exist at the same time. Only physically exclusive groups are also excluded from noise analysis.

Q7. What happens if you forget set_input_delay on a port? Paths from that port may not be timed at all, so violations stay hidden. Checks like check_setup -no_input_delay catch it.

Q8. When would you use set_case_analysis? To fix a mode pin, such as scan enable or a clock-mux select, to a constant so only the paths that exist in that mode are analyzed.

FAQ#

Does SDC include power intent? No. Power domains, isolation and retention are described in UPF.

Can one SDC cover all modes? It can, with case analysis and clock groups, but most teams keep one SDC per mode and combine modes with corners in MMMC.

Why are some output min delays negative? Because the external hold requirement is larger than the minimum external path delay; the negative value tells the tool data may change slightly after the clock edge at the port.

Summary## Summary#

An SDC file defines clocks, their pre-CTS behaviour, I/O arrival and required times, the port environment, design rules, modes and exceptions. Define every clock and generated clock, reference I/O delays to clocks consistently with how the internal clock will be timed after CTS, model drive and load, keep exceptions narrow and documented, and check the constraints with tool reports before trusting any slack number.

References#

  • Synopsys, Technology Access Program (TAP-in): Synopsys Design Constraints (SDC) format description and open-source licensing: https://www.synopsys.com/community/interoperability-programs/tap-in.html
  • OpenSTA README (supported inputs including SDC, clocks and exception types): https://github.com/The-OpenROAD-Project/OpenSTA
  • OpenSTA command documentation, doc/Commands.md (create_clock, create_generated_clock, set_clock_latency, set_propagated_clock, set_clock_uncertainty, set_input_delay, set_output_delay, set_load, set_driving_cell, set_case_analysis, set_clock_groups, set_false_path, set_max_delay, check_setup, report_checks, write_sdc): https://github.com/The-OpenROAD-Project/OpenSTA/blob/master/doc/Commands.md
  • OpenROAD-flow-scripts example constraints, flow/designs/nangate45/{gcd,aes,ibex,swerv,black_parrot}/constraint.sdc and flow/designs/sky130hd/aes/constraint.sdc: https://github.com/The-OpenROAD-Project/OpenROAD-flow-scripts

Written by

Swasti Pujari

Associate Director, Backend Engineering at CoreIC Technologies, with 15+ years in VLSI Physical Design and backend engineering. Previously Practice Head at UST Global, leading Physical Design, STA, EMIR, DFT, and Physical Verification. Delivered 3nm, 6nm and 7nm projects for AMD, Intel, and Microchip, and published IEEE research on hybrid AI-EDA floorplanning.