# xls2sdc

> Write SDC timing constraints from an Excel workbook, one SDC per mode and corner. The workbook comes from sdc2xls or from the empty template xls2sdc writes.

- Catalog id: `Xls2sdc`; bundle: `xls2sdc`
- Documentation page: https://edautils.com/xls2sdc.html
- Keywords: Excel to SDC, xlsx to SDC, spreadsheet to SDC, SDC generator, SDC per mode, constraint template
- 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/xls2sdc.md

## Downloads

- EDAUtils download site: https://edautils.ai/download/Xls2sdc
- 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.

Writes SDC from the **SDC workbook** (what `sdc2xls` writes, or a hand-filled `xls2sdc -template`), one SDC per mode / corner.
Main class `com.eu.miscedautils.xls2sdc.xls2sdc` (jar `lib/designplayer.jar`). Layout of the workbook: see
`sdc2xls/AGENTS.md` (sheets, columns, cell conventions).

### Where it ships

Its own bundle (`xls2sdc`; `release_scripts/xls2sdc/1.0`) and, once wired, in the sdc-shell / designplayer-shell bundles.
Regression harness: `tools/regress/bin/xls2sdc`.

### Prerequisites

Java 11+, `EDAUTILS_ROOT` (`source setup_env.sh`), a licence with feature `XLS2SDC` (no licence: exit 10). `JAVA_FLAGS`,
`EDAUTILS_LOG_FILE` as for every tool.

### Invocation

```
xls2sdc -in <book.xlsx> [-mode <name>|all] [-corner <name>] -out <file.sdc|dir> [-nobanner] [-user <email>] [-help]
xls2sdc -template <book.xlsx>
```

| Option | Meaning |
|---|---|
| `-in` | the workbook |
| `-mode` | rows of this mode and rows with an empty mode are written. Mandatory when the workbook has several modes; `all` writes one SDC per Modes-sheet row (or per mode / corner found) into the directory `-out`, named by `out_file` or `<mode>[_<corner>].sdc` |
| `-corner` | the same for the corner column |
| `-out` | the SDC (a directory with `-mode all`) |
| `-template` | writes the empty workbook: headers with a help comment each, drop-downs (command, flags yes, Raw kind), a Readme guide and one example row per sheet whose seq starts with `#` (ignored) |

### Rules

- All sheets' rows are written in `seq` order (a row without seq goes last, in sheet order). A row whose seq starts with `#`,
  and a Modes row whose mode starts with `#`, is ignored.
- Per row: `command`, the valued options (`-opt value`, one per cell line), the flags marked `yes`, the positional arguments,
  then `other_options` verbatim. Comments are written above / after the command.
- `scope`: if a row's scope differs from the scope in effect, `current_instance <scope>` (bare when empty) is written first.
- Rows of Raw are written as they are (`cont` = `+` rows continue the row above).
- A workbook is checked before anything is written: `Readme!A1` carries the marker, every sheet and header column exists, `seq` is a
  number, `command` is one of the sheet's commands. Errors are message 10979 with sheet!row; exit 2, no SDC.

### Exit status and messages

0 written; 2 workbook wrong (10979 per row, 10981 unreadable workbook, 10982 unknown mode / corner / several modes without `-mode`);
1 usage (10975); 10 licence. `10977` names each SDC written, `10980` the template. Message ids 10975-10999.
