Skip to content
DenseChip
Learn
PracticeCode labInterview

DenseChip

Navigate

Menu

LearnPracticeCode labInterview

Tools

All toolsSV editorCode repoResume
DenseChip

Practice, courses, and chip-design tools in one focused workspace.

LearnPracticeCode labInterviewToolsLearning paths

© 2026 DenseChip

AboutContactPrivacyTerms
Skip to lesson

Course contents

  • How to Use This Course
  • Reading Paths
  • Quick Start: Your First Green Build
  • Part 1: How Chips Get Made6
  • Part 2: Your Workstation5
  • Part 3: Specify and Architect3
  • Part 4: The Design Loop6
  • Part 5: The Verification Ladder6
  • Part 6: Automation and Reproducibility5
  • Part 7: Hand-Off to the Back-End3
    • What the Back-End Needs
    • Reading a Constraints File
    • The Release Package
  • Part 8: When Things Go Wrong3
  • Part 9: Project and Next Steps3
  • Reference4
Loading lesson

‹Part 7: Hand-Off to the Back-End
  1. Topics
  2. Start Here: RTL and Verification
  3. Part 7: Hand-Off to the Back-End
  4. Reading a Constraints File

Part 7 · Hand-Off to the Back-End · Working (W)

Reading a Constraints File

What the lines in a timing constraints file say: the clock and its period, the margin held back, the input and output delays, and how slack tells you a path meets timing.

