← ClaudeAtlas

timing-closure-cdclisted

Diagnose static timing analysis failures and clock-domain crossings in digital designs. Covers reading setup and hold reports from OpenSTA, OpenROAD, PrimeTime or Vivado, deciding whether a violation is a logic, clock-tree or constraint problem, writing SDC constraints, and choosing the right crossing structure among two-flop synchroniser, toggle synchroniser, gray code, handshake, async FIFO and reset synchronisation. Use when a design fails setup or hold, when slack is negative, when a design has more than one clock, when a signal moves between clock domains, when writing or fixing an SDC file, or when hardware behaves intermittently in a way simulation does not reproduce.
Premchand006/AI-assistant-skills · ★ 0 · DevOps & Infrastructure · score 73
Install: claude install-skill Premchand006/AI-assistant-skills
# Timing and clock-domain crossings Two failure modes, related by the fact that static timing analysis cannot see the second one. A timing violation is visible, reproducible and gets fixed. A missing synchroniser passes RTL simulation, passes STA, and shows up as a machine that hangs once a week. ## Clock-domain crossings ```bash python3 scripts/cdc_scan.py rtl/ --fail-on error ``` The scanner infers each signal's domain from the always block that writes it, propagates through combinational logic, and reports every read in a different domain along with what synchronisation it found: none, one flop, two flops on a multi-bit bus, or a correct two-flop synchroniser. Pick the structure by what the signal is, because a two-flop synchroniser is the right answer for exactly one of these: | What crosses | Pattern | |---|---| | Single-bit level | two-flop synchroniser | | Single-bit pulse | toggle synchroniser | | Multi-bit, one bit changes at a time | gray code, then synchronise | | Multi-bit data, arbitrary values | handshake with data held stable, or async FIFO | | Streaming data | async FIFO with gray-coded pointers | | Reset | async assert, sync de-assert, one per domain | ```systemverilog logic meta, sync; always_ff @(posedge clk_dst or negedge rst_n) begin if (!rst_n) {sync, meta} <= 2'b00; else {sync, meta} <= {meta, src_level}; end // use sync; meta feeds nothing else ``` Two flops per bit on a bus is the mistake worth naming. Each bit settles independe