Open-source SDC constraint development, validation, and verification toolkit for VLSI synthesis engineers.
SDC (Synopsys Design Constraints) files are the standard way to define timing, power, and design rule constraints for digital synthesis. A single mistake in an SDC file β a missing clock, an incorrect derate, an overly broad wildcard β can cause silicon failure or thousands of false timing violations.
SDC Tools is a complete toolkit for the entire SDC lifecycle:
Write βββΆ Validate βββΆ Generate βββΆ Review βββΆ Signoff
β β β β β
β β β β β
βΌ βΌ βΌ βΌ βΌ
Rules Checker Generator Diff/Matrix Reports
Engine + Coverage
pip install sdc-tools
sdc-tools check sample.sdc # validate
sdc-tools generate --design MY_CHIP --clock clk=10.0 # generate
sdc-tools --help # see all commandsgit clone https://github.com/RAMA-L7/sdc-tools.git
cd sdc-tools
pip install -e ".[web]"
sdc-tools web # launch browser UIdocker build -t sdc-tools .
docker run -it sdc-tools check sample.sdc # CLI
docker run -p 8501:8501 ramal7/sdc-tools web # Web UI| # | Feature | Module | CLI Command | Description |
|---|---|---|---|---|
| 1 | SDC Checker / Validator | checker.py |
sdc-tools check |
40+ semantic checks: errors, warnings, best practices |
| 2 | SDC Generator | generator.py |
sdc-tools generate |
Generate complete SDC from parameters in seconds |
| 3 | SDC Linter | linter.py |
sdc-tools lint |
Format & reorganize SDC files with section ordering |
| 4 | SDC Converter | converter.py |
sdc-tools convert |
Parse SDC to structured JSON/YAML for tool integration |
| 5 | Batch Processor | batch_runner.py |
sdc-tools batch |
Process all SDCs in a directory β check, lint, report |
| 6 | Constraint Change Analyzer | constraint_diff.py |
sdc-tools diff |
Semantic diff with TCL variable resolution + wildcard drift |
| 7 | Clock Relation Analyzer | clock_relations.py |
sdc-tools analyze clock-relations |
Infer correct clock relationships and detect mismatches |
| 8 | Multi-Corner Manager (MMC) | corner_manager.py + mmc.py |
sdc-tools corners |
PVT corner presets, per-corner SDC generation, ZIP packaging |
| 9 | Constraint Coverage Gap Analysis | coverage.py |
sdc-tools coverage |
39-item gap analysis across 6 constraint categories |
| 10 | Custom Rules Engine | custom_rules.py |
sdc-tools check --custom-rules |
YAML-based project-specific validation policies |
| 11 | Rules Registry | rules_registry.py |
sdc-tools rules |
Centralized documentation of all 60+ rule codes |
| 12 | HTML Signoff Reports | reporter.py |
sdc-tools report |
Self-contained, zero-dependency HTML reports |
| 13 | Streamlit Web UI | app.py |
sdc-tools web |
Interactive browser UI with 10 visual tabs |
sdc-tools check design.sdc
# Output:
# Errors: 3 (SDC-001, SDC-005, SDC-006)
# Warnings: 8 (SDC-024, SDC-030, ...)
# Info: 12 (best practice suggestions)
#
# [SDC-001] No create_clock defined β all paths unconstrained.
# [SDC-024] 4 clocks but no set_clock_groups β CDC un-flagged.With JSON output for CI integration:
sdc-tools check design.sdc --json
sdc-tools check design.sdc --junit --output results.xmlWith custom rules:
sdc-tools check design.sdc --custom-rules my_policy.yaml --custom-rules team_rules.yamlWith CSV output (for CI/CD):
sdc-tools check design.sdc --format csv > results.csv
sdc-tools check design.sdc --format markdown > report.mdsdc-tools lint design.sdc # preview formatted output
sdc-tools lint design.sdc --fix # fix in-place
sdc-tools lint design.sdc --check # exit 1 if not clean
sdc-tools lint design.sdc --output clean.sdc # write to filesdc-tools convert design.sdc --format json
sdc-tools convert design.sdc --format yaml --output constraints.yamlsdc-tools batch check ./sdc_files/ # check all SDCs in directory
sdc-tools batch lint ./sdc_files/ --fix # lint all files in-place
sdc-tools batch report coverage ./sdc_files/ -o ./reports/sdc-tools generate \
--design MY_CHIP \
--clock clk_core=5.0:sys_clk \
--clock clk_slow=20.0:slow_clk \
--uncertainty 0.15 \
--operating-condition WORST \
--derate \
--propagated \
--output my_chip.sdcsdc-tools diff old.sdc new.sdc \
--linked-v1 params_v1.tcl \
--linked-v2 params_v2.tcl \
--verbose
# Output:
# FATAL [CHG-FP-001] False path removed β timing now checked on this path
# WARN [CHG-CK-001] Clock period decreased from 5ns to 4ns
# INFO [CHG-GEN-001] New constraint addedsdc-tools analyze clock-relations design.sdc
# Output:
# Clocks: 4 Pairs: 6 Mismatches: 2
# [SDC-060] WARNING CLKA vs CLKB
# Specified: -asynchronous
# Expected: -physically_exclusivesdc-tools corners list # see presets
sdc-tools corners show "Classic 3-corner" # view details# Generate per-corner SDCs via the Web UI
sdc-tools web
# β MMC Corner Manager tab β load preset β generatesdc-tools coverage design.sdc
# Output:
# Overall Coverage: 56.4% (22/39 items)
#
# π Clocks: 78% [#####.....] (7/9)
# π I/O: 67% [####......] (4/6)
# β οΈ Exceptions: 71% [#####.....] (5/7)
# π Design Rules: 83% [######....] (5/6)
# π AOCV/Derate: 0% [..........] (0/5) β critical gap
# β‘ Power/DFT: 33% [###.......] (2/6)
sdc-tools coverage design.sdc --missing-only # compact view
sdc-tools coverage design.sdc --json # for automationsdc-tools rules list # all 60+ rules
sdc-tools rules list --severity error # errors only
sdc-tools rules list --search derate # search by keyword
sdc-tools rules show SDC-060 # single rule details# my_policy.yaml
name: My Team Policies
version: "1.0"
rules:
- id: MY-001
name: "Clock period β€ 10ns"
severity: warning
command: create_clock
condition: value_above
field: period
threshold: 10.0
message: "Clock period {value}ns exceeds 10ns limit"
- id: MY-002
name: "Propagated clock required"
severity: error
command: set_propagated_clock
condition: present
message: "No set_propagated_clock β required by policy"sdc-tools report check design.sdc -o quality_report.html
sdc-tools report diff old.sdc new.sdc -o diff_report.html
sdc-tools report clock-relations design.sdc -o clock_report.html
sdc-tools report coverage design.sdc -o coverage_report.htmlsdc-tools-main/
β
βββ core modules ββββββββββββββββββββββββββββββ
β βββ checker.py # SDC validation (40+ checks)
β βββ generator.py # SDC generation from params
β βββ linter.py # SDC formatter + section reorganization
β βββ converter.py # SDC β JSON/YAML parser
β βββ batch_runner.py # Directory-wide batch processing
β βββ constraint_diff.py # Semantic SDC diff + change rules
β βββ clock_relations.py # Clock relation inference + mismatches
β βββ corner_manager.py # PVT corner data model + presets
β βββ mmc.py # Multi-corner SDC operations
β βββ coverage.py # Constraint coverage gap analysis
β βββ custom_rules.py # YAML-based custom validation rules
β βββ rules_registry.py # Central rule code documentation (60+)
β βββ reporter.py # HTML signoff report generator
β βββ tcl_resolver.py # TCL $variable resolution
β βββ wildcard_analyzer.py # Wildcard pattern risk analysis
β
βββ interfaces βββββββββββββββββββββββββββββββββ
β βββ cli.py # Command-line interface (12 commands)
β βββ app.py # Streamlit web UI (10 tabs)
β βββ ui/ # Tab modules (modular UI)
β βββ components.py # Shared CSS, helpers, dark mode
β βββ tab_linter.py # Linter tab
β βββ tab_converter.py # Converter tab
β βββ tab_rules.py # Rules Reference tab
β
βββ packaging & deployment βββββββββββββββββββββ
β βββ pyproject.toml # PyPI package configuration
β βββ Dockerfile # Container image (Python 3.11-slim)
β βββ .dockerignore # Docker build exclusions
β βββ __init__.py # Package init
β
βββ sample files βββββββββββββββββββββββββββββββ
β βββ samples/
β β βββ example.sdc # Full example SDC file
β β βββ constraint_diff_v1.sdc # Diff demo: version 1
β β βββ constraint_diff_v2.sdc # Diff demo: version 2
β β βββ clock_relations.sdc # Clock relations demo
β βββ custom_rules_example.yaml # 10 example custom rules
β
βββ git hooks & CI βββββββββββββββββββββββββββββ
β βββ .pre-commit-config.yaml # Pre-commit framework config
β βββ .pre-commit-hooks/sdc-check.sh # Standalone git hook
β βββ sdc-tools.cmd # Windows CLI wrapper
β
βββ documentation ββββββββββββββββββββββββββββββ
β βββ README.md # This file
β βββ docs/features/ # Detailed feature docs
β βββ README-01-checker.md # SDC Checker / Validator
β βββ README-02-generator.md # SDC Generator
β βββ README-03-diff.md # Constraint Change Analyzer
β βββ README-04-clock-relations.md # Clock Relation Analyzer
β βββ README-05-mmc.md # Multi-Corner Manager
β βββ README-06-coverage.md # Constraint Coverage Gap
β βββ README-07-custom-rules.md # Custom Rules Engine
β βββ README-08-rules-registry.md # Rules Registry
β βββ README-09-reports.md # HTML Signoff Reports
β βββ README-10-web-ui.md # Streamlit Web UI
β
βββ MIT License # Open-source (MIT)
βββ .gitignore # Git exclusions
| Command | Purpose | Key Flags |
|---|---|---|
check |
Validate SDC | --json, --junit, --custom-rules, --verbose, --format |
generate |
Generate SDC | --clock, --design, --derate, --operating-condition |
diff |
Semantic diff | --linked-v1, --linked-v2, --json, --verbose |
corners |
Manage corners | list, show <name> |
analyze |
Deep analysis | clock-relations, --json |
rules |
Rule lookup | list, show <code>, --module, --severity, --search |
coverage |
Gap analysis | --json, --missing-only |
lint |
Format/reorganize SDC | --check, --fix, --output |
convert |
SDC to JSON/YAML | --format, --output |
batch |
Directory-wide processing | check, lint, report, --fix |
report |
HTML reports | check, diff, clock-relations, coverage |
web |
Launch browser UI | (opens http://localhost:8501) |
- Zero external dependencies for core validation (stdlib only)
- Single Python files β no complex package hierarchies
- Fail-fast on errors β CLI exits with code 1 if any errors found
- Graceful optional features β YAML (PyYAML optional), Web (Streamlit optional)
- CI-friendly β JUnit XML, JSON output, exit codes, pre-commit hooks
- Self-contained reports β HTML with inline CSS, no CDN, no JS
Detailed feature documentation β each feature has its own README with:
- Why it's needed (problem statement)
- How it was implemented (technical architecture)
- Use cases (when/why to use it)
- Structural view (ASCII diagrams)
- Flow diagrams (step-by-step)
- CLI usage examples
- Python API examples
- Configuration reference
β Feature Documentation Index
# Run all available samples through the checker
sdc-tools check samples/example.sdc --verbose
sdc-tools coverage samples/example.sdc
sdc-tools analyze clock-relations samples/clock_relations.sdc
sdc-tools diff samples/constraint_diff_v1.sdc samples/constraint_diff_v2.sdc
# New samples with intentional bugs
sdc-tools check samples/buggy_no_clocks.sdc
sdc-tools check samples/warning_heavy.sdc
# Lint & convert
sdc-tools lint samples/example.sdc
sdc-tools convert samples/example.sdc --format json
# Run the full test suite
python -m pytest tests/ -qContributions welcome! The project is organized for easy extension:
- Add a new checker rule: Edit
checker.py(add condition) +rules_registry.py(add documentation) - Add a new custom condition: Edit
custom_rules.py(add@_cond("name")handler) - Add a new coverage item: Edit
coverage.py(add to appropriate category) - Add a new report section: Edit
reporter.py(add generator function) - Add a new tab: Create
ui/tab_<name>.pyand add toapp.pytab list - Add a new Streamlit tab: Edit
app.py(add tost.tabs()list)
MIT License β free for commercial and non-commercial use.
Built with deep respect for:
- Ausdia β TimeVision constraint analysis tool and their excellent blog posts on SDC pitfalls
- Synopsys β SDC standard and tool documentation
- OpenCores β open-source digital design community
SDC Tools is an open-source project by RAMA-L7 β an MIT-licensed open-core VLSI constraint toolkit.