On this page

    Note

    Level: Working (W) · Answers: What do the lines in a timing constraints file actually say?

    Before this: What the Back-End Needs

    What do the lines in a timing constraints file actually say?

    You hand your RTL to the back-end team, and they ask for one more file. You open the project's constraints file: four lines that read like orders for a tool you have never run. This lesson translates each line, then shows how to read the one headline the timing team cares about.

    A constraints file tells the tools what time means

    Your RTL says what happens on every clock edge, but never how far apart those edges sit. Synthesis and timing tools need that number in writing. The constraints file is that writing: a text file the front end hands over next to the RTL.

    The format here is SDC, which means Synopsys Design Constraints: a text format that timing and synthesis tools read, one requirement per line. Each line names clocks or ports the design already has and states a number the tools must honor.

    You will not run a timing tool in this course. Sign-off timing belongs to the STA course, which means static timing analysis, and its tool of choice, OpenSTA, is not installed here. So this lesson shows no tool output at all. Every number below is illustrative: the project's own file says so in its first comment, and the worked arithmetic uses example values that add up but describe no real chip.

    Four lines that state the whole timing target

    The listing below is the complete constraints file of the example project. Read it top to bottom before the table translates it.

    Diagram
    # Timing constraints for mini_controller. ILLUSTRATIVE: the 10 ns period and the delays are
    # example values chosen for teaching, not a product requirement.
    create_clock -name clk -period 10.0 [get_ports clk]
    set_clock_uncertainty 0.2 [get_clocks clk]
    set_input_delay  -clock clk 2.0 [get_ports {rst_n event_valid clear_count}]
    set_output_delay -clock clk 2.0 [get_ports {count[*]}]

    This listing is the whole file: four commands plus the comment that marks every number as an example for teaching.

    Line

    What it asks the tools to do

    create_clock

    Defines the clock on port clk with an illustrative period of 10.0 ns.

    set_clock_uncertainty

    Holds back 0.2 ns of every period as margin on that clock.

    set_input_delay

    Says the three inputs may arrive up to 2.0 ns after the clock edge.

    set_output_delay

    Says the count outputs must be stable 2.0 ns before the capturing edge.

    create_clock names the clock port clk and gives it a period of 10.0 ns. Every other line counts time against these edges, so a wrong period here poisons every requirement below it.

    set_clock_uncertainty holds back 0.2 ns of every period as margin. A real clock reaches different registers a little early or late, so the tools plan as if each period were 0.2 ns shorter.

    set_input_delay says the three inputs, reset, event valid and clear, may arrive up to 2.0 ns after the clock edge. The design must still meet timing with that handicap.

    set_output_delay says the count outputs must sit stable 2.0 ns before the capturing edge. That head start belongs to the downstream block, so this line speaks for the neighbor, not for your own logic.

    The file never makes any path faster. It states the target the tools and the designer share. When a path misses, the design changes or the target is renegotiated openly; the numbers are never edited to look friendly.

    Slack is required time minus arrival time

    A timing report boils down to one headline per path: slack, which means required time minus arrival time. Arrival is when the signal reaches the end of the path; required is when it must be there for safe capture. Positive slack meets timing; negative fails.

    The picture below draws one register-to-register path under this lesson's illustrative numbers. Look at the two edges first, then the arrival and required markers and the slack arrow.

    The worked example as a picture: the launch edge at 0 ns, the capture edge one period later at 10 ns, arrival at 6.5 ns, required time at 9.5 ns, and the slack arrow between them. Every number is illustrative.
    Predict first The worked example arrives at 6.5 ns and must arrive by 9.5 ns. Before reading on: does this path meet timing, and by how much?

    It meets timing with 3.0 ns to spare. Slack is required minus arrival, 9.5 minus 6.5, and a positive answer means the capture edge still has room when the signal lands.

    Here is the arithmetic, all illustrative. The period gives 10.0 ns. Uncertainty takes 0.2 ns and the capture register's setup takes 0.3 ns, so the signal must arrive by 10.0 minus 0.2 minus 0.3, which is 9.5 ns. It arrives at 6.5 ns. Slack is 9.5 minus 6.5, which is 3.0 ns: positive, so the path meets timing.

    Break it on purpose: arrive too late

    Now make the logic deeper without touching the clock: arrival moves to 10.1 ns while required stays 9.5 ns. Slack is 9.5 minus 10.1, which is minus 0.6 ns: the path fails, by 0.6 ns.

    Never fix this by editing the file until the arithmetic looks friendly. That changes the target on paper and leaves the silicon missing timing. Change reality instead: shorten the path, or agree a slower clock and write that number down.

    Three ways beginners misread the file

    • Believing the file makes the design faster. A tighter period in create_clock does not speed up logic; it only moves the required time earlier and turns passing paths into failing ones. The file states the target. The design still has to meet it.

    • Copying constraints from another block. The period, the margins and the port names describe one block and its neighbors. Pasted into a new block, the get_ports names match nothing and the delays describe someone else's interface. Write each file from its own clock and ports.

    • Shipping a file with no clock. Every delay in the file hangs off the clock the first line names. Without create_clock, the remaining lines name a clock that no line defines, so the file states no complete requirement. The clock line comes first and is never optional.

    Rule: constraints state the timing you must meet; slack proves whether you met it.

    Check yourself With the same illustrative numbers, the path arrives at 9.8 ns instead of 6.5 ns. What is the slack, and does the path meet timing?

    Required time is unchanged at 9.5 ns: 10.0 minus 0.2 minus 0.3. Slack is 9.5 minus 9.8, which is minus 0.3 ns. Negative, so the path fails timing by 0.3 ns.

    Check yourself In your own words, what does set_clock_uncertainty reserve margin for?

    The gap between the ideal clock on paper and the real one in silicon, which reaches different registers slightly early or late. The 0.2 ns line tells the tools to hold that slice back, so a path that only just fits the ideal clock still counts as failing.

    Check yourself A colleague copies this file into a block whose clock runs at an illustrative 25 ns period. Name two things that break.

    First, the period still says 10.0 ns, so fine paths fail on paper. Second, the get_ports names list this block's ports, which the new block lacks, so the delay lines constrain nothing real.

    Interview

    Asked: "What does negative slack mean?"

    Weak answer: The design is a little slow on that path, but it is probably still fine.

    Strong answer: Slack is required time minus arrival, so a negative value means the signal arrives too late for safe capture: the path fails by exactly that amount. Fix the design or renegotiate the clock; editing the file hides the failure instead of fixing it.

    Follow-ups: (1) How do required time and arrival time each follow from the SDC lines? (2) Why is editing the file to clear a violation never acceptable?

    Key takeaways

    • An SDC file states the timing target in four kinds of lines: the clock, the margin, the input delays and the output delays.

    • Slack is required time minus arrival time: positive meets timing, negative fails it, and the number names the margin or the miss.

    • Constraints never speed up logic; when a path fails, the design or the agreed target changes, not the numbers in the file.

    Keep going

    Next: Lesson 7.3, The Release Package. You can read the timing target. Next you assemble everything a stranger needs to rebuild your result without calling you.

    Related topics

    • STA course: static timing analysis

    • Synthesis: SDC for Synthesis

    • What the Back-End Needs

    Previous

    36 / 47

    Next: The Release Package

    Up next

    Up nextThe Release Package

    Sign in to save progress

    Practice this lessonReport an error