DFT · Chapter 12 · DFT Constraints & Timing
DFT Constraints for STA
Design for test adds real hardware and new operating modes, each with its own timing, so static timing analysis must analyze each mode separately with the right constraints. This lesson is how you tell the timing tool about the test modes through SDC. Multi-mode timing treats functional, shift, and capture-at-speed as different problems, each analyzed in its own scenario with its own clocks, case analysis, and exceptions. Case analysis pins signals like test-mode and scan-enable to constants to select the right topology. Each mode defines its own clocks, a slow shift clock and the fast functional or at-speed clocks. Exceptions honor functional false and multicycle paths in the at-speed run. The shift run checks hold across adjacent scan cells and the capture run checks setup at the functional period. All modes must be clean before the design is truly test-clean.
Advanced16 min readDFTSTASDCMulti-ModeSignoff
Chapter 12 · Section 12.5 · DFT Constraints & Timing — chapter closer
Project thread — the mini-SoC's multi-mode timing signoff: functional, shift, and capture-at-speed each constrained and closed. This closes Chapter 12 and sets up Chapter 13 (DFT debug).
1. Why Should I Learn This?
DFT constraints for STA are how the whole chapter's timing becomes real: you tell STA about each test mode so it can verify the design is test-clean, not just functional-clean.
- Multi-mode STA: functional / shift / capture-at-speed are different timing problems → analyze each separately.
set_case_analysisselects the mode topology (test_mode=1scan on;scan_enable=1shift vs=0capture).- Per-mode clocks (slow shift clock; fast functional/at-speed + OCC pulses) and exceptions (false/multicycle honored at-speed; SE setup/hold; I/O for boundary scan).
- Signoff: all modes clean = test-clean — functional-clean alone is not enough (12.1). Bridge to Ch13 (debug).
2. Real Silicon Story — the mode nobody constrained
A chip was functional-clean and taped out — every functional path closed. In silicon, scan test failed: chain miscompares that looked random. The logic was fine; functional timing was fine.
The cause was a mode nobody constrained. The team had closed the functional mode in STA, but had never set up the shift mode — no slow shift clock, no scan_enable = 1 case analysis, no HOLD checks across adjacent scan cells (12.2). So the shift path's hold violations (adjacent cells clocked together, 12.2) were invisible to STA and shipped — surfacing as shift miscompares in silicon (that's why lock-up latches / clock skew balancing exist, 4.x). The fix was to add the missing modes' SDC: a shift run (slow clock, scan_enable=1, hold checks) and a capture-at-speed run (functional/at-speed clock, scan_enable=0, setup at the functional period, honoring false/multicycle) — then close all modes. Only then was the design test-clean. Lesson: functional-clean is not test-clean — each test mode (shift, capture, at-speed) is a separate STA problem with its own clocks, case analysis, and exceptions, and all of them must be constrained and closed or the untimed mode fails in silicon.
3. Factory Perspective — DFT constraints through each lens
- What the STA/timing engineer sees: multiple scenarios/runs (functional/shift/capture-at-speed), each with its own SDC (case analysis, clocks, exceptions) — the core deliverable.
- What the DFT engineer sees: that the modes they built (scan, OCC, SE, boundary scan) are only valid if constrained — DFT supplies the mode definitions STA uses.
- What the RTL/DV engineer sees: that false paths/multicycles they know functionally must be carried into the at-speed run, or they become false at-speed fails (12.4).
- What management cares about: that signoff means all modes clean (test-clean, not just functional-clean) — the difference between a working test program and silent test escapes/miscompares.
4. Concept — multi-mode STA via SDC
The principle — analyze each mode separately:
- Functional, shift, and capture-at-speed are different timing problems (different clocks, topology, and checks).
- So each is analyzed in its own run/scenario with its own SDC. A design clean in one mode can violate in another (12.1).
Select the mode — set_case_analysis:
- Pin
test_mode/scan_enableto a constant so STA sees the right topology:test_mode = 1→ scan muxes / OCC test path are on (test configuration).scan_enable = 1→ shift configuration (flop D = SI);scan_enable = 0→ capture configuration (flop D = functional).
Define per-mode clocks:
- Shift run: a slow shift clock (
create_clockon the test clock). - Capture run: the fast functional/at-speed clock(s) and the OCC-generated pulses (
create_generated_clockon the OCC output) — the launch/capture pair (12.4).
Add exceptions:
set_false_path/set_multicycle_pathto honor functional false/multicycle paths in the capture-at-speed run (so they don't become false at-speed fails, 12.4).set_false_pathbetween clocks that never interact in a given mode.- Constrain SE (12.3): its setup/hold to the capture clock.
set_input_delay/set_output_delayfor boundary-scan I/O (10.x).
Close each mode — the right check:
- Shift run: slow clock,
scan_enable=1→ check HOLD across adjacent scan cells (12.2 shift=hold). - Capture run: functional/at-speed clock,
scan_enable=0→ check SETUP launch→capture at the functional period (12.2 capture=setup, 12.4 at-speed), honoring false/multicycle.
Signoff — the chapter's closing rule:
- ALL modes must be timing-clean — functional AND shift AND capture-at-speed. Only then is the design test-clean (not just functional-clean, 12.1). When a mode is not clean → DFT debug, Ch13.
5. Mental Model — one building, three fire-drills
The DFT SDC is like running three different fire-drills on one building, each with its own rules, before you certify it safe.
- The building is the one netlist. But you certify it for three scenarios: normal occupancy (functional), a slow evacuation (shift), and a fast, full-alarm evacuation (capture-at-speed). Each has different exits open (case analysis selects the topology), a different clock/timing (slow vs fast alarms), and different rules (HOLD for the slow drill, SETUP for the fast one).
- You can't certify the building safe just because normal occupancy is fine (functional-clean). The slow evacuation might have a jammed door (a shift hold violation) that only shows in that drill.
- You also honor the real floor-plan: some corridors are deliberately not through-routes (false paths / multicycles) — if you forget that in the fast drill, you get a false alarm (a false at-speed fail, 12.4).
- Only when all three drills pass do you certify the building (test-clean signoff). If one drill fails, you send in the inspectors (DFT debug, Ch13).
One building, three fire-drills with different rules (case analysis, per-mode clocks, hold-vs-setup) — certify safe only when all pass; functional occupancy being fine is not certification.
6. Working Example — the per-mode SDC (representative)
Representative, tool-neutral SDC showing the three modes. This illustrates intent, not any vendor's exact syntax:
# ==== REPRESENTATIVE / SIMPLIFIED / TOOL-NEUTRAL DFT SDC - illustrates intent, NOT exact vendor output ====
# ---- Mode select via case analysis (pick the topology STA should see) ----
# FUNCTIONAL mode:
set_case_analysis 0 [get_ports test_mode] ;# scan muxes / OCC test path OFF -> mission topology
# SHIFT mode:
set_case_analysis 1 [get_ports test_mode] ;# test path ON
set_case_analysis 1 [get_ports scan_enable] ;# scan_enable=1 -> SHIFT config (flop D = SI)
create_clock -name shift_clk -period 20.0 [get_ports test_clk] ;# SLOW shift clock
# -> STA checks HOLD across adjacent scan cells on shift_clk (12.2 shift = hold)
# CAPTURE-AT-SPEED mode:
set_case_analysis 1 [get_ports test_mode] ;# test path ON
set_case_analysis 0 [get_ports scan_enable] ;# scan_enable=0 -> CAPTURE config (flop D = functional)
create_clock -name ref_clk -period 2.0 [get_ports pll_ref] ;# fast reference
create_generated_clock -name occ_cap -source [get_ports pll_ref] \
-divide_by 1 [get_pins occ/cap_clk_out] ;# OCC-gated launch/capture pulses (12.4)
# -> STA checks SETUP launch->capture at the FUNCTIONAL PERIOD on occ_cap (12.2 capture = setup, 12.4 at-speed)
# ---- Exceptions (honor functional reality in the capture-at-speed run) ----
set_false_path -from [get_pins fp_src/Q] -to [get_pins fp_dst/D] ;# a functional FALSE path (else a false at-speed fail, 12.4)
set_multicycle_path 2 -setup -from [get_pins mc_src/Q] -to [get_pins mc_dst/D] ;# a functional MULTICYCLE path
set_false_path -from [get_clocks shift_clk] -to [get_clocks occ_cap] ;# clocks that never interact in a mode
# ---- Scan-enable timing (12.3): constrain SE like data to the capture clock ----
# (constrain SE setup/hold to occ_cap so a late SE that would capture SI is FLAGGED)
# ---- Boundary-scan I/O (10.x): constrain the JTAG/board-facing pins ----
set_input_delay 1.0 -clock ref_clk [get_ports bscan_in]
set_output_delay 1.0 -clock ref_clk [get_ports bscan_out]
# ==== SIGNOFF: close FUNCTIONAL *and* SHIFT *and* CAPTURE-AT-SPEED. All clean = TEST-CLEAN. ====
# functional-clean alone is NOT test-clean (12.1). A mode not clean -> DFT debug (Ch13).The SDC building blocks map onto the modes:
7. Industry Flow — define modes, select, clock, except, close all
The DFT constraint flow: define the modes, select each with case analysis, clock and except it, then close all for test-clean signoff:
8. Debugging Session — functional-clean silicon fails scan shift
A design closed functional timing cleanly and taped out, but in silicon the scan shift fails with chain miscompares that look random, even though functional timing and the logic are both fine -- the shift mode was never constrained in STA (no slow shift clock, no scan_enable=1 case analysis, no hold checks across adjacent scan cells), so shift-path hold violations shipped invisibly, and the fix is to add the shift-mode and capture-at-speed SDC and close all modes so the design is test-clean, not just functional-clean
FUNCTIONAL-CLEAN IS NOT TEST-CLEAN — EVERY TEST MODE MUST BE CONSTRAINED AND CLOSED IN STAA design closed functional timing cleanly and taped out. In silicon, scan shift fails with chain miscompares that look random. Functional timing is clean and the logic is fine. Where's the failure?
The shift mode was never constrained in STA: there was no slow shift clock, no scan_enable=1 case analysis, and no hold checks across adjacent scan cells — so the shift path's hold violations were invisible and shipped, surfacing as chain miscompares in silicon. STA only checks the modes you constrain. The team closed the functional mode — mission clocks, functional topology — and stopped there. But shift is a separate timing problem (12.2): with scan_enable = 1, the flops form a shift register clocked together on a slow shift clock, and the dominant risk is HOLD across adjacent scan cells (the output of one cell reaching the next too fast, 12.2). Because no shift-mode SDC existed — no create_clock for the slow shift clock, no set_case_analysis to put the design in the shift topology (scan_enable = 1), no hold analysis on that path — those hold violations were never analyzed, so they passed signoff invisibly and shipped. In silicon they appear exactly as shift chain miscompares that look random (they depend on data and skew) — which is why lock-up latches and clock-skew balancing exist (4.x). The logic and functional timing are fine because this is a mode STA never looked at — the classic proof that functional-clean is not test-clean (12.1). (A capture-at-speed mode left unconstrained would likewise ship at-speed problems or false fails, 12.4.)
Add the missing test-mode SDC and close every mode: build a shift run (slow shift clock, scan_enable=1 case analysis, hold checks across adjacent scan cells) and a capture-at-speed run (fast/OCC clock, scan_enable=0, setup launch-to-capture at the functional period, honoring false/multicycle), then sign off only when functional AND shift AND capture-at-speed are all clean. Write the shift-mode SDC: create_clock on the slow shift clock, set_case_analysis 1 on test_mode and on scan_enable to put STA in the shift topology, and run hold analysis across the adjacent scan cells so the shift-path hold violations are caught (and fixed with lock-up latches / skew balancing, 4.x, if needed). Write the capture-at-speed SDC: the fast functional/at-speed clock and OCC-generated pulses (create_generated_clock), scan_enable = 0 (capture topology), setup from launch to capture at the functional period, with set_false_path / set_multicycle_path to honor the functional false/multicycle paths (so they don't become false at-speed fails, 12.4), plus the SE constraint (12.3) and boundary-scan I/O (10.x). Then make signoff mean all modes: the design is test-clean only when functional and shift and capture-at-speed are all timing-clean. The principle to lock in: STA only verifies the modes you constrain, and DFT creates several — functional, shift, and capture-at-speed — each a separate timing problem with its own clocks (slow shift clock; fast/OCC pulses), its own topology (selected by set_case_analysis on test_mode/scan_enable), its own dominant check (shift = hold across adjacent scan cells, capture = setup launch-to-capture at the functional period), and its own exceptions (honor functional false/multicycle paths in the at-speed run); a mode you never constrain has hidden violations that ship and fail in silicon (chain miscompares, false at-speed fails), so a design is test-clean only when every test mode is constrained and closed, and functional-clean alone is never enough — when a mode won't close or silicon fails a test, that is where DFT debug (Ch13) begins. (This closes Chapter 12: 12.1 established DFT is real hardware and new modes; 12.2 shift=hold/capture=setup; 12.3 SE setup; 12.4 at-speed; this lesson turns them all into per-mode constraints and a multi-mode signoff, and hands off to Ch13 DFT debug.)
9. Common Mistakes
- Constraining only the functional mode. DFT adds shift and capture-at-speed modes — each needs its own SDC (12.1).
- Skipping case analysis. Without
set_case_analysis, STA sees the wrong topology — it can't tell shift from capture. - Reusing functional clocks for shift. Shift uses a slow shift clock and needs HOLD checks (12.2) — not the mission clock.
- Not honoring false/multicycle at-speed. They become false at-speed fails (12.4) — carry the exceptions into the at-speed run.
- Calling functional-clean "signoff". Test-clean = all modes clean — an unconstrained mode fails in silicon.
10. Industry Best Practices
- Run multi-mode STA — functional, shift, capture-at-speed — each a separate scenario with its own SDC.
- Use
set_case_analysisto select each mode's topology (test_mode / scan_enable). - Define per-mode clocks — slow shift clock; fast functional/at-speed + OCC-generated pulses.
- Carry functional false-path/multicycle exceptions into the at-speed run; constrain SE (12.3) and boundary-scan I/O (10.x).
- Sign off only when all modes are clean — test-clean, not just functional-clean (12.1).
11. Senior Engineer Thinking
- Beginner: "Functional timing closed — we're signed off."
- Senior: "Functional-clean is one mode. DFT added shift and capture-at-speed — each a separate STA problem. I put the design in each topology with
set_case_analysis, give each its own clocks (slow shift clock; fast/OCC pulses), run the right check (hold for shift, setup for capture), and honor false/multicycle at-speed. We're signed off only when all modes are clean — test-clean, not just functional-clean. If a mode won't close, that's DFT debug (Ch13)."
The senior treats signoff as multi-mode and knows an unconstrained test mode is a silicon failure waiting to ship.
12. Silicon Impact
DFT constraints for STA are where the entire timing thread of Chapter 12 becomes actionable and verifiable — the point at which "DFT has its own timing" turns into "STA has proven every test mode is clean." The chapter established that DFT adds real hardware and new modes (12.1), each with its own timing: shift is a HOLD problem and capture is a SETUP problem (12.2), scan-enable must meet setup before the capture edge (12.3), and at-speed launches and captures one functional period apart (12.4). The unavoidable consequence is multi-mode STA: functional, shift, and capture-at-speed are different timing problems, so each must be analyzed in its own run with its own constraints — and the mechanism is SDC. You select each mode's topology with set_case_analysis on test_mode / scan_enable (so STA sees the scan muxes / OCC path and the shift-vs-capture flop configuration); you define per-mode clocks (a slow shift clock; the fast functional/at-speed clock and OCC-generated launch/capture pulses); you add exceptions that honor functional false/multicycle paths in the capture-at-speed run (so they don't become the false at-speed fails of 12.4), plus the SE setup/hold constraint (12.3) and boundary-scan I/O delays (10.x); and you close each mode with its right check — HOLD across adjacent scan cells for shift, SETUP launch-to-capture at the functional period for capture. The closing rule of the chapter is the one that separates a working test program from silent silicon failures: a design is test-clean only when every mode — functional and shift and capture-at-speed — is timing-clean; functional-clean alone is not enough (12.1). A mode you never constrain carries hidden violations — shift hold violations that surface as chain miscompares, at-speed problems and false fails — that pass signoff invisibly and fail in silicon. For the STA engineer, this is the core multi-mode deliverable; for the DFT engineer, it's the validation that the scan/OCC/SE/boundary-scan hardware they built is timing-correct in every mode it's used; for the whole program, it's the bridge from design to manufacturable, testable silicon. And it's exactly where Chapter 13 — DFT Debug begins: when a mode won't close, or silicon fails a test, you take these per-mode constraints and modes and debug them — the SDC of this lesson is both the signoff artifact and the map you debug against.
13. Engineering Checklist
- Ran multi-mode STA — functional, shift, capture-at-speed — each a separate scenario/SDC.
- Selected each mode's topology with
set_case_analysis(test_mode / scan_enable). - Defined per-mode clocks — slow shift clock; fast functional/at-speed + OCC-generated pulses.
- Honored functional false-path/multicycle exceptions at-speed; constrained SE (12.3) and boundary-scan I/O (10.x).
- Signed off only when all modes are clean — test-clean, not just functional-clean (12.1).
14. Try Yourself
- Explain why functional, shift, and capture-at-speed must be separate STA runs (different clocks/topology/checks).
- Write representative
set_case_analysisfor shift (scan_enable=1) vs capture (scan_enable=0) and say what each selects. - Give the per-mode clocks: a slow shift clock (
create_clock) and OCC launch/capture pulses (create_generated_clock). - Show a
set_false_path/set_multicycle_paththat honors a functional exception in the at-speed run (avoids a false at-speed fail, 12.4). - State the signoff rule: all modes clean = test-clean; why functional-clean alone is not enough (12.1).
All SDC here is representative, simplified, and tool-neutral — it illustrates intent, not any one vendor's exact commands. No paid tool is required to reason about the per-mode constraints.
15. Interview Perspective
- Weak: "You write SDC to constrain the design for timing."
- Good: "DFT modes need their own constraints — a shift clock, case analysis for scan-enable, and false paths for at-speed."
- Senior: "DFT adds real hardware and new modes (12.1), each with its own timing — so STA is multi-mode: functional, shift, and capture-at-speed are separate runs, each with its own SDC. I select each mode's topology with
set_case_analysisontest_mode/scan_enable, define per-mode clocks (a slow shift clock; the fast/at-speed clock and OCC-generated pulses), add exceptions that honor functional false/multicycle paths in the at-speed run (else false at-speed fails, 12.4), and constrain SE (12.3) and boundary-scan I/O (10.x). Each mode gets its right check — hold for shift, setup for capture. And signoff means all modes clean — test-clean, not just functional-clean; an unconstrained mode fails in silicon (chain miscompare, false at-speed fail). When a mode won't close, that's DFT debug."
16. Interview / Review Questions
17. Key Takeaways
- DFT adds real hardware and new modes (12.1), each with its own timing (12.2–12.4) → STA must analyze each mode separately with the right constraints — multi-mode STA (functional / shift / capture-at-speed).
set_case_analysisselects each mode's topology (test_mode=1→ scan/OCC path on;scan_enable=1→ shift config,=0→ capture config) so STA sees the right logic.- Per-mode clocks: a slow shift clock (
create_clock) for shift; the fast functional/at-speed clock and OCC-generated launch/capture pulses (create_generated_clock) for capture (12.4). - Exceptions honor functional false/multicycle paths in the capture-at-speed run (else false at-speed fails, 12.4); constrain SE setup/hold (12.3) and boundary-scan I/O (10.x). Shift checks HOLD; capture checks SETUP at the functional period.
- Signoff: a design is test-clean only when all modes — functional AND shift AND capture-at-speed — are timing-clean; functional-clean alone is not enough (12.1). All SDC here is representative/tool-neutral. A mode that won't close → DFT debug (Chapter 13).
18. Quick Revision
DFT constraints for STA (Ch12 closer). DFT = real hardware + new modes (12.1), each with its own timing (shift=HOLD, capture=SETUP 12.2 ; SE setup 12.3 ; at-speed 12.4) → multi-mode STA: functional / shift / capture-at-speed = SEPARATE runs, each its own SDC.
set_case_analysisselects the topology (test_mode=1 scan/OCC on ; scan_enable=1 SHIFT vs =0 CAPTURE). Per-mode clocks: slow shift clock (create_clock) ; fast/at-speed + OCC pulses (create_generated_clock, 12.4). Exceptions:set_false_path/set_multicycle_pathhonor functional false/multicycle in the at-speed run (else false at-speed fails, 12.4) ; constrain SE (12.3) + boundary-scan I/O (10.x). Checks: shift=HOLD across adjacent cells ; capture=SETUP launch→capture at the functional period. Signoff = ALL modes clean = TEST-CLEAN ; functional-clean alone is NOT enough (12.1). SDC here is REPRESENTATIVE/tool-neutral. A mode not clean → DFT debug (Ch13). Chapter 12 complete.