# sdclint

> Lint SDC timing constraints: evaluates the decks like a timing tool and checks clocks, generated clocks, IO delays, exceptions and units against a design-independent rule catalogue.

- Catalog id: `Sdclint`; bundle: `sdclint`; latest version 20261018
- Keywords: SDC lint, timing constraint checker, constraint review
- Terms: as stated on edautils.com, EDAUtils tools are free for commercial and academic use, with no license server. The bundle's own metadata says: "Free to evaluate with the bundled licence; commercial licences from help@edautils.com". Licence prerequisites per tool are under "How an agent runs it".
- This file: https://edautils.com/capabilities/sdclint.md

## Downloads

- EDAUtils download site: https://edautils.ai/download/Sdclint (latest file `sdclint-20261018.tar.gz`)
- SourceForge: https://sourceforge.net/projects/edautils-free-utilities/files/sdclint/
- GitHub Releases: https://github.com/edautils/releases/releases/download/RELEASE_20261018/sdclint-20261018.tar.gz (release `RELEASE_20261018`; all releases: https://github.com/edautils/releases/releases)

## How an agent runs it

The following is the AGENTS.md shipped at the root of the bundle.

SDC lint checker. Reads one or more SDC (Synopsys Design Constraints) decks, **evaluates** them in
a private Tcl interpreter (JTcl) the way a timing tool does -- `set`, `expr`, `foreach`, `proc`,
`if`, `source` and `$variables` all work -- builds its own typed constraint model (clocks,
generated clocks, clock latency/uncertainty/transition/propagation, clock groups, input/output
delays, false path / multicycle / max / min delay with from/through/to, case analysis,
environment, design rules, units; every record with file and line) and checks it against a
catalogue of lint rules. Design-independent: no netlist or Liberty library is read.

Main class: `com.eu.miscedautils.sdclint.sdclint` (jar `lib/designplayer.jar`; the `.bat`
launcher uses the same class). Source: `designplayershell/src/com/eu/miscedautils/sdclint/`
(`CommandTable.java` is the per-command option table, `Loader.java` the Tcl evaluation,
`LintModel.java` the model, `Rules.java` the catalogue and the cross-record checks).

### Where it ships

Its own bundle, `sdclint.tar.gz` (flow `sdclint` in `bundle_jar_files.csh`; release tree
`release_scripts/sdclint/1.0`), and as a point tool in the **sdc-shell** and **designplayer-shell**
bundles (`bin/sdclint`; this guide as `tools/sdclint/AGENTS.md`, examples under
`tools/sdclint/examples/`). The regression harness runs it through
`tools/regress/bin/sdclint`.

### Prerequisites

- Java on `PATH` (the launcher runs plain `java`). Use Java 11 or newer (Java 21 recommended: the
  release is built and regression-tested with OpenJDK 21); the bundled JAXB and Eclipse libraries
  are class-file version 55, so a Java 8 runtime fails with `UnsupportedClassVersionError`.
- `EDAUTILS_ROOT` = the unpacked bundle directory (must contain `bin/` and `lib/`). The launcher
  exits 1 with "Environment variable EDAUTILS_ROOT is not set" otherwise. `source setup_env.sh`
  (or `setup_env.csh`) from the bundle root sets `EDAUTILS_ROOT`, prepends `bin/` to `PATH` and sets `CLASSPATH=$EDAUTILS_ROOT/lib/designplayer.jar`. It does
  **not** set `EDAUTILS_LICENSE_FILE`; set it yourself.
