ucs_setup_tree_fix

Usage Guide — Multi-Corner Setup Tree Delay Cell Fix (Perl)

Scriptucs_setup_tree_fix
VersionUCS-1.0.0
Modified2026-03-26
PurposeMerge per-corner setup-tree slack/margin JSON records, select legal delay cells, and generate ECO Tcl
EnvironmentStandalone Perl (packaged executable), RHEL7 / RHEL8
Supporttech@universalchipstudio.com
Quick Nav: Features Quick Start Published Paths Options Fix Modes Output Examples

Key Features

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

LocationPath
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

OptionTypeDescription
--point_jsonstring(s) One or more setup-tree point JSON files. Each file contains per-corner slack/margin records for tree points. required repeatable
--cell_delaystring(s) One or more cell delay map files. All files are merged in the given order. required repeatable

Fix Control

OptionTypeDefaultDescription
--prefer_cellsstring(s)— Optional preferred cell list. When set, only cells present in both the delay map and this list are used as candidates. repeatable
--fix_modestring conservative Fix policy: conservative, balance, or aggressive. See Fix Modes section below.
--current_marginfloat 0 Extra delay added onto current-level required slack. Widens the fix target.
--next_guardbandfloat 0 Guardband reserved for the next level, subtracted from downstream available margin.
--max_repeatinteger 20 Maximum iterative solving rounds per tree point.

Output

OptionTypeDefaultDescription
--outputstring setup_tree_fix.eco.tcl Output ECO Tcl file path.
--eco_prefixstring ucs_setup_tree_fix ECO naming prefix used inside the generated Tcl.
--dump_failedstring— Optional output file for unresolved points (JSON-ish text dump).

Information

OptionTypeDescription
--help, -hflag Show help and exit.
--versionflag 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)
ModeLendable ComputationUse 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

FileContent
<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:

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.