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 Path
  • STA Glossary
  • STA Metrics Reference
  • STA Mastery Cheatsheet
  • Timing Paths and Checks16
  • Constraints & SDC Fundamentals20
  • Delay Graph & Path Analysis16
  • Beyond Setup and Hold16
  • Multi-Corner Multi-Mode Signoff16
  • OCV, AOCV, POCV and Variation16
  • Crosstalk and Noise16
  • ECO and Closure16
  • STA Debug Playbook16
    • Constraint Bug Patterns
      • Missing Clock
      • Wrong Clock Edges
      • Overbroad False Path
      • Forgotten Multicycle Hold
    • View Mismatch Triage
    • Path Group War Room
    • Signoff Regression Hygiene
  • STA Interview Prep26
  • Capstone Timing Signoff Lab4
Loading lesson

‹Constraint Bug Patterns
  1. Topics
  2. Static Timing Analysis
  3. STA Debug Playbook
  4. Constraint Bug Patterns
  5. Wrong Clock Edges

Part 9 · Debug Playbook · All levels

Wrong Clock Edges

If an inverted clock is modelled as non-inverted, a half-cycle path is analysed with a full cycle: slack is optimistic by half a period.

On this page

    Why it matters

    The capture edge decides how much time a path gets. A flop on the falling edge of a clock gets half a period from a rising-edge launch. If the clock reaching it is modelled with the wrong sense, for example a clock redefined on an inverted net without the inversion flag, or a sequential divider output that is really inverted but is defined as non-inverted, the analysis picks the wrong edge and the path looks easier than it is. A plain combinational inverter needs no definition of its own: it inverts the propagated clock automatically, so the half-cycle capture is inferred.

    Worked example (ns)

    example.py
    1
    2
    3
    4
    5
    6
    7
    T, setup, delay = 2.0, 0.08, 1.10
    slack_correct = T / 2 - setup - delay          # launch on rising edge, capture on the falling edge half a period later
    slack_wrong = T - setup - delay                # inverted clock modelled as non-inverted: next rising edge, a full period
    assert round(slack_correct, 3) == -0.18
    assert round(slack_wrong, 3) == 0.82
    assert round(slack_wrong - slack_correct, 3) == T / 2
    print("PASS: correct slack", round(slack_correct, 3), "; wrongly modelled slack", round(slack_wrong, 3), "; optimistic by", T / 2)
    Diagram
    # not-run: SDC is not executable here
    # correct: the clock redefined on the inverted net carries the inversion flag
    create_generated_clock -name clk_n -source [get_ports clk] -divide_by 2 -invert [get_pins u_div/qn_reg/QN]

    The real path has -0.18 ns of slack: a violation. With the clock sense lost the same path shows +0.82 ns, optimistic by exactly half a period. The signature is a half-cycle path in the schematic (a falling-edge flop, an inverted clock net) with a full-period requirement in the report, tracing back to a clock redefined on the inverted net without the inversion flag, or to a sequential divider's inverted output defined as non-inverted. The inversion flag on the redefined clock restores the right capture edge. For a flop that is itself falling-edge triggered, the analysis infers the edge from the cell, so the bug lives in clock definitions, not in such cells.

    What the review looks for

    • Every clock redefined on an inverted net carries the inversion flag, and every sequential divider output is checked for sense and ratio; plain combinational inverters propagate the clock automatically and need no clock of their own.

    • A report of paths between opposite-edge clocks is reviewed: half-cycle paths should appear with half-period requirements.

    • The capture edge printed in a path report is compared with the schematic for every suspicious path.

    Common pitfall

    Reading only the slack. A positive slack on a path that crosses an inverted clock is a reason to check the capture edge, not a reason to relax.

    Interview

    Be able to say what the capture edge of a falling-edge flop is when launched on a rising edge, and why the budget is half a period.

    Check yourself If the path delay were 0.80 ns, would the correct analysis pass?

    Yes: 1.00 - 0.08 - 0.80 = +0.12 ns. The wrong model would report +1.12 ns, hiding how close it is.

    Related topics

    • Missing Clock

    • Next: Overbroad False Path

    Previous

    139 / 183

    Next: Overbroad False Path

    Up next

    Up nextOverbroad False Path

    Sign in to save progress

    Practice this lessonReport an error

    See also

    • Forgotten Multicycle Hold