# sdc2xls

> Convert SDC timing constraints to an Excel workbook: a sheet per constraint category, one constraint per row, mode and corner as columns. Tcl and unmodelled commands are kept in a Raw sheet.

- Catalog id: `Sdc2xls`; bundle: `sdc2xls`
- Documentation page: https://edautils.com/sdc2xls.html
- Keywords: SDC to Excel, SDC to xlsx, SDC to spreadsheet, SDC converter, multi-mode SDC, timing constraints workbook
- Terms: as stated on edautils.com, EDAUtils tools are free for commercial and academic use, with no license server. Licence prerequisites per tool are under "How an agent runs it".
- This file: https://edautils.com/capabilities/sdc2xls.md

## Downloads

- EDAUtils download site: https://edautils.ai/download/Sdc2xls
- SourceForge: no reachable folder for this bundle
- GitHub Releases: no asset for this bundle in https://github.com/edautils/releases/releases

## How an agent runs it

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

Reads SDC (Synopsys Design Constraints) files and writes the **SDC workbook**: one Excel workbook with a
sheet per constraint category, one constraint per row, mode and corner as columns of every row. The inverse
is `xls2sdc`. Main class `com.eu.miscedautils.sdc2xls.sdc2xls` (jar `lib/designplayer.jar`).

### Where it ships

Its own bundle (`sdc2xls`; release tree `release_scripts/sdc2xls/1.0`) and, once wired, as a point tool in the
**sdc-shell** and **designplayer-shell** bundles. The regression harness runs it through `tools/regress/bin/sdc2xls`.

### Prerequisites

- Java 11+ on `PATH`; `EDAUTILS_ROOT` = the unpacked bundle (`source setup_env.sh`); a licence (`EDAUTILS_LICENSE_FILE`).
  Licence feature `SDC2XLS`; no licence: exit 10.
- Optional: `JAVA_FLAGS`, `EDAUTILS_LOG_FILE`, `EDAUTILS_DISABLE_USAGE_TRACKING=true`.

### Invocation

```
sdc2xls -in <a.sdc>[,<b.sdc>...] [-mode <m>[,<m>...]] [-corner <c>[,<c>...]] -out <book.xlsx> [-nobanner] [-user <email>] [-help]
sdc2xls -normalize <file.sdc> [-out <file>]
```

| Option | Meaning |
|---|---|
| `-in` | the SDC file(s), comma separated; `source` is not followed (it is a Raw row) |
| `-mode` | the mode of each file, comma separated, one per file (default: the file name without extension) |
| `-corner` | one corner for all files, or one per file (default: none) |
| `-out` | the workbook (mandatory) |
| `-normalize` | diagnostic: print (or write to `-out`) the normal form two SDCs are compared by: per command its name, options sorted, positional arguments; comments ignored |

Two inputs may not share the same mode and corner.

### The workbook (template 1.0)

Sheets: `Readme`, `Modes` (mode, corner, source_file, out_file, description), `Clocks` (create_clock),
`GeneratedClocks` (create_generated_clock), `ClockProps` (latency, uncertainty, transition, propagated clock, sense,
ideal network), `ClockGroups` (set_clock_groups), `IODelays` (set_input_delay / set_output_delay), `Exceptions`
(false path, multicycle, max/min delay, max time borrow; from / through / to in own columns), `CaseAnalysis`
(set_case_analysis, set_logic_zero/one/dc), `DisableTiming`, `Environment` (driving cell, load, input transition,
max fanout/transition/capacitance, operating conditions, wire load, units, derate, dont_touch ...), `Hierarchy`
(current_design, current_instance), `Raw`.

Every category row: `seq` (place in the SDC, across all sheets), `mode`, `corner`, `scope` (the current_instance in
effect), `command`, then the sheet's option columns and positional columns (`value`, `objects`), `other_options`,
`comment_above`, `comment_inline`. Cell conventions: values are the SDC text verbatim, query commands included
(`[get_ports clk*]`, `{a b}`); a repeated option (`-through`, `-group`) is one line of the cell per occurrence; a
newline inside a value is written as U+2424; a flag column holds `yes`.

### What is carried outside the columns

- `Raw` (columns seq, mode, corner, scope, kind, text, cont): Tcl (`foreach`, `proc`, `if`, `source`, ...), variables
  (`set`), commands no sheet owns or the command table does not know, and anything a cell cannot hold (text over
  30000 characters goes in pieces, `cont` = `+`). Written back in place.
- `other_options`: an option the sheet has no column for, or an abbreviated/unknown option, verbatim.
- Comments: lines above a command and on its line travel with it; comments at the end of the file are a Raw `comment` row.
- The log lists both under "Carried in Raw or other_options, per construct".
- Not preserved: blank lines, indentation, the order of options within a command (they are written in column order:
  valued options, flags, positional arguments, other_options), `;` joining of commands.

### Exit status and messages

0 imported; 2 syntax error in an input or no command in it (no workbook); 1 usage error; 10 licence failure. Message ids
10950-10974 (`10952` summary, `10953` input error, `10954` workbook written, `10955` nothing importable, `10957` per-construct list).
