CDC & Structural Analysis Tool Profiles
Quantitative + Qualitative Gate Philosophy
svlens provides quantitative measurements (scores, violation counts, complexity metrics)
to add consistency to the LLM's qualitative judgment. Phase gate decisions require BOTH:
- Quantitative: svlens tool reports (JSON) — violation counts, health scores, complexity metrics
- Qualitative: LLM assessment of design intent, context, and risk
Neither alone is sufficient. A zero-violation svlens report does not auto-pass a gate if the LLM
identifies architectural concerns. Conversely, the LLM cannot override quantitative violations
without documented justification (waiver with rationale).
When commercial tools are available, they serve as the signoff authority. svlens provides
supplementary crosscheck data — useful for early-stage CI, pre-signoff screening, and adding
quantitative rigor to LLM-driven reviews.
Common Contract
- Prefer wrapper:
lint/scripts/run_cdc.sh
- Output classes:
VIOLATION
CAUTION
CONVENTION
INFO
WAIVED
- Gate fail when unwaived
VIOLATION exists.
svlens is a unified structural analysis toolkit with three modes sharing one elaboration:
svlens cdc — Clock Domain Crossing Analysis
lint/scripts/run_cdc.sh --tool structural --top <top> -f rtl/filelist_top.f --outdir lint/cdc
(structural mode auto-runs svlens crosscheck when installed)
lint/scripts/run_cdc.sh --tool svlens --top <top> -f rtl/filelist_top.f --outdir lint/cdc
(standalone mode)
- 8 synchronizer patterns (2-FF, 3-FF, gray, handshake, async FIFO, MUX, pulse, Johnson)
- Quality checks: reconvergence, glitch path, fan-out-before-sync, reset sync, non-2^N FIFO
- Outputs: md + json + sdc + waiver yaml
- Key JSON fields:
summary.violations, summary.cautions, per-crossing severity + sync_type
svlens conn — Port Connectivity Analysis
svlens conn --format all --top <top> -f rtl/filelist_top.f -o sim/conn/reports
- Width mismatch, type mismatch, dangling output, undriven input detection
- Protocol completeness (
--check-protocol), naming convention (--check-convention)
- Expected connectivity validation (
--expect connectivity_spec.yaml)
- Key JSON fields:
analysis.overall_score, analysis.module_health, summary.errors
svlens metrics — RTL Transformation Complexity
svlens metrics --format all --top <top> -f rtl/filelist_top.f -o sim/metrics/reports
- Output-rooted and FF-D-rooted backward transformation cones
- FF-to-FF combinational complexity with provenance levels
- Key JSON fields: per-root
logic_depth_est, raw_node_count, source_inputs
- Interpretation:
logic_depth_est > 15-20 = timing risk, source_inputs > 20 = complex convergence
svlens all — Combined Mode
svlens all --format all --top <top> -f rtl/filelist_top.f -o sim/svlens/reports
- Single elaboration, three output directories:
conn/, cdc/, metrics/
- Produces
svlens_summary.json with aggregated results
- Baseline diff support:
--diff baseline/ for regression detection
Installation
git clone https://github.com/babyworm/svlens.git ~/tools/svlens
cd ~/tools/svlens
./scripts/setup-deps.sh --prefix ~/.local
cmake -B build -DCMAKE_PREFIX_PATH=~/.local
cmake --build build -j$(nproc)
cmake --install build --prefix ~/.local
Commercial Profiles
spyglass (binary: sg_shell, config key: sg_shell, script flag: --tool spyglass):
lint/scripts/run_cdc.sh --tool spyglass --top <top> -f rtl/filelist_top.f --outdir lint/cdc
- Note:
rat_config.json uses sg_shell as tool key; runner scripts accept --tool spyglass
vc_cdc (binary: vc_static_shell, script flag: --tool vc_cdc):
lint/scripts/run_cdc.sh --tool vc_cdc --top <top> -f rtl/filelist_top.f --outdir lint/cdc
- Note:
vc_cdc is the Synopsys app name; VC SpyGlass CDC runs inside the VC
Static shell, so the executable is vc_static_shell
questa_cdc:
lint/scripts/run_cdc.sh --tool questa_cdc --top <top> -f rtl/filelist_top.f --outdir lint/cdc
Invocation Reference
The exact binaries and batch switches the runner uses. These are the shapes each
vendor documents; changing them silently breaks the stage.
| Tool |
Invocation |
Why this shape |
structural / svlens |
svlens cdc --format all -o <outdir> |
— |
spyglass |
sg_shell -tcl <tcl> |
— |
vc_cdc |
vc_static_shell -f <tcl> -batch |
vc_cdc is an app name, not an executable. -batch makes the shell quit on an unexpected error instead of dropping to a prompt |
questa_cdc |
qverify -c -do <do> -od <outdir> |
-c selects CLI/batch. Without -od the session database lands in the default location while the runner reports under --outdir |
Normalized Result Fields
tool
violations_count
cautions_count
info_count
report_path
replay_path
1---2name: cdc-tool-profiles3description: Internal reference: cdc tool profiles (agent-loaded; do not invoke).4---56# CDC & Structural Analysis Tool Profiles78## Quantitative + Qualitative Gate Philosophy910svlens provides **quantitative measurements** (scores, violation counts, complexity metrics)11to add consistency to the LLM's **qualitative judgment**. Phase gate decisions require BOTH:12131. **Quantitative**: svlens tool reports (JSON) — violation counts, health scores, complexity metrics142. **Qualitative**: LLM assessment of design intent, context, and risk1516Neither alone is sufficient. A zero-violation svlens report does not auto-pass a gate if the LLM17identifies architectural concerns. Conversely, the LLM cannot override quantitative violations18without documented justification (waiver with rationale).1920When **commercial tools** are available, they serve as the **signoff authority**. svlens provides21supplementary crosscheck data — useful for early-stage CI, pre-signoff screening, and adding22quantitative rigor to LLM-driven reviews.2324## Common Contract25- Prefer wrapper: `lint/scripts/run_cdc.sh`26- Output classes:27 - `VIOLATION`28 - `CAUTION`29 - `CONVENTION`30 - `INFO`31 - `WAIVED`32- Gate fail when unwaived `VIOLATION` exists.3334## Open-Source Baseline: svlens (https://github.com/babyworm/svlens)3536svlens is a unified structural analysis toolkit with three modes sharing one elaboration:3738### svlens cdc — Clock Domain Crossing Analysis39- `lint/scripts/run_cdc.sh --tool structural --top <top> -f rtl/filelist_top.f --outdir lint/cdc`40 (structural mode auto-runs svlens crosscheck when installed)41- `lint/scripts/run_cdc.sh --tool svlens --top <top> -f rtl/filelist_top.f --outdir lint/cdc`42 (standalone mode)43- 8 synchronizer patterns (2-FF, 3-FF, gray, handshake, async FIFO, MUX, pulse, Johnson)44- Quality checks: reconvergence, glitch path, fan-out-before-sync, reset sync, non-2^N FIFO45- Outputs: md + json + sdc + waiver yaml46- Key JSON fields: `summary.violations`, `summary.cautions`, per-crossing `severity` + `sync_type`4748### svlens conn — Port Connectivity Analysis49- `svlens conn --format all --top <top> -f rtl/filelist_top.f -o sim/conn/reports`50- Width mismatch, type mismatch, dangling output, undriven input detection51- Protocol completeness (`--check-protocol`), naming convention (`--check-convention`)52- Expected connectivity validation (`--expect connectivity_spec.yaml`)53- Key JSON fields: `analysis.overall_score`, `analysis.module_health`, `summary.errors`5455### svlens metrics — RTL Transformation Complexity56- `svlens metrics --format all --top <top> -f rtl/filelist_top.f -o sim/metrics/reports`57- Output-rooted and FF-D-rooted backward transformation cones58- FF-to-FF combinational complexity with provenance levels59- Key JSON fields: per-root `logic_depth_est`, `raw_node_count`, `source_inputs`60- Interpretation: `logic_depth_est` > 15-20 = timing risk, `source_inputs` > 20 = complex convergence6162### svlens all — Combined Mode63- `svlens all --format all --top <top> -f rtl/filelist_top.f -o sim/svlens/reports`64- Single elaboration, three output directories: `conn/`, `cdc/`, `metrics/`65- Produces `svlens_summary.json` with aggregated results66- Baseline diff support: `--diff baseline/` for regression detection6768### Installation69```bash70git clone https://github.com/babyworm/svlens.git ~/tools/svlens71cd ~/tools/svlens72./scripts/setup-deps.sh --prefix ~/.local73cmake -B build -DCMAKE_PREFIX_PATH=~/.local74cmake --build build -j$(nproc)75cmake --install build --prefix ~/.local76```7778## Commercial Profiles79- `spyglass` (binary: `sg_shell`, config key: `sg_shell`, script flag: `--tool spyglass`):80 - `lint/scripts/run_cdc.sh --tool spyglass --top <top> -f rtl/filelist_top.f --outdir lint/cdc`81 - Note: `rat_config.json` uses `sg_shell` as tool key; runner scripts accept `--tool spyglass`82- `vc_cdc` (binary: `vc_static_shell`, script flag: `--tool vc_cdc`):83 - `lint/scripts/run_cdc.sh --tool vc_cdc --top <top> -f rtl/filelist_top.f --outdir lint/cdc`84 - Note: `vc_cdc` is the Synopsys **app** name; VC SpyGlass CDC runs inside the VC85 Static shell, so the executable is `vc_static_shell`86- `questa_cdc`:87 - `lint/scripts/run_cdc.sh --tool questa_cdc --top <top> -f rtl/filelist_top.f --outdir lint/cdc`8889## Invocation Reference9091The exact binaries and batch switches the runner uses. These are the shapes each92vendor documents; changing them silently breaks the stage.9394| Tool | Invocation | Why this shape |95|------|------------|----------------|96| `structural` / `svlens` | `svlens cdc --format all -o <outdir>` | — |97| `spyglass` | `sg_shell -tcl <tcl>` | — |98| `vc_cdc` | `vc_static_shell -f <tcl> -batch` | `vc_cdc` is an app name, not an executable. `-batch` makes the shell quit on an unexpected error instead of dropping to a prompt |99| `questa_cdc` | `qverify -c -do <do> -od <outdir>` | `-c` selects CLI/batch. Without `-od` the session database lands in the default location while the runner reports under `--outdir` |100101## Normalized Result Fields102- `tool`103- `violations_count`104- `cautions_count`105- `info_count`106- `report_path`107- `replay_path`