ucs_setup_tree_fix
Usage Guide — Multi-Corner Setup Tree Delay Cell Fix (Perl)
| Script | ucs_setup_tree_fix |
| Version | UCS-1.0.0 |
| Modified | 2026-03-26 |
| Purpose | Merge per-corner setup-tree slack/margin JSON records, select legal delay cells, and generate ECO Tcl |
| Environment | Standalone Perl (packaged executable), RHEL7 / RHEL8 |
| Support | tech@universalchipstudio.com |
Key Features
- Multi-Corner Merging — Accepts multiple per-corner setup-tree point JSON files and merges them into a unified view. Each point’s margin is computed across all corners to ensure the fix is legal everywhere.
- Cell Delay Map Lookup — Reads one or more cell delay map files and selects the best legal delay cell for each tree point based on the merged margin requirement.
- Three Fix Modes —
conservative(use raw lendable margin only),balance(average of required and lendable), andaggressive(unlimited lendable). Guardband control via--current_marginand--next_guardband. - Iterative Solving — Each tree point is solved iteratively (up to
--max_repeatrounds) to find the best matching delay cell that satisfies the merged margin constraint. - Preferred Cell Selection — Optional
--prefer_cellsrestricts candidates to a subset of the delay map, allowing the user to bias toward known-good cells.
Quick Start
# Minimal: merge 3 corners and fix with default conservative mode
ucs_setup_tree_fix \
--point_json corner_ss.json corner_ff.json corner_tt.json \
--cell_delay cell_delay_map.txt
# Balance mode with guardband
ucs_setup_tree_fix \
--point_json corner_ss.json corner_ff.json \
--cell_delay delay_a.map delay_b.map \
--fix_mode balance \
--next_guardband 5.0 \
--output eco_tree_fix.tcl
Published Paths
| Location | Path |
|---|---|
| Source | verified/sta/setup/perl_modular/bin/ucs_setup_tree_fix.pl |
| RHEL7 executable | publish/redhat7/sta/setup/perl_modular/bin/ucs_setup_tree_fix |
| RHEL8 executable | publish/redhat8/sta/setup/perl_modular/bin/ucs_setup_tree_fix |
Options
Required
| Option | Type | Description |
|---|---|---|
--point_json | string(s) | One or more setup-tree point JSON files. Each file contains per-corner slack/margin records for tree points. required repeatable |
--cell_delay | string(s) | One or more cell delay map files. All files are merged in the given order. required repeatable |
Fix Control
| Option | Type | Default | Description |
|---|---|---|---|
--prefer_cells | string(s) | — | Optional preferred cell list. When set, only cells present in both the delay map and this list are used as candidates. repeatable |
--fix_mode | string | conservative | Fix policy: conservative, balance, or aggressive. See Fix Modes section below. |
--current_margin | float | 0 | Extra delay added onto current-level required slack. Widens the fix target. |
--next_guardband | float | 0 | Guardband reserved for the next level, subtracted from downstream available margin. |
--max_repeat | integer | 20 | Maximum iterative solving rounds per tree point. |
Output
| Option | Type | Default | Description |
|---|---|---|---|
--output | string | setup_tree_fix.eco.tcl | Output ECO Tcl file path. |
--eco_prefix | string | ucs_setup_tree_fix | ECO naming prefix used inside the generated Tcl. |
--dump_failed | string | — | Optional output file for unresolved points (JSON-ish text dump). |
Information
| Option | Type | Description |
|---|---|---|
--help, -h | flag | Show help and exit. |
--version | flag | Show version and exit. |
Fix Modes
The fix mode controls how much margin is available for delay cell insertion at each tree point. The core formula is:
raw_lendable = next_margin - next_guardband final_target = min(required, lendable)
| Mode | Lendable Computation | Use When |
|---|---|---|
conservative |
lendable = raw_lendable |
Default. Uses only the actual available downstream margin. Safest for production. |
balance |
lendable = avg(required, raw_lendable) |
Compromise between required target and available margin. Good for moderate risk tolerance. |
aggressive |
lendable = 9999 |
Ignore downstream margin limits. Maximum fix coverage at the cost of potential downstream violations. |
Guardband interaction:
--current_margin adds to the required slack at the current level (makes the fix target larger), while --next_guardband subtracts from the available downstream margin (makes the lendable smaller). Together they control the safety margin of the fix.
Output Files
| File | Content |
|---|---|
<output> (default: setup_tree_fix.eco.tcl) |
ECO Tcl commands to swap delay cells at resolved tree points |
<dump_failed> (optional) |
JSON dump of unresolved tree points with their merged margins |
The script also prints a summary to stdout:
- ECO file path written
- Number of fixed points
- Number of failed (unresolved) points
Usage Examples
Conservative Fix (Default)
ucs_setup_tree_fix \
--point_json ss_tree.json ff_tree.json tt_tree.json \
--cell_delay cell_delay_map.txt
Merge 3 corners, fix using conservative mode with no guardband.
Balance Mode with Guardband
ucs_setup_tree_fix \
--point_json ss_tree.json ff_tree.json \
--cell_delay delay_a.map delay_b.map \
--fix_mode balance \
--current_margin 2.0 \
--next_guardband 5.0 \
--output my_tree_fix.tcl
Use balance mode with 2ps current margin and 5ps next-level guardband.
Aggressive with Preferred Cells
ucs_setup_tree_fix \
--point_json corner_a.json corner_b.json \
--cell_delay full_delay_map.txt \
--prefer_cells DELBUF_X1 DELBUF_X2 DELBUF_X4 \
--fix_mode aggressive \
--output aggressive_fix.tcl \
--dump_failed unresolved.json
Aggressive fix using only preferred cells. Dump unresolved points for analysis.
Multiple Delay Maps with Custom Prefix
ucs_setup_tree_fix \
--point_json tree_points.json \
--cell_delay map_v1.txt map_v2.txt map_override.txt \
--eco_prefix my_project_tree_fix \
--max_repeat 50
Merge 3 cell delay maps (later files take precedence). Increase iteration limit to 50 rounds.