- Licence: licence feature `SDCLINT` (also granted by `SDCBACKBONE` and `DESIGNPLAYERBACKBONE`).
  No valid licence: exit status 10 (messages 6037/6405, "License Checkout Failed"); a valid licence
  without the feature: exit status 10 (message 6404 "Failed to checkout LICENSE for the feature :
  SDCLINT"). The licence file is searched in this order: `$EDAUTILS_LICENSE_FILE`,
  `./edautils.lic`, `$HOME/edautils.lic`, `$EDAUTILS_ROOT/edautils.lic`.
- Optional environment: `JAVA_FLAGS` (passed to the JVM; with no heap option in it the launcher adds `-Xmx` sized to the machine (`bin/eu_heap.sh`: the largest of 64/32/16/12/8/4 GB within 3/4 of physical or cgroup memory, else 2 GB; `EDAUTILS_MAX_HEAP_GB` caps it)), `EDAUTILS_LOG_FILE` /
  `EDAUTILS_APPEND_LOG_FILE` (log file name; the second appends), `EDAUTILS_PRINT_STACK_TRACE`
  (stack traces on internal exceptions). No tool-specific environment variables are read.
- No external tools needed.

### Invocation

```
sdclint -in <file.sdc> [-in <file.sdc> ...] [-f <filelist>] [-sdc_version <v>] [-report <file>]
        [-disable <ID,ID..>] [-enable_only <ID,ID..>] [-severity error|warning|info]
        [-list_rules] [-quiet] [-nobanner] [-user <email>] [-help]
```

| Option | Meaning |
|---|---|
| `-in <file>` | SDC deck to lint; repeatable, read in the order given (one model across all of them) |
| `-f <filelist>` | File with one deck path per line (`#` comments, blank lines skipped); a relative path that does not exist from the run directory is taken relative to the list |
| `-sdc_version <v>` | Check against SDC version `<v>` (SDC-014) instead of the deck's `set_sdc_version`; also silences SDC-012 |
| `-report <file>` | Report file (default `sdclint.rpt`) |
| `-disable <IDs>` | Rules not to report (comma or blank separated, e.g. `SDC-017,SDC-020`) |
| `-enable_only <IDs>` | Report only these rules |
| `-severity <s>` | Lowest severity reported: `error`, `warning` or `info` (default `info`, i.e. everything) |
| `-list_rules` | Print the rule catalogue (ID, severity, implemented/deferred, title) on stdout and exit 0; no licence needed |
| `-quiet` | Nothing on stdout/log (the report is still written) |
| `-nobanner` | No banner |
| `-user <email>` | User id recorded for the licence/usage record |
| `-help` / `-h` | Usage, exit 0 |

An unknown rule id in `-disable`/`-enable_only`, an unknown option, a missing value, no input,
or an unreadable input/file list is a usage error: message 10700 and exit 1. Filters apply to the
report, the log and the exit status alike (a disabled error does not fail the run).

### How a deck is read

- Each top-level statement is evaluated on its own; a Tcl error in one is reported (SDC-001, or
  SDC-018 for an unset variable) and the next statement still runs. An unbalanced brace/bracket/
  quote is reported at the line where the statement starts and reading resumes on the next line.
- `source` is followed (relative paths are tried from the run directory, then from the sourcing
  file's directory); findings in a sourced file carry that file's path.
- Every SDC 2.1 command, the common extensions (`set_dont_touch`, `set_dont_touch_network`,
  `set_dont_use`, `set_size_only`, `derive_pll_clocks`, `set_property`, `set_max_skew`, ...),
  destructive commands (`reset_design`, `remove_*`) and collection helpers (`get_object_name`,
  `sizeof_collection`, `add_to_collection`, `foreach_in_collection`, `get_property ... period`) are
  defined. Object queries (`get_ports/pins/cells/nets/clocks/lib_cells`, `all_inputs/outputs/
  clocks/registers`, `current_design`; `all_inputs` takes OpenSTA's `-no_clocks`; `all_fanin`/`all_fanout`, `get_full_name`) return handles,
  and SDC-303 is not raised once a `foreach` has walked a collection: lists a deck builds there
  depend on the netlist, which sdclint does not have, so `set p [get_ports x]` then `$p` works.
- Options are bound by a per-command table (flag vs valued, value type, repeatable, required,
  mutually exclusive sets, first SDC version), so `-min -0.1`, `-hold [get_pins ...]` and friends
  are read correctly. A negative number is a value, never an option.
- For safety, `exec`, `open`, `socket`, `cd`, `exit`, `package`, `load`, `vwait`, `after`, `update`,
  `gets`, `read`, `puts`, `close`, `flush`, `fconfigure`, `pwd`, `glob` and writing forms of `file`
  are **not executed** (reported as SDC-017). `proc`, `while` and the path forms of `file` run.
- Nothing is sent anywhere: the tool registers no usage of its own and lint findings never enter
  the tool's error record.

### Inputs / Outputs

- Reads: the decks and anything they `source`.
- Writes: the report (`-report`, default `sdclint.rpt`) and the log `sdclint.log` (override with
  `EDAUTILS_LOG_FILE`), both in the current directory.
- Report format (stable; the regression goldens are these files):

```
## sdclint report
## inputs: <the -in / -f decks>
<severity> <rule-id> <file>:<line> <message>        one line per finding, in file order
...

## summary per rule
<rule-id>  <severity>  <count>  <title>
## total: <E> error(s), <W> warning(s), <I> info
```

  `<severity>` is `error`, `warning` or `info`; `<file>` is the path as given (or as sourced).
- Log: the same finding lines prefixed `sdclint: `, then `Written lint report into file : <f>`
  (10703) and `Lint result: <E> error(s), <W> warning(s), <I> info` (10704). The closing
  `Found N error(s) ...` line counts tool errors (usage, licence), not lint findings.

### Exit status and messages

- **0** no lint error (warnings and info never fail the run), **2** at least one lint error
  reported, **1** usage error / unreadable input / internal error, **10** no licence.
  The launcher itself exits 1 when `EDAUTILS_ROOT` is not set.
- Message ids 10700-10899 belong to this tool: 10700 usage error, 10701 options, 10702 reading a
  deck, 10703 report written, 10704 lint result, 10710 a finding, 10720-10728 usage text, 10799
  internal error. Displayed ids carry the usual 50000 offset (`60704`).

### Rules

`sdclint -list_rules` prints this table. Catalogue and rationale:
`BUILD-STATE/AUDIT/S56-SDC-LINT-RULES.md` (131 rules, each with a failing and a passing example).
117 are implemented; the 14 that need a netlist or a Liberty library never fire in `sdclint`, which
reads no design. The 12 netlist rules (SDC-139, 140, 212, 314, 315, 407, 408, 504, 702, 703, 704,
806) and four more design rules (SDC-901, 903, 904, 905, below) are checked as **Level 2** against an
elaborated Verilog/VHDL/mixed design by `elabvl`/`elabvh`/`elabmixed -sdc <file> -lint_sdc`, which
also runs this whole catalogue as Level 1 (see the parseverilog AGENTS.md, "Intent options"). The two
Liberty rules (SDC-404, 410) remain unimplemented.

| ID | Severity | Implemented | Title |
|---|---|---|---|
| SDC-001 | error | yes | Tcl structure error |
| SDC-002 | error | yes | Unknown command |
| SDC-003 | error | yes | Unknown option |
| SDC-004 | warning | yes | Abbreviated option |
| SDC-005 | error | yes | Missing required argument |
| SDC-006 | error | yes | Option missing its value |
| SDC-007 | error | yes | Wrong value type |
| SDC-008 | error | yes | Value with unit suffix |
| SDC-009 | error | yes | Too many positional arguments |
| SDC-010 | error | yes | Mutually exclusive options |
| SDC-011 | warning | yes | Option repeated |
| SDC-012 | info | yes | Missing set_sdc_version |
| SDC-013 | error | yes | Invalid SDC version |
| SDC-014 | warning | yes | Command newer than declared version |
| SDC-015 | info | yes | Deprecated command |
| SDC-016 | warning | yes | Tool-specific (non-SDC) command |
| SDC-017 | info | yes | Non-SDC Tcl construct |
| SDC-018 | error | yes | Variable used before set |
| SDC-019 | warning | yes | Destructive command in a constraint file |
| SDC-020 | info | yes | Exact duplicate statement |
| SDC-021 | warning | yes | Continuation with trailing blanks |
| SDC-022 | error | yes | Unbraced bus bit |
| SDC-101 | error | yes | create_clock without -period |
| SDC-102 | error | yes | Non-positive period |
| SDC-103 | error | yes | Waveform with odd edge count |
| SDC-104 | error | yes | Waveform not strictly increasing |
| SDC-105 | error | yes | Waveform span exceeds one period |
| SDC-106 | error | yes | Virtual clock without -name |
| SDC-107 | warning | yes | Virtual clock never referenced |
| SDC-108 | error | yes | Clock name redefined |
| SDC-109 | error | yes | Second clock on same source without -add |
| SDC-110 | error | yes | -add without -name |
| SDC-111 | warning | yes | Multiple clocks on one source without clock groups |
| SDC-112 | info | yes | Clock period implausible for the units |
| SDC-113 | error | yes | Generated clock without -source |
| SDC-114 | warning | yes | Generated clock with no derivation option |
| SDC-115 | error | yes | Conflicting derivation options |
| SDC-116 | error | yes | Bad divide/multiply factor |
| SDC-117 | error | yes | Bad -edges list |
| SDC-118 | error | yes | -edge_shift misuse |
| SDC-119 | error | yes | -duty_cycle misuse |
| SDC-120 | error | yes | -master_clock names an undefined clock |
| SDC-121 | error | yes | Ambiguous master: source carries several clocks, no -master_clock |
| SDC-122 | warning | yes | Generated clock source carries no clock |
| SDC-123 | error | yes | Generated clock defined on its own source |
| SDC-124 | error | yes | Generated clock cycle |
| SDC-125 | error | yes | Generated clock defined before its master |
| SDC-126 | info | yes | Generated clock without -name |
| SDC-127 | error | yes | set_clock_groups references an undefined clock |
| SDC-128 | error | yes | set_clock_groups without a relationship type |
| SDC-129 | error | yes | Same clock in two groups of one command |
| SDC-130 | info | yes | Single -group |
| SDC-131 | warning | yes | Conflicting clock-group relationships |
| SDC-132 | error | yes | Clock attribute on an undefined clock |
| SDC-133 | warning | yes | Network latency on a propagated clock |
| SDC-134 | warning | yes | set_propagated_clock on a virtual clock |
| SDC-135 | error | yes | Negative clock uncertainty or transition |
| SDC-136 | warning | yes | Uncertainty not smaller than the period |
| SDC-137 | error | yes | Inter-clock uncertainty half given |
| SDC-138 | warning | yes | Early latency greater than late |
| SDC-139 | warning | no | Clock defined on an output port -- needs a netlist (not implemented) |
| SDC-140 | warning | no | Clock defined on a hierarchical (non-leaf) pin -- needs a netlist (not implemented) |
| SDC-201 | warning | yes | IO delay without -clock |
| SDC-202 | error | yes | IO delay references an undefined clock |
| SDC-203 | warning | yes | IO delay larger than the clock period |
| SDC-204 | warning | yes | Only -max or only -min |
| SDC-205 | warning | yes | -min greater than -max |
| SDC-206 | warning | yes | Second IO delay on the same port without -add_delay |
| SDC-207 | info | yes | -add_delay on the first constraint |
| SDC-208 | warning | yes | IO delay on a clock source port |
| SDC-209 | error | yes | Input delay on an output (or output delay on an input) |
| SDC-210 | error | yes | -reference_pin without -clock |
| SDC-211 | info | yes | Negative IO delay |
| SDC-212 | warning | no | Unconstrained IO port -- needs a netlist (not implemented) |
| SDC-301 | error | yes | Exception with no -from/-to/-through |
| SDC-302 | error | yes | Exception names an undefined clock |
| SDC-303 | error | yes | Empty object list in -from/-to/-through |
| SDC-304 | warning | yes | Multicycle -setup without -hold adjustment |
| SDC-305 | warning | yes | Multicycle -hold without -setup |
| SDC-306 | error | yes | Bad multicycle multiplier |
| SDC-307 | warning | yes | Multicycle between different-period clocks without -start/-end |
| SDC-308 | warning | yes | Exception between clocks already asynchronous |
| SDC-309 | warning | yes | False path overrides another exception |
| SDC-310 | warning | yes | Conflicting multicycle / max-delay values on the same path |
| SDC-311 | error | yes | min_delay larger than max_delay on the same path |
| SDC-312 | warning | yes | False path within a single clock |
| SDC-313 | warning | yes | Overly broad exception |
| SDC-314 | warning | no | -from on a non-startpoint / -to on a non-endpoint -- needs a netlist (not implemented); needs a Liberty library (not implemented) |
| SDC-315 | warning | no | Exception through the clock network -- needs a netlist (not implemented) |
| SDC-316 | info | yes | -datapath_only portability |
| SDC-317 | error | yes | group_path without -name or -default |
| SDC-318 | error | yes | set_disable_timing -from without -to |
| SDC-401 | error | yes | Negative load |
| SDC-402 | info | yes | Implausible load for the units |
| SDC-403 | error | yes | set_driving_cell without -lib_cell |
| SDC-404 | error | no | Unknown driving lib cell or pin -- needs a Liberty library (not implemented) |
| SDC-405 | warning | yes | Drive specified twice on one port |
| SDC-406 | error | yes | Negative input transition or drive |
| SDC-407 | warning | no | Drive on an output / load on an input -- needs a netlist (not implemented) |
| SDC-408 | info | no | Input without any drive model -- needs a netlist (not implemented) |
| SDC-409 | error | yes | Bad wire-load mode |
| SDC-410 | error | no | Unknown operating condition or library -- needs a Liberty library (not implemented) |
| SDC-411 | warning | yes | Suspicious timing derate |
| SDC-412 | error | yes | Negative clock-gating check or max area |
| SDC-501 | error | yes | Bad case value |
| SDC-502 | warning | yes | Conflicting case values on one object |
| SDC-503 | warning | yes | Case analysis on a clock source |
| SDC-504 | warning | no | Case analysis on an output port -- needs a netlist (not implemented) |
| SDC-505 | info | yes | Exception through a constant object |
| SDC-601 | error | yes | Non-positive max_transition |
| SDC-602 | error | yes | Non-positive max_capacitance |
| SDC-603 | error | yes | Non-positive max_fanout |
| SDC-604 | error | yes | min_capacitance above max_capacitance |
| SDC-605 | info | yes | max_transition implausible for the clock period |
| SDC-606 | error | yes | Negative fanout load / port fanout number |
| SDC-701 | error | yes | get_clocks matches no defined clock |
| SDC-702 | error | no | get_ports matches nothing -- needs a netlist (not implemented) |
| SDC-703 | error | no | get_pins matches nothing -- needs a netlist (not implemented) |
| SDC-704 | error | no | get_cells / get_nets match nothing -- needs a netlist (not implemented) |
| SDC-705 | error | yes | Object kind does not fit the slot |
| SDC-706 | warning | yes | Bare name instead of a query |
| SDC-707 | warning | yes | Hierarchy separator mismatch |
| SDC-708 | error | yes | -of_objects combined with patterns |
| SDC-709 | warning | yes | -hierarchical with a hierarchical pattern |
| SDC-801 | error | yes | set_units redefined with a different value |
| SDC-802 | warning | yes | set_units after values were used |
| SDC-803 | error | yes | Unknown unit |
| SDC-804 | error | yes | Clock referenced before definition |
| SDC-805 | warning | yes | current_instance left below top |
| SDC-806 | warning | no | current_design differs from the netlist top -- needs a netlist (not implemented) |
| SDC-807 | warning | yes | set_hierarchy_separator changed mid-file |
| SDC-901 | error | no | Input delay on an output port / output delay on an input port -- Level 2: elab -lint_sdc |
| SDC-903 | info | no | Clock-like input port without a clock -- Level 2: elab -lint_sdc |
| SDC-904 | warning | no | set_disable_timing on a hierarchical cell -- Level 2: elab -lint_sdc |
| SDC-905 | info | no | Constraint on a pin of a black-box instance -- Level 2: elab -lint_sdc |

Notes on thresholds and scope:
- SDC-014 knows a partial "first version" table: `set_units`, `set_clock_groups`,
  `create_voltage_area`, the level-shifter and porosity commands (1.7), `set_max_dynamic_power`,
  `set_max_leakage_power` (1.4), `set_sense`, `set_clock_exclusivity` (2.1); everything else is 1.1.
- SDC-112 fires below 0.01 ns or above 1e6 ns (after `set_units -time`); SDC-402 above 1000 pF or
  below 1e-6 pF; SDC-605 when `set_max_transition` exceeds the fastest clock period.
- SDC-122, SDC-209 and SDC-303 are the design-independent forms: a `-source` port that carries no
  clock, IO delays on `all_outputs`/`all_inputs`, a literal empty list.
- "Same object" comparisons (SDC-109, 204-208, 405, 502-505, 604) compare query kind and pattern
  text; without a netlist, `[get_ports din*]` and `[get_ports din0]` are different objects.

### Examples

In `examples/`, each with a `runme.csh`:

| Directory | Command | Expected |
|---|---|---|
| `soc_multiclock` | `sdclint -in soc_top.sdc -report sdclint.rpt` | exit 0, no findings |
| `lint_findings` | `sdclint -in block.sdc -report sdclint.rpt` | exit 2, ten findings (SDC-109, 115, 202, 022 ...) |
| `filelist` | `sdclint -f files.lst -severity warning -report sdclint.rpt` | exit 0; two decks and a sourced clock file |

Regression: `tests.edautilscommandline/tests/sdclint/` -- one case per implemented rule
(`SDC-<id>_<what>/input.sdc`, report golden `sdclint.rpt.gld`, exit golden `exit.gld`; the case also
checks that its rule is in the report), clean decks that must report nothing (`clean_soc_multiclock`,
`clean_ddr_io`, `clean_black_parrot` -- the 2409-line BlackParrot deck of the parsesdc family), and
command-line cases (`cli_*`). Run with `tools/regress/run.sh sdclint`.
