PrimeTime Guide · Chapter 16

ECO Flow: Fixing Late Violations and Handing the Changes to Layout

By the end of this chapter you will be able to set up and run ECO fixing for DRC, timing and power. You will choose a fixing order and a physical mode, and read the unfixable-reason reports. You will also write change lists, close the loop through layout and extraction, and edit a netlist by hand.

107 min read · Free, no login ·

Why this chapter matters in a real project

Late in a project, the layout is placed and routed, and it has real clock trees. Signoff timing, the final check before the design is released, then shows a few hundred violations. Redoing synthesis and place-and-route is far too slow. Instead, the team makes small, local changes: a bigger cell here, a buffer there. Such a late, small change is an engineering change order, or ECO.

PrimeTime is where the violations are found, so it is also a good place to decide the fixes. The tool can size cells, insert buffers and remove buffers. It then writes the changes as a script that the layout tool runs. After layout, the parasitics are extracted again and timing is checked again. This loop repeats until the design is clean.

Getting the loop wrong is expensive. A fix that ignores free space in the layout may not be placeable, so the violation comes back. A setup fix may create hold violations. Fixing in the wrong order can undo earlier work. Each extra loop through layout and extraction can cost a day or more near tapeout. Tapeout is the hand-off of the final layout for manufacturing.

Prerequisites

  • Working With Design Data: reading, linking, sessions, attributes and write_script.
  • Constraining the Design: design rule constraints such as maximum transition, capacitance and fanout.
  • Clocks and Timing Paths and Exceptions: setup, hold, launch and capture clock paths.
  • Back-Annotation: reading detailed parasitics.
  • Signal Integrity Analysis: aggressors, victims, crosstalk delta delay and noise.
  • Multivoltage Design Flow: level shifters, isolation cells and voltage areas.
  • Reporting and Debugging Analysis Results: reading report_timing and report_constraint.
  • You do not need to know how to drive a layout tool. The layout commands shown here are only what PrimeTime hands over.

In this chapter, times are in nanoseconds (ns) unless said otherwise. A few examples use picoseconds (ps), and they say so.

Learning objectives

  1. Explain what an ECO is and name the three automatic fixing commands.
  2. Set up the tool for ECO with the right variables and set_eco_options.
  3. Restrict fixing with dont_use, library subsets, dont_touch and size_only.
  4. Run fix_eco_drc, fix_eco_timing and fix_eco_power, and choose a sensible order.
  5. Prepare physical data and choose between open_site, occupied_site and freeze_silicon.
  6. Describe the main fixing methods, including clock network fixing and load cells.
  7. Read unfixable-violation and unusable-cell reasons and act on them.
  8. Write change lists in the right format and replay them.
  9. Describe the incremental, reduced-resource and freeze silicon flows.
  10. Edit a netlist by hand, estimate the effect first and verify it afterwards.

Figure 1 is a map of the whole chapter. Come back to it whenever you lose your place.

ECO flow on one page
Find, fix, write, implement, check again
ECO flow on one page
Figure 1 The chapter as a map: the problem, the setup, the three fixing commands and the hand-off loop through layout and extraction. Come back to this figure as you read.What to notice: Panel 3 has a fixed order. DRC first, then setup, then hold, with power recovery at both ends.

1  The beginner's mental model

Think of a house that is built and painted. An inspector walks through and finds problems: a weak beam, a door that sticks. Nobody rebuilds the house. Instead, the inspector writes a change order: "replace beam 4 with a thicker one". The builder carries out the order, and the inspector checks again.

A good inspector also knows the floor plan. They only ask for a new cupboard where there is free wall space. Figure 2 maps this picture to PrimeTime.

The inspector and the change order
Find a problem, write an order, let the builder do it, check again
The inspector and the change order
Figure 2 The inspector is PrimeTime, the change order is the change list, and the builder is the layout tool. Re-inspection is extraction plus a new timing run.What to notice: The floor plan card. Knowing the free space is what makes an order buildable.
Where the analogy breaks — read this twice
  • In a house, fixing one door rarely breaks another. In a chip, one fix often hurts a nearby path. For example, a buffer that fixes hold can create a setup violation.
  • The inspector here does the fix in a model first. PrimeTime changes its own netlist copy and re-times it before writing the order.
  • A house inspector writes one kind of order. PrimeTime can write the same changes in several script formats, for different tools.

Now the engineering model

In engineering terms, the loop has six steps:

  1. Analyze. Run static timing and signal integrity analysis on the routed design.
  2. Set up. Save pin slack data, update timing and set the ECO options.
  3. Fix. Run fix_eco_drc, fix_eco_timing and fix_eco_power. Each changes the tool's netlist copy.
  4. Write. Run write_changes to write a change list. This is a script that describes every change.
  5. Implement. The layout tool runs the change list, places the new cells and repairs the routes.
  6. Check again. Extract parasitics again and rerun timing in PrimeTime.
TakeawayPrimeTime finds the violations, fixes them in its own copy and writes a change list. The layout tool builds the changes, and PrimeTime checks the result.

2  ECO fixing overview

2.1  What an ECO does

In PrimeTime, an ECO is an incremental change to a chip design. Its purpose is one of three:

  • fix timing violations;
  • fix design rule constraint (DRC) violations, such as maximum transition;
  • reduce power.

The tool makes three kinds of change: it sizes cells, replaces cells and inserts buffers. For example, it may replace a weak BUFX1 with a stronger BUFX4. It then writes the changes in script form, so another tool can implement them.

The three fixing commands are:

Table 1 The three ECO fixing commands
Command What it fixes
fix_eco_drc DRC, noise, crosstalk delta delay and cell electromigration violations
fix_eco_timing Setup or hold timing violations
fix_eco_power Recovers power and area where slack allows

After fixing, write_changes writes the change list. You run it in the physical implementation tool, such as IC Compiler II. Then you extract parasitics again with an extraction tool such as StarRC. Finally, you rerun timing in PrimeTime. Figure 3 shows the loop.

The ECO loop
Logic-only or physically aware, the same loop closes through layout
The ECO loop
Figure 3 PrimeTime fixes and writes a change list. The layout tool implements it, StarRC extracts it, and PrimeTime checks again.What to notice: The dashed physical data arrow. Only the physically aware mode reads it, and only then does the change list carry locations.

2.2  Logic-only and physically aware modes

You can run ECO fixing with or without physical placement data:

  • Logic-only mode. The tool uses only the netlist and detailed parasitic data. It does not know where cells sit or where free space is.
  • Physically aware mode. The tool also reads physical placement data. It replaces cells and inserts buffers only where there is room. The change list then gives the location of each change, so layout is fast and accurate.

It is better to use the physically aware mode, because it gives the best quality of results (QoR). A logic-only fix can ask for a buffer in a spot that is already full. The layout tool must then move it, which changes the parasitics you timed.

2.3  Where ECO fits and what it needs first

ECO fixing works with single-core analysis, multicore analysis and distributed multi-scenario analysis (DMSA). In DMSA, one manager process controls several worker processes, and the workers time the scenarios. A scenario is one combination of mode and corner, such as "functional mode at the slow corner".

Two optional flows reduce memory, runtime and turnaround time:

  • Reduced-resource ECO flow. Timing analysis runs on the whole design, but fixing runs on a smaller "reduced" design. That design holds only the data related to the violations.
  • Incremental ECO flow. The layout tool, StarRC and PrimeTime write and analyze only the changed part of the design at each step.

Both flows have their own sections later in this chapter.

Common beginner mistake

A beginner runs ECO fixing on a design that is placed but not routed, or has ideal clocks. The fixes are then aimed at the wrong numbers. Run ECO only on a fully placed and routed design with real clock trees.

TakeawayAn ECO is a small, late change. PrimeTime offers three fixing commands and two modes, and the physically aware mode gives the best results.

3  Setting up before any fixing

3.1  The five setup steps

Before you run any fixing command, follow these steps:

  1. Import the design: read the Verilog netlist, the Synopsys Design Constraints (SDC) and the parasitic data.
  2. Set the timing_save_pin_arrival_and_slack variable to true. The fixing commands need the arrival and slack at every pin.
  3. Run a full timing update, with update_timing or report_timing.
  4. Set the ECO variables that suit your design.
  5. Run set_eco_options with the options your design needs.

The commonly used ECO variables are:

Table 2 Commonly used ECO variables
Condition Relevant variables
Physically aware ECO eco_allow_filler_cells_as_open_sites, eco_insert_buffer_search_distance_in_site_rows
Design contains multiply instantiated modules (MIMs) eco_enable_mim
Multi-scenario ECO with more scenarios than hosts eco_enable_more_scenarios_than_hosts

To list every ECO variable with its current and default value, use a wildcard:

Listing all ECO variables
pt_shell> report_app_var eco*   ;# every ECO variable, current and default values

Steps 2 and 3 look like this in a script:

Steps 2 and 3 — save pin data, then update timing
pt_shell> set_app_var timing_save_pin_arrival_and_slack true   ;# keep pin slacks
pt_shell> update_timing                                        ;# full timing update

3.2  The set_eco_options command

The set_eco_options command holds the ECO settings that are not simple variables. The options group like this:

Table 3 Commonly used set_eco_options options
To specify this Use these options
Data for physically aware ECO -⁠physical_tech_lib_path, -⁠physical_lib_path, -⁠physical_design_path, -⁠physical_icc2_lib, -⁠physical_icc2_blocks, -⁠physical_constraint_file, -⁠physical_lib_constraint_file
Handling of physical data -⁠physical_enable_clock_data, -⁠physical_enable_all_vias, -⁠keep_site_names, -⁠power_ground_net_layer, -⁠enable_pin_color_alignment_check, -⁠allow_missing_lef, -⁠convert_sites, -⁠enable_via0_alignment_check
MIM groups -⁠mim_group
Filler cells -⁠filler_cell_names
Spare cells (freeze silicon flow) -⁠programmable_spare_cell_names
Extra setup or hold timing margin -⁠drc_setup_margin, -⁠drc_hold_margin, -⁠timing_setup_margin, -⁠timing_hold_margin, -⁠power_setup_margin, -⁠power_hold_margin
Output log file -⁠log_file

Two companion commands help:

Checking and clearing the ECO options
pt_shell> report_eco_options   ;# show the ECO options now in force
pt_shell> reset_eco_options    ;# clear all ECO options

3.3  Several libraries with the same name

Sometimes two library files contain a logical library with the same name. For example, two corners may both use a library called core. The change list must then say which one a cell came from.

Two variables control how library cell names are written in the change list:

  • eco_write_changes_prepend_libname_to_libcell adds the library name in front of the cell name.
  • eco_write_changes_prepend_libfile_to_libcell adds the library file name in front of the cell name.

Both are false by default. They affect every change list format.

TakeawaySave pin arrival and slack, update timing, then set variables and set_eco_options. Check the result with report_eco_options.

4  Controlling what the fixing commands may touch

4.1  Excluding library cells everywhere with set_dont_use

Some library cells should never appear in a fix. For example, a cell may have a known layout problem. The set_dont_use command sets the dont_use attribute on library cells, so ECO does not use them.

set_dont_use syntax
set_dont_use lib_cells [true | false]

4.2  Excluding library cells in one part of the design

Sometimes a cell is fine in one block and banned in another. The set_target_library_subset command sets a dont_use list for chosen hierarchical cells or for the top level.

set_target_library_subset syntax
set_target_library_subset
   -⁠objects objects | -⁠top
   -⁠dont_use lib_cells

These commands look like the same-named synthesis commands. Here, however, a subset specification supports only the -⁠dont_use option.

The rules are:

  • A specification can sit on hierarchical cells, on the top-level design, or on both.
  • Specifications propagate downward on their own.
  • A specification applied lower down completely overrides any specification from above.
  • An empty list, -⁠dont_use {}, blocks the restrictions from above.

Let us consider an example. HVT cells are slow, high-threshold-voltage cells. We want to ban them everywhere, except inside block SLOWBLK, where we ban LVT cells instead.

Different dont_use lists in different blocks
pt_shell> set_target_library_subset -top -dont_use */*HVT*   ;# no HVT cells anywhere
pt_shell> set_target_library_subset -objects {SLOWBLK} \
            -dont_use */*LVT*   ;# inside SLOWBLK: no LVT cells instead

Figure 4 shows how these rules flow down the hierarchy.

Who may use which cells
Subset rules flow down; a lower rule replaces the one above
Who may use which cells
Figure 4 The top rule bans HVT cells. SLOWBLK replaces it with an LVT ban, and an empty list lifts all bans in its block.What to notice: SLOWBLK/U7 inherits the LVT ban from its parent, not the HVT ban from the top.

Three more facts:

  • Subset specifications restrict only the fix_eco_* commands.
  • They take precedence over any -⁠buffer_list you give a fixing command.
  • They apply only to logic being optimized. Existing logic that is not changed is not affected.

4.3  Preserving parts of the design with dont_touch

Some logic was tuned by hand earlier, and you want to keep it. The ECO fixing commands make no change on any object whose dont_touch attribute is true. Three commands set such protection:

Table 4 Commands that protect logic from ECO changes
Command Effect
set_dont_touch Sets dont_touch on cells, nets, designs or library cells, so they cannot change
set_size_only Sets size_only on cells, so they can be sized but not deleted
set_dont_touch_network Sets dont_touch on the transitive fanout of pins, ports or clocks. It covers all nets and combinational cells, but stops at cells with setup or hold checks, such as registers and latches

The transitive fanout is everything a point drives, gate after gate.

To see these attributes in timing reports, set timing_report_include_eco_attributes. The report then gains an Attributes column.

Illustrative output — report_timing with ECO attributes
pt_shell> set_app_var timing_report_include_eco_attributes true
true
pt_shell> report_timing ...
Attributes:
     d - dont_touch
     u - dont_use
     i - ideal_net
  Point                               Incr    Path    Attributes
  ----------------------------------------------------------------
  clock CLK (rise edge)               0.00    0.00
  clock network delay (propagated)    0.30    0.30
  FF1/CK (DFFX1)                      0.00    0.30 r
  FF1/Q (DFFX1)                       0.21    0.51 f   i
  U1/Y (NAND2X1)                      0.08    0.59 r     d u
  data arrival time                           0.59

4.4  Resizing power management cells

By default, fix_eco_timing, fix_eco_power and fix_eco_drc do not resize power management cells. These are level shifters, isolation cells, retention registers and always-on cells. They come from the multivoltage setup.

To allow resizing of some types, set eco_allow_sizing_with_lib_cell_attributes to a list of these strings:

  • is_level_shifter — level shifters may be resized.
  • is_isolation — isolation cells may be resized.
  • is_retention — retention registers may be resized.
  • always_on — always-on cells may be resized.

A library cell is then considered when its attribute of that name is true.

Allowing level shifters to be resized
pt_shell> set_app_var eco_allow_sizing_with_lib_cell_attributes \
            "is_level_shifter"   ;# level shifters may now be sized
In practice

Teams usually keep one restriction file per project. It holds the set_dont_use, set_target_library_subset and set_dont_touch lines. Every ECO run sources it first, so no run uses a banned cell by accident.

Takeawaydont_use and library subsets limit which cells the fixer may pick. dont_touch and size_only limit which instances it may change.

5  Fixing DRC, noise and crosstalk with fix_eco_drc

5.1  What fix_eco_drc fixes

The fix_eco_drc command fixes the violations that these report commands show:

Violations that fix_eco_drc targets
report_constraint -⁠max_capacitance ...
report_constraint -⁠max_transition ...
report_constraint -⁠max_fanout ...
report_noise ...
report_si_bottleneck ...
report_cell_em_violation ...

It sizes cells and inserts buffers or inverter pairs (two inverters in a row, which act like a buffer). It tries to keep the area increase small. By default, it does not consider timing.

The command has options to set:

  • the type of violation to fix and the target slack;
  • the scope: a list of pins or ports, or the whole design;
  • the fixing methods: cell sizing, buffer insertion or inverter pair insertion;
  • the library cells to use for buffers or inverter pairs;
  • whether to change cells in data paths or in clock networks;
  • whether to respect timing during fixing, and if so, the setup and hold margins;
  • the physical mode: none, open site, occupied site or freeze silicon.

5.2  Two simple examples

Fixing maximum transition by sizing only
pt_shell> fix_eco_drc -type max_transition -methods {size_cell}   ;# size cells only
Fixing noise by sizing and buffering, only where there is room
pt_shell> fix_eco_drc -type noise \
            -methods {size_cell insert_buffer} \
            -buffer_list {BUFX1 BUFX2 BUFX3} \
            -physical_mode open_site   ;# change only where space exists

The second command gives the buffers it may use. It also picks the open site mode, which makes changes only where there is already room.

The command runs many fixing passes. It stops when all violations are fixed, or when more fixing is not worth the runtime. At the end, it shows the remaining violations and the number it could not fix. Add -⁠verbose to get the reasons for the unfixable ones.

5.3  Crosstalk delta delay fixing

Crosstalk delta delay is the extra delay, or speed-up, on a victim net caused by a switching neighbor, the aggressor. The fix_eco_drc -⁠type delta_delay command sizes cells and inserts buffers on victim nets to reduce it.

No constraint limits delta delay, so there is no "delta delay slack". Thus, you must give a threshold:

  • Give -⁠delta_delay_threshold as a positive value greater than zero.
  • The same threshold applies to slowdown and speedup delta delays.
  • By default, only nets on paths with negative slack are targeted.
Reducing delta delays above 0.05 on failing paths
pt_shell> fix_eco_drc -type delta_delay -verbose \
            -delta_delay_threshold 0.05 \
            -methods {size_cell insert_buffer} \
            -buffer_list {BUFX1 BUFX2 BUFX3} \
            -physical_mode open_site   ;# victim nets with cost over 0.05

This command targets victim nets with a delta delay cost above 0.05 time units. Each such net must also lie on a path with negative slack. It needs a PrimeTime-ADV-PLUS license.

To change which paths count, use -⁠slack_lesser_than. The command then targets nets on paths with slack below that value.

  • A positive value fixes more nets and leaves a positive timing margin.
  • A negative value fixes fewer nets.
Also fixing nets on paths with slack below 0.05
pt_shell> fix_eco_drc -type delta_delay -verbose \
            -delta_delay_threshold 0.05 -methods {size_cell insert_buffer} \
            -buffer_list {BUFX1 BUFX2 BUFX3} -physical_mode open_site \
            -slack_lesser_than 0.05   ;# include paths with slack under 0.05

5.4  Previewing the targets with report_si_bottleneck

The delta delay fixer picks nets by signal integrity (SI) bottleneck analysis. This analysis ranks nets by their crosstalk cost. To preview the nets it will target, run report_si_bottleneck first.

Illustrative output — report_si_bottleneck
pt_shell> report_si_bottleneck -cost_type delta_delay \
            -min -max -slack_lesser_than 0.0 -all_nets
...
Bottleneck Cost: delta_delay
net               scenario             cost
----------------------------------------------
DX23[17]          scen1                0.4597
REG_ADDR[2]       scen2                0.3671
REG_DATA[5]       scen1                0.2921
RE_RDY            scen1                0.0934

How to read it:

  • The highest-cost nets come first, with max and min analysis taken together.
  • The cost is the absolute value of the delta delay. A negative delta delay is shown as positive.
  • In a DMSA run, the report merges all scenarios.

Figure 5 shows which of these nets the fixer would target with a threshold of 0.05.

Which victim nets get fixed
Cost above the threshold and on a failing path
Which victim nets get fixed
Figure 5 The four nets from the report plus one more net, n17, drawn against a 0.05 threshold. The path slacks and n17 are illustrative.What to notice: REG_DATA[5] is over the threshold but its path passes, so the default run leaves it alone.

Use report_si_bottleneck before and after fixing, just as you use report_constraint for DRC and report_timing for timing.

5.5  Cell electromigration fixing

Cell electromigration (EM) happens inside a logic gate. Very high current density slowly moves metal atoms. Over time, this can cause a short or an open in the metal. The PrimePower tool finds high-risk cells from library data, design data, switching activity and, if available, physical data. It reports them as EM DRC violations.

fix_eco_drc can target these violations with the cell_em type. It can use sizing and buffering. The feature needs a PrimePower license and a PrimeTime-ADV-PLUS license.

Fixing cell EM violations
set_app_var power_enable_analysis true      ;# turn on power analysis
set_app_var power_enable_em_analysis true   ;# turn on cell EM analysis
update_power                                ;# run the power and EM analysis
report_cell_em_violation                    ;# list the cell EM violations
fix_eco_drc -type cell_em -methods {size_cell insert_buffer}   ;# fix them

The cell_em type runs only one fixing pass. To fix more violations, run update_power again, then run fix_eco_drc -⁠type cell_em again.

Takeawayfix_eco_drc fixes design rules, noise, delta delay and cell EM. Delta delay needs a threshold, and report_si_bottleneck previews the targets.

6  Fixing setup and hold with fix_eco_timing

6.1  What fix_eco_timing does

The fix_eco_timing command reduces setup or hold violations. It sizes cells and inserts buffers or inverter pairs. It tries to keep the area and power increase small.

The command has options to set:

  • the type: setup or hold;
  • the scope: from or to start and end points, path groups, a path collection, or the whole design;
  • the methods: cell sizing, buffer insertion or inverter pair insertion;
  • the library cells for buffers or inverter pairs;
  • whether to change cells in data paths or clock networks;
  • the target slack margin;
  • the analysis mode: graph-based, path-based, or exhaustive path-based;
  • the physical mode: none, open site, occupied site or freeze silicon;
  • whether to minimize power while fixing timing.

Path-based analysis (PBA) re-times each path on its own, so it is less pessimistic than graph-based analysis. The exhaustive mode searches paths more thoroughly, for the least pessimism.

Fixing setup everywhere
pt_shell> fix_eco_timing -type setup   ;# fix all setup violations
Fixing hold with exhaustive path-based analysis
pt_shell> fix_eco_timing -type hold -pba_mode exhaustive \
            -buffer_list {BUFX2 DLY1X2 DLY2X2}   ;# delay cells allowed

6.2  Setup and hold are fixed differently

You must give -⁠type setup or -⁠type hold every time, because the two problems are opposite. Figure 6 shows the difference on a small path.

Setup and hold need opposite fixes
Setup wants less delay; hold wants more
Setup and hold need opposite fixes
Figure 6 By default, setup fixing sizes cells to cut data path delay. Hold fixing sizes cells and inserts buffers to add delay. The numbers are illustrative.What to notice: The setup fix makes U1 larger. The hold fix adds a delay cell and leaves U1 alone.

The defaults are:

  • Setup fixing uses cell sizing alone, to reduce data path delay.
  • Hold fixing uses cell sizing and buffer insertion, to increase data path delay.
  • Both fix only data paths, not clock networks.

The command starts with the worst violations. It repeats passes until all are fixed, or more fixing is not worth the runtime.

Each fixer also protects other checks:

  • Setup fixing tries not to create DRC violations. It may create hold violations, because setup is harder to fix.
  • Hold fixing tries not to create setup or DRC violations.

At the end, the command shows the remaining violations and the number it could not fix. Use -⁠verbose or -⁠estimate_unfixable_reasons to see why.

Common beginner mistake

A beginner fixes hold first, then setup, and is surprised by new hold violations. Setup fixing is allowed to create them. Fix setup first, then hold.

Takeawayfix_eco_timing needs a type every time. Setup fixing speeds paths up, hold fixing slows them down, and only hold fixing promises to protect the other check.

7  Recovering power and area with fix_eco_power

7.1  What fix_eco_power does

When a path has spare slack, its cells may be larger or faster than needed. The fix_eco_power command recovers power and area there:

  • it downsizes cells in paths with positive setup slack;
  • it removes buffers from paths with positive hold slack.

It never creates or worsens timing or DRC violations. By default, it downsizes cells in all paths with positive setup slack, to reduce area.

You can pick one of these recovery methods per run:

Table 5 Power recovery methods
Method Option
Replace cells to minimize area the default
Replace cells to minimize a numeric library cell attribute -⁠power_attribute
Replace cells by a priority list of name or attribute strings -⁠pattern_priority
Replace cells to minimize switching, leakage or total power from PrimePower data -⁠power_mode
Remove buffers from paths with positive hold slack -⁠methods {remove_buffer}

For several methods, run the command several times with different options.

Power recovery examples
pt_shell> fix_eco_power   ;# downsize sequential and combinational cells
pt_shell> fix_eco_power -pattern_priority {HVT MVT LVT}   ;# lower leakage by name
pt_shell> fix_eco_power -pba_mode path   ;# downsize, check timing with PBA
pt_shell> fix_eco_power -pattern_priority {HVT LVT} \
            -pba_mode exhaustive   ;# LVT to HVT swaps, exhaustive PBA
pt_shell> fix_eco_power -methods {remove_buffer}   ;# drop buffers, spare hold slack

Here HVT, MVT and LVT are name prefixes for threshold voltage flavors, from high to low. A high-threshold cell leaks less but is slower.

7.2  How power recovery works

Power recovery is iterative:

  1. The command makes the targeted changes.
  2. It checks for new or worse timing and DRC violations.
  3. It backs out changes, a few at a time, until the constraints are met again.
  4. It also explores further changes for more recovery.
  5. It repeats until more progress costs more than it gains.

For every cell replacement method, a swap happens only when all of these hold:

  • The swap does not create or worsen any timing or DRC violation.
  • The new cell has the same logic function. It also meets any limits set by eco_alternative_cell_attribute_restrictions and eco_alternative_cell_instance_based_restrictions.
  • The new cell is better in the chosen way. It has less area, a smaller power attribute, a higher-priority string, or less power by PrimePower data.

7.3  A step-by-step power recovery procedure

  1. (Optional) Guide the recovery. Limit the alternative cells by attribute value with the two restriction variables above. To skip unconstrained cells, set eco_power_exclude_unconstrained_cells to true.
  2. (Optional) List the alternative cells with report_eco_library_cells.
  3. (Optional) Report the cells used in the design with report_cell_usage.
  4. Run fix_eco_power with the options you chose.
  5. Report the result with the PrimePower report_power command. Compare it with a report taken before recovery.
Illustrative output — report_eco_library_cells
pt_shell> report_eco_library_cells
...
Alternative library cells:
    Attributes:
        u - dont_use or pt_dont_use
        d - dont_touch
Group Library_cell                  Area Attributes
----------------------------------------------------
[ 0] core_typical/hvt_buf_1         4.50
      core_typical/hvt_buf_2        5.40
      core_typical/hvt_dly2         8.10 u
[ 1] core_typical/hvt_inv_1         3.60
      core_typical/hvt_inv_2        4.50

Each group holds cells that can replace each other. A u marks a cell that ECO may not use.

Illustrative output — report_cell_usage
pt_shell> report_cell_usage
...
Cell Group        Count            Area
-------------------------------------------------
Combinational     3977 ( 85%)     5496.50 ( 22%)
Sequential         668 ( 14%)     9514.75 ( 38%)
Clock               43 (  1%)     2975.50 ( 12%)
Others               1 (  0%)     6873.25 ( 28%)
-------------------------------------------------
Total             4689 (100%)    24860.00 (100%)
Measuring power before and after
pt_shell> set_app_var power_enable_analysis true   ;# turn on power analysis
pt_shell> report_power -groups {register combinational sequential}   ;# before
pt_shell> fix_eco_power   ;# recover power and area
pt_shell> report_power -groups {register combinational sequential}   ;# after

7.4  Recovery by library cell names

Many libraries name cells with a variable part and a fixed part. For example, HVT_BUF1X, NVT_BUF1X and LVT_BUF1X share the fixed string _BUF1X. The variable prefix gives the threshold voltage: high, normal or low.

To swap by these names, list the prefixes in -⁠pattern_priority, lowest-power first. Figure 7 shows the idea.

Swapping by name prefix
pt_shell> fix_eco_power -pattern_priority {HVT NVT LVT}   ;# HVT is most preferred
Swapping by name priority
A variable prefix, a fixed suffix, and an order from lowest power
Swapping by name priority
Figure 7 Cells that differ only in their prefix can replace each other. The tool moves a cell toward the front of the list when slack allows. The slack values are illustrative.What to notice: U9 has 0.40 ns of spare slack, so it moves to HVT. U4 has only 0.02 ns, so it stays LVT.

7.5  Recovery by a string attribute

Sometimes the names follow no pattern. You can then define your own string attribute on library cells, and rank its values.

Ranking cells with a user-defined string attribute
define_user_attribute vt_swap_priority -type string -class lib_cell   ;# new attribute
set_user_attribute -class lib_cell lib/INV1XH vt_swap_priority INV1X_best ;# lowest
set_user_attribute -class lib_cell lib/INV1XN vt_swap_priority INV1X_ok    ;# middle
set_user_attribute -class lib_cell lib/INV1X vt_swap_priority INV1X_worst ;# highest
fix_eco_power -pattern_priority {best ok worst} \
  -attribute vt_swap_priority   ;# rank by the attribute value

The patterns match the same way as the name prefixes above. Each value has a fixed part and a variable part. Here INV1X_ is the fixed part, and best, ok or worst is the variable part. You list only the variable parts. Cells whose values share the fixed part, such as INV1X_best and INV1X_worst, can replace each other, and the list order ranks them.

Again, list the strings in priority order, lowest-power cells first.

7.6  Leakage-aware setup fixing with a numeric attribute

Upsizing cells to fix setup can raise leakage power. By default, fix_eco_timing keeps the area increase small, but it ignores leakage. If leakage matters more than area, give fix_eco_timing a numeric attribute with -⁠power_attribute.

Setup fixing that prefers low-leakage cells
define_user_attribute leak_attr -type float -class lib_cell   ;# leakage per lib cell
set_user_attribute -class lib_cell \
  [get_lib_cells LIB_H/INV1X_HVT] leak_attr 1.0    ;# worst-corner leakage values
set_user_attribute -class lib_cell \
  [get_lib_cells LIB_H/INV2X_HVT] leak_attr 2.0   ;# 2.0 for the larger HVT inverter
set_user_attribute -class lib_cell \
  [get_lib_cells LIB_L/INV1X_LVT] leak_attr 10.0   ;# LVT cells leak much more
set_user_attribute -class lib_cell \
  [get_lib_cells LIB_L/INV2X_LVT] leak_attr 15.0   ;# 15.0 for the larger LVT inverter
fix_eco_timing -type setup -power_attribute leak_attr   ;# fix setup, minimize leakage

The command then picks library cells with the least leakage. It only replaces instances whose cell has leak_attr, and only with cells that also have it. Cells without the attribute are ignored.

You can also import these values from the library data instead of typing them. In DMSA, matching cells in different libraries must have matching leakage values.

7.7  Recovery from PrimePower data

PrimePower analysis uses real switching activity and library power data. It runs when you use update_power or report_power. To use its numbers in recovery, set -⁠power_mode:

  • dynamic — minimize switching power;
  • leakage — minimize leakage power;
  • total — minimize dynamic plus leakage power.

With total, the tool picks the action that cuts total power most, case by case:

  • High switching activity favors downsizing, which cuts switching power.
  • Low switching activity favors a higher threshold voltage, which cuts leakage.
  • Where slack is plentiful, it can do both.

-⁠power_mode cannot be used with -⁠power_attribute or -⁠pattern_priority.

In DMSA, two more options choose where the power data comes from:

  • -⁠dynamic_scenario names the one scenario for dynamic power data.
  • -⁠leakage_scenario names the one scenario for leakage power data.

These options are used only in DMSA. Usually, give the scenario with the worst dynamic power and the one with the worst leakage. They can be the same scenario. Timing and DRC are still checked in all scenarios.

Single-scenario total power recovery
restore_session Session1                 ;# restore the analysis session
set_app_var power_enable_analysis true   ;# enable PrimePower analysis
set_app_var power_clock_network_include_register_clock_pin_power false ;# see below
read_saif activity_file.saif             ;# read switching activity (or read_vcd)
update_power                             ;# run the power analysis
report_power                             ;# power before recovery
fix_eco_power -power_mode total          ;# dynamic and leakage recovery
report_power                             ;# power after recovery

When power_clock_network_include_register_clock_pin_power is false, the internal power at a register's clock pin counts as part of the register. It is no longer counted in the clock network. Thus, the recovery shows up in the data path. Recovery may then swap registers to cut clock pin power, but it never changes the clock network.

Multi-scenario total power recovery (DMSA manager)
current_session {S1 S2 S3 S4 S5 S6}   ;# timing and DRC from all six scenarios
current_scenario {S1 S3}              ;# power data needed only in S1 and S3
remote_execute {   ;# run in each worker of S1 and S3
  set_app_var power_enable_analysis true   ;# enable PrimePower analysis
  set_app_var power_clock_network_include_register_clock_pin_power false ;# see below
  read_saif activity_file.saif   ;# read switching activity
  update_power   ;# run the power analysis
}                                     ;# power analysis in S1 and S3
current_scenario -all                 ;# back to all scenarios
fix_eco_power -power_mode total \
  -leakage_scenario S1 \
  -dynamic_scenario S3                ;# S1 most leakage, S3 most dynamic

remote_execute runs the commands inside the braces in each worker of the current scenarios.

7.8  Keeping I/O paths out of recovery

Sometimes I/O timing is owned by someone else, and you want it left alone. fix_eco_power can recover power only on internal, register-to-register paths. Two settings are needed:

  • -⁠start_end_type reg_to_reg. This is the only valid value for this command.
  • -⁠pba_mode path or -⁠pba_mode exhaustive. This is required.
Recovering only on register-to-register logic
pt_shell> fix_eco_power \
            -start_end_type reg_to_reg \
            -pba_mode exhaustive   ;# leave I/O paths untouched

The same -⁠start_end_type option exists on report_timing and get_timing_paths, with more values.

A cell counts as internal only if no path, constrained or unconstrained, connects it to an I/O port. Case analysis and disabled timing arcs are taken into account. In DMSA, a cell is excluded if it reaches an I/O port in any scenario. Excluded cells are left untouched, even with slack below the margin. They are reported with reason code V.

Takeawayfix_eco_power only spends spare slack, never more. Choose one method per run, and give name or attribute priorities lowest-power first.

8  Faster power recovery with machine learning

8.1  The idea

Power recovery can be slow, especially with PBA. The tool must study timing, topology and power in detail to pick each swap. Machine learning can reuse earlier decisions instead.

It works like this:

  1. When fix_eco_power finishes, it saves its decisions in a training data file. These include swaps made, swaps refused, and the timing and topology around each.
  2. Next time, the command reads the earlier training data and trains a model.
  3. Where a cell or small circuit matches earlier conditions, it repeats the earlier decision. It skips the slow detailed analysis there.

This feature needs a PrimeTime-ADV-PLUS license.

8.2  Turning it on

Set training_data_directory to a directory name. Nothing else is needed.

Enabling machine learning for power recovery
pt_shell> set_app_var training_data_directory ./train_dir   ;# read and write data here
pt_shell> fix_eco_power -power_mode total   ;# uses and adds training data

The first run has no data, so it takes the usual time and reports a training coverage of 0.0%. At the end, it writes a file such as train_dir/tr1.td. Later runs read every file in the directory and add a new one.

Illustrative output — a later run with training data
Information: Machine learning enabled ...
Information: Reading training data train_dir/tr1.td
Machine Learning Summary:
-------------------------------------------------------
Total number of cells                          10272492
Cells eligible for power recovery               4788129
Trained cells                                   4069910
Adjusted cells                                     2109
Untrained cells                                  718219
Training coverage                                 85.0%
Training adjustment                                0.0%
Retraining scope                                  15.0%
Information: Writing training data train_dir/tr2.td

The three ratios in the summary are:

  • Training coverage = trained cells / cells eligible for power recovery.
  • Training adjustment = adjusted cells / cells eligible for power recovery.
  • Retraining scope = untrained cells / cells eligible for power recovery.

Figure 8 draws the same numbers.

What training coverage means
85% of eligible cells reuse a learned decision
What training coverage means
Figure 8 The eligible cells from the summary split into trained and untrained parts. Only the untrained part gets the slow detailed analysis.What to notice: The short gray bar. Those 15% are analyzed in full, exactly as without machine learning.

8.3  How much it helps

The runtime gain depends on how similar the new design is to the training designs. A large benefit is likely with:

  • the same or a similar design type;
  • the same or similar clock characteristics;
  • the same or similar layout and parasitic data.

Little or no benefit is likely with:

  • a different design type, such as CPU versus modem, or latches versus flip-flops;
  • different clock characteristics, such as period or uncertainty;
  • different operating conditions, such as voltage or temperature;
  • a different technology or process node.

For example, a second run on the same design and timing gives 100% coverage and can be about five times faster. A very different design or clock period can give 0% coverage and no gain. The best gain comes from coverage of 90% to 100%. Below 50%, expect very little.

8.4  The training data files

  • The files are binary. You cannot read or edit them.
  • You can copy and delete them to shape the training set.
  • Each file is named after its source design and the date and time it was made.
  • To read only some files, use the -⁠training_data option of fix_eco_power.

It is better to let the command read every file, because it then finds the best match. Reading many files costs little runtime or memory.

8.5  When to enable it

Machine learning can only help runtime; it cannot hurt it. If the data does not match, the command ignores it and runs the normal analysis. It still stores what it learns. The overhead of reading and saving is negligible, and QoR is similar with or without it. Thus, it is best to leave it on in every fix_eco_power run, so the data covers many design styles.

8.6  Covering every stage of the design cycle

You can build training data from several design states. For example, save a session after each fixing step. Then run power recovery from each session, in parallel on different hosts.

Building training data from four design states
update_timing                     ;# timing before any fixing
save_session after_update         ;# state 1: before any fixing
fix_eco_drc                       ;# fix DRC
save_session after_drc_fix        ;# state 2: after DRC fixing
fix_eco_timing -type setup        ;# fix setup
save_session after_setup_fix      ;# state 3: after setup fixing
fix_eco_timing -type hold         ;# fix hold
save_session after_hold_fix       ;# state 4: after hold fixing
# Then, on each of four hosts, with one of the four sessions:
set_app_var training_data_directory ./all_training_data   ;# shared directory
restore_session after_update      ;# or one of the other three
fix_eco_power                     ;# writes one training file per run

A new revision of the design is then likely to match one of these states. Thus, coverage is high and power recovery is much faster.

8.7  Learning from your own scripts

You may have your own power optimization script. The tool can learn from it with record_training_data and write_training_data.

Recording training data from a custom script
record_training_data                        ;# start recording
source my_eco_changes.tcl                   ;# your own power optimization script
write_training_data -output my_training.td  ;# save what was learned
Using that data later
fix_eco_power -training_data my_training.td   ;# reuse the recorded decisions

The tool does not judge the quality of your script. It simply treats each change as good and records the conditions around it. Later, where it finds similar conditions, it applies the same change without detailed analysis. Elsewhere, it runs normal recovery.

Mentor's tip

Set training_data_directory in the project's common setup file. Every engineer's runs then add to one shared pool, and coverage grows week by week.

TakeawayMachine learning reuses earlier recovery decisions. It never hurts, so leave it on and keep the training data from every stage.

9  Choosing the order of fixing

9.1  Who can hurt whom

The fixing commands protect different things:

  • Setup or hold fixing does not make DRC (max_capacitance, max_transition) worse.
  • DRC fixing has the highest priority, so it can make setup or hold worse.
  • Hold fixing keeps setup slack. Setup fixing may create some hold violations.

Thus, fix DRC first, then setup, and hold last. Power recovery fits at both ends. Figure 9 shows the recommended order.

The recommended fixing order
Each step protects what the earlier steps achieved
The recommended fixing order
Figure 9 Power recovery first, then DRC and noise, then timing, and a final leakage recovery. The notes under each step show what it respects or may disturb.What to notice: Step 4 changes threshold voltage only. It is the one step that does not change the layout.
Table 6 Recommended order of ECO fixing
Step Command Fixing mechanisms What it respects
1 Power recovery fix_eco_power Cell sizing, buffer removal Creates no new timing or DRC violations
2 Fix DRC and noise fix_eco_drc Buffer insertion, cell sizing Alters setup and hold slack as needed
3 Fix timing fix_eco_timing Buffer insertion, cell sizing Setup honors DRC and may alter hold; hold honors setup and DRC
4 Final leakage recovery fix_eco_power Threshold voltage swapping Creates no new timing or DRC violations; does not change the layout

9.2  When one pass makes too many changes

Many changes in one pass can upset ECO routing and legalization in the layout tool. In that case, run DRC, setup and hold fixing one at a time, each with its own layout pass. Fix the violations that cause the most changes first.

9.3  Letting timing win over DRC

By default, fix_eco_timing does not fix timing on paths that have DRC violations. To put timing first, add -⁠ignore_drc. The command then ignores, and may worsen, max_transition, max_capacitance and max_fanout violations.

Common beginner mistake

A beginner adds -⁠ignore_drc to clear the last few setup paths. A week later, signoff shows new transition violations on the same nets. Use -⁠ignore_drc only when you plan to rerun DRC fixing afterwards.

TakeawayRecover power, fix DRC, fix setup, fix hold, then recover leakage. Each step respects the results of the steps before it.

10  Physically aware ECO

10.1  Why physical data helps

The basic logic-only flow fixes violations without any layout knowledge. The physically aware flow reads the layout and uses it while fixing. This brings several benefits:

  • higher and more predictable fix rates;
  • placement locations written for every changed cell;
  • no large cell moves when a cell is resized;
  • buffers placed with care for free space, placement density and wire delay;
  • on-route buffering, which places a buffer on the existing route of a net;
  • faster convergence, because the layout is disturbed as little as possible.

This flow needs a PrimeTime-ADV license.

10.2  The files you need

In short, you need:

  • Design data files — the netlist, constraints and timing information.
  • Block-level LEF library data — technology and physical cell information. LEF is the Library Exchange Format.
  • DEF files or IC Compiler II database files — the physical layout. DEF is the Design Exchange Format.
  • A physical constraint file — voltage areas and placement blockages in multivoltage designs. This is optional.
  • Advanced spacing labels and rules — this is optional.
  • Parasitic data from StarRC — parasitics with location information.

The design data files in detail are:

Table 7 Design data files for physical ECO
Type of data Description
Verilog netlist Written from IC Compiler II, Fusion Compiler or a third-party layout tool
Script and setup files Files that set up SDC, UPF (Unified Power Format) power intent, DMSA and the analysis
SPEF or GPD parasitics Must have location information. Set NETLIST_NODE_SECTION: YES and REDUCTION: NO_EXTRA_LOOPS in the StarRC command file
StarRC extraction script Must be the same script used for the initial parasitics
Physical design data (NDM or LEF/DEF) The NDM design database from IC Compiler II or Fusion Compiler, or LEF/DEF from a third-party tool. LEF/DEF must match the netlist and parasitics; extract again if needed
Extra physical constraints Voltage area and placement blockage definitions kept outside NDM, if any
Advanced spacing rules Written with export_advanced_technology_rules in IC Compiler II

GPD and SPEF are two formats for parasitic data. NDM is the IC Compiler II design database.

Figure 10 shows these inputs and the tools that make them.

Inputs to a physically aware ECO
Design data, layout data and located parasitics
Inputs to a physically aware ECO
Figure 10 Each input with the tool that usually writes it. The physical constraint file and the spacing rules are optional.What to notice: The parasitics must carry node locations. The tool uses them to judge the effect of placing a new cell on a net.

10.3  A clean, consistent starting layout

The design must be free of legality and routing violations. Otherwise, the layout tool fixes them later and changes the starting point the ECO was based on. In IC Compiler II or Fusion Compiler, check with:

  • check_legality -⁠verbose — all cells should be legal or fixed.
  • check_route — there should be no shorts or opens, or each one should be understood. Any other DRC violations should be understood and have no effect on ECO.

To keep all files consistent, make them in this order:

  1. Open the block NDM in IC Compiler II or Fusion Compiler.
  2. Make sure there are no legality or routing violations.
  3. Write the Verilog netlist. This can rename objects to meet Verilog rules, so it must come first. The NDM and parasitics then include any name changes.
  4. Save the NDM block.
  5. Extract parasitics from the NDM saved in step 4.
Common beginner mistake

A beginner writes the netlist after extraction. Writing the netlist renamed a few escaped names, so the parasitics no longer match the netlist. Always write the netlist first, then save, then extract.

10.4  Block-level LEF data

From IC Compiler II, write LEF for all standard cells and all macros. Only one LEF file needs the technology information.

Writing LEF from the IC Compiler II database
open_lib lib1                              ;# first library
write_lef -include {cell tech} lib1.lef    ;# cells plus technology
close_lib                                  ;# close the first library
open_lib lib2                              ;# other libraries
write_lef -include {cell} lib2.lef         ;# cells only
close_lib                                  ;# close it

If the layout tool is IC Compiler, the design lives in a Milkyway database. The Milkyway Environment tool can write the LEF files from it, in batch mode.

Running the Milkyway Environment tool in batch
$ milkyway -nullDisplay -nogui -tcl -f write_lef.tcl   ;# batch mode, no GUI
write_lef.tcl — one LEF file per reference library
set mw_reference_library "lib1 lib2 lib3"     ;# libraries to write
set out 1                                     ;# file counter
foreach lib $mw_reference_library {           ;# one pass per library
  open_mw_lib -readonly $lib                  ;# open read-only
  write_lef -lib_name $lib l$out.lef          ;# write l1.lef, l2.lef, ...
  close_mw_lib $lib; set out [expr $out +1]   ;# close, next number
}
exit                                          ;# leave the tool

With this loop, every LEF file contains the technology section. Only one needs it. If you write the files one by one, add write_lef -⁠ignore_tech_info after the first file to leave it out.

10.5  DEF files or the IC Compiler II database

A DEF file holds the placement and routing of the design. The physically aware ECO needs hierarchical top-level and block-level DEF files, version 5.7 or higher. It can use IC Compiler II database files instead. The tool uses this data to find free sites and to place buffers near the original routes.

write_def.tcl — writing DEF from IC Compiler
open_mw_lib design.mw                      ;# open the Milkyway library
open_mw_cel post_route_design              ;# open the routed design
current_design design                      ;# set the current design
link                                       ;# link it
write_def -all_vias -output file_com.def   ;# include every via definition

The -⁠all_vias option includes via definitions that may be missing from the technology LEF.

10.6  Converting DEF site names to LEF site names

A site is the smallest placement slot in a row. Sometimes the DEF and LEF use different names for the same site. The -⁠convert_sites option maps one to the other.

Mapping DEF site "unit" to LEF site "CORE2T"
pt_shell> set_eco_options -convert_sites {{unit CORE2T}} ...   ;# DEF name, LEF name

Here rows such as ROW STD_ROW_324 unit ... in the DEF use the LEF site CORE2T.

10.7  Blocks with missing LEF

A DEF component for a hierarchical block may lack a LEF macro model. In that case, the tool takes the size, shape, pin locations and routing obstructions from the DEF.

Some macros may have neither LEF nor DEF data. You can list them with -⁠allow_missing_lef, and ECO proceeds without them.

What follows from such a list:

  • The ignored components are left out of the layout view of the graphical user interface (GUI).
  • Their area is treated as empty. Add placement blockages there, so nothing is placed on top of them.
  • report_eco_options lists the ignored macro models.
  • If a listed macro does have LEF or DEF data, the tool uses the data anyway and issues a warning.

For example, this command ignores macros X2 and Y2:

Ignoring macros X2 and Y2
pt_shell> set_eco_options -physical_tech_lib_path $tech_lef_files \
            -physical_lib_path $lef_files \
            -physical_design_path design.def.gz \
            -allow_missing_lef {X2 Y2}   ;# ECO ignores these macro models

10.8  The physical constraint file

Multivoltage designs have voltage areas: regions that run at one supply. A voltage area can be disjoint, made of separate pieces. It can also be nested inside another. Figure 11 shows both.

The tool aims to fix late violations with few layout changes and no new electrical rule check (ERC) violations. For that, it needs a file that defines voltage areas and blockages with two commands:

  • create_placement_blockage — creates a placement blockage.
  • create_voltage_area — creates a voltage area.
Voltage areas the fixer must respect
Disjoint and nested regions, plus a placement blockage
Voltage areas the fixer must respect
Figure 11 Va is one voltage area in two pieces, Vc sits inside Vb, and default_Va covers the rest. The tool considers these areas when it places ECO cells.What to notice: The two Va pieces are not touching. They still form one voltage area.

In a flat flow with one DEF file, give the file in the global set_eco_options command.

One DEF file, one constraint file
pt_shell> set_eco_options \
            -physical_tech_lib_path ... \
            -physical_lib_path ... \
            -physical_design_path TOP.def \
            -physical_constraint_file TOP_phys_cons.tcl   ;# voltage areas, blockages

With several DEF files, each DEF gets its own constraint file in a separate command.

Several DEF files, one constraint file each
pt_shell> set_eco_options -physical_design_path TOP.def \
            -physical_constraint_file TOP_phys_cons.tcl     ;# for the top
pt_shell> set_eco_options -physical_design_path BLOCK.def \
            -physical_constraint_file BLOCK_phys_cons.tcl   ;# for the block

10.9  Advanced spacing labels and rules

Modern nodes have placement rules between neighboring cells. Respecting them avoids big moves and timing loss during ECO. The tool can consider:

  • rules exported by export_advanced_technology_rules in IC Compiler or IC Compiler II:
    • minimum Vt (threshold voltage) rules;
    • jog (OD) rules;
    • trim poly (TPO) rules;
    • legal index rules;
    • vertical abutment rules;
    • advanced pairwise ECO physical-only cell spacing rules;
  • your own pairwise spacing labels and rules between library cells.
Defining your own spacing labels and rules
set_lib_cell_spacing_label
  -⁠name label_name
  [-left_lib_cells {lib_cell_list}]
  [-right_lib_cells {lib_cell_list}]
set_spacing_label_rule
  -⁠labels {label_name_list}
  { minimum maximum }

10.10  Parasitics from StarRC

In StarRC, extract parasitics and write them in GPD or SPEF format. With several scenarios, you may need several extractions.

The physically aware flow uses the parasitic node locations. They show exactly where a new cell would sit on a net. For an accurate result, the parasitic file must have no loops. Set these lines in the StarRC command file:

StarRC settings for physically aware ECO
REDUCTION: NO_EXTRA_LOOPS
NETLIST_NODE_SECTION: YES
TakeawayA physical ECO needs a legal, routed layout and consistent files. Write the netlist first, then save, then extract with node locations and no loops.

10.11  Running a physically aware ECO, step by step

Step 1. Enable reading of parasitics with location data.

Step 1 — read locations with the parasitics
pt_shell> set_app_var read_parasitics_load_locations true   ;# keep node locations

Step 2. Set the physically aware options you need:

Step 2 — physical ECO settings
pt_shell> set_app_var eco_allow_filler_cells_as_open_sites true   ;# fillers are free
pt_shell> set_app_var eco_insert_buffer_search_distance_in_site_rows 8 ;# search rows
pt_shell> set_eco_options -power_ground_net_layer M1   ;# PG straps on M1
  • eco_allow_filler_cells_as_open_sites treats filler cells as free sites. A filler cell only fills gaps in a row.
  • eco_insert_buffer_search_distance_in_site_rows sets how many site rows away the tool looks for a free site for a buffer. The default is 8.
  • -⁠power_ground_net_layer names the layer of vertical bottom-metal power and ground straps. The tool then avoids overlaps between those straps and signal pins on the same layer. The layer name M1 here is illustrative.

Step 3. Read the physical data with set_eco_options.

Step 3 — physical data from LEF/DEF
set_eco_options \
  -physical_tech_lib_path tech_LEF_files \
  -physical_lib_path LEF_files \
  -physical_design_path DEF_files \
  -physical_constraint_file physical_constraint_file \
  -physical_lib_constraint_file spacing_rule_file_list \
  -filler_cell_names cell_names \
  -log_file my_log   ;# LEF/DEF messages go to this log
Step 3, alternative — physical data straight from IC Compiler II
set_eco_options \
  -physical_icc2_lib icc2_lib_path \
  -physical_icc2_blocks icc2_blocks   ;# no LEF/DEF needed

Step 4. (Optional) Protect cells, nets, designs and library cells with set_dont_touch. To allow sizing but not removal, use set_size_only.

Step 5. Run check_eco to find missing, incomplete or problematic LEF/DEF data. Fix any issue and run check_eco again.

Step 6. Run the fixing commands: fix_eco_drc -⁠physical_mode ..., fix_eco_timing -⁠physical_mode ... and fix_eco_power ....

Step 7. Write the block-level and top-level change lists with write_changes -⁠format icctcl. They include locations.

Step 8. Implement the changes at block and top level in IC Compiler or IC Compiler II.

Illustrative output — part of an icctcl change list
size_cell U1 AND2X
insert_buffer U2/Z BUF1X -⁠location {212.3 753.2}
add_buffer_on_route net1 BUF2X -⁠location {215.0 853.2} -⁠no_legalize

10.12  Choosing the physical mode

The -⁠physical_mode option decides how freely the tool may use space. Figure 12 compares the three modes on one row.

Three ways to use layout space
Where a new buffer may go in each physical mode
Three ways to use layout space
Figure 12 The same row of cells. occupied_site may push neighbors aside; open_site uses only free sites; freeze_silicon reuses a spare cell.What to notice: Only occupied_site moves an existing cell. That is why it fixes more but disturbs more.

The three modes are:

  • occupied_site places or resizes cells even with no free sites. It suits an early-stage ECO or a densely packed design. Density here is the share of the area already filled with cells. It fixes more violations, because placement is more aggressive.
  • open_site places cells only in free sites. It suits a late-stage ECO or a design with low density. Cells move less, because placement is more careful.
  • freeze_silicon places new cells only on spare cells, so the silicon layers stay the same.
In practice

Many teams use occupied_site in the first ECO loop, when there is still room to adjust. They switch to open_site for the last loops, when the layout must hardly move.

10.13  Site-aware fixing with cells of several heights

Some designs mix single-height and double-height cells in one region. The physically aware flow supports:

  • downsizing, upsizing, swapping and insertion of single-height buffers;
  • upsizing and insertion of multiple-height buffers.

Physically aware sizing only changes a cell's width, never its height.

You can restrict a multiple-height cell to rows of a matching site type. For example, double-height buffer BUFLVT1 may only go in rows of type 2Tunit. Figure 13 shows such rows.

Rows of matching height
A double-height cell needs a double-height site row
Rows of matching height
Figure 13 Single-height cells use the normal rows. With site matching on, BUFLVT1 lands only in rows whose site name is 2Tunit.What to notice: The double-height row spans two normal row heights, from VSS through VDD to VSS.

This feature needs an exact match between the LEF site name of the cell and the DEF row name:

LEF cell site and DEF rows with the same name
MACRO BUFLVT1
  SIZE 1.632 BY 0.768 ;
  SITE 2Tunit ;
...
ROW 2Xrow_1 2Tunit 1500 1680 N DO 4080 BY 1 STEP 96 0 ;
ROW 2Xrow_2 2Tunit 1500 2448 N DO 4080 BY 1 STEP 96 0 ;

To turn it on, set eco_physical_match_site_row_names:

Enabling site-aware ECO
pt_shell> set_app_var eco_physical_match_site_row_names true   ;# match site to row

You can change this variable between fixing runs. The script below first fixes with single-height cells, then with double-height cells in 2Tunit rows. The option -⁠keep_site_names keeps the 2Tunit site data when the LEF/DEF is read.

Single-height fixing, then site-aware double-height fixing
set_eco_options -physical_tech_lib_path technology.lef.gz \
  -physical_lib_path library.lef.gz -physical_design_path design.def.gz \
  -physical_lib_constraint_file icc2_adv_tech_rule.gz \
  -log_file lef_def.log                               ;# LEF/DEF and rule files
set_eco_options -keep_site_names {2Tunit}             ;# keep 2Tunit site data
report_eco_options                                    ;# confirm the settings
check_eco                                             ;# check and read LEF/DEF
# Pass 1: default mode, single-height buffers
set_app_var eco_physical_match_site_row_names false   ;# no site matching
fix_eco_drc -type max_transition -physical_mode open_site \
  -buffer_list $SINGLE_BUF -verbose                   ;# fix transition
fix_eco_timing -type setup -physical_mode open_site \
  -verbose                                            ;# fix setup
fix_eco_timing -type hold -physical_mode open_site \
  -buffer_list $SINGLE_BUF -verbose                   ;# fix hold
# Pass 2: site-aware mode, double-height buffers in 2Tunit rows
set_app_var eco_physical_match_site_row_names true    ;# match site to row
fix_eco_drc -type max_transition -physical_mode open_site \
  -buffer_list $DOUBLE_BUF -verbose                   ;# fix transition
fix_eco_timing -type setup -physical_mode open_site \
  -verbose                                            ;# fix setup
fix_eco_timing -type hold -physical_mode open_site \
  -buffer_list $DOUBLE_BUF -verbose                   ;# fix hold

Site-aware fixing works only with -⁠physical_mode open_site.

TakeawaySet location reading, physical options and data, run check_eco, fix with a physical mode, and write an icctcl change list. Pick occupied_site early and open_site late.

11  ECO fixing methods

You steer the changes with the command you pick and its options, such as -⁠type and -⁠methods. This section covers the main methods.

11.1  Load buffering and load shielding

A weak driver is a cell too small for the load it drives. Physically aware buffering can help such nets in two ways:

  • Load buffering inserts a buffer to strengthen a weak driver. This speeds up the path to the critical load.
  • Load shielding inserts a buffer to shield the critical load from the non-critical loads.

In both cases, the tool picks the best free location and respects placement blockages. Figure 14 shows both methods.

Load buffering and load shielding
Two ways a single buffer helps a critical load
Load buffering and load shielding
Figure 14 Buffering adds strength in front of a far, critical load. Shielding moves the non-critical loads behind a buffer, so the critical load sees less capacitance.What to notice: In buffering, the critical load is now driven by the new buffer. In shielding, the critical load stays on the original driver.

To use them for setup, run setup fixing with the insert_buffer method.

Setup fixing with load buffering and shielding
fix_eco_timing -type setup \
  -methods insert_buffer \
  -buffer_list {list_of_buffers}   ;# buffers it may insert

You can give insert_buffer and size_cell together. If you run them separately for setup, run size_cell first. Then use insert_buffer and other methods for further gains.

11.2  Side-load cell sizing

The -⁠methods option of fix_eco_timing supports cell sizing, general buffer insertion, buffer insertion at load pins and side-load cell sizing.

A side load is a cell that hangs on a critical net but is not on the critical path. The size_cell_side_load method works in two steps. Figure 15 shows them.

  1. It downsizes side-load cells on non-critical paths. This reduces the parasitic capacitance on the critical net.
  2. It upsizes cells on the critical path.
Side-load cell sizing
Shrink the side loads, then grow the critical path
Side-load cell sizing
Figure 15 The critical path is drawn in red. Downsizing U5 and U6 lightens net n2, which improves the slew at U2.What to notice: Step 1 touches cells that are not on the critical path at all.
Setup fixing with side-load sizing
pt_shell> fix_eco_timing -type setup -methods {size_cell_side_load} ...   ;# 2 steps

This method works only with -⁠type setup and -⁠cell_type combinational.

11.3  Clock network ECO fixing

By default, ECO changes only cells in data paths. You can also fix in clock networks. There, you can:

  • fix setup and hold by changing clock arrival times, which solves some hard cases;
  • fix DRC violations inside the clock network.

Clock network fixing works only in the physically aware flow. Set -⁠physical_enable_clock_data before you read the LEF/DEF or IC Compiler II data, so the clock network's physical data is read.

Clock network fixing syntax
fix_eco_timing
  -⁠type setup | hold
  -⁠cell_type clock_network
  [-clock_fixes_per_change integer]
  [-clock_max_level_from_reg integer]
  [-methods {size_cell | insert_buffer | insert_inverter_pair}]
  ...
fix_eco_drc
  -⁠type max_transition | max_capacitance | max_fanout
  -⁠cell_type clock_network
  [-methods {size_cell | insert_buffer | insert_inverter_pair}]
  ...

Clock changes can shift the skew, the difference in clock arrival between flops. To keep skew changes small, fix data paths first. Then fix the remaining violations in the clock network.

Data path first, then the clock network
pt_shell> fix_eco_timing -type setup -cell_type combinational ...   ;# data paths first
pt_shell> fix_eco_timing -type setup -cell_type clock_network ...   ;# then clock paths

Fixing timing through the clock

With -⁠cell_type clock_network, fix_eco_timing changes clock arrival times. For setup, it may upsize buffers in the launch clock path. It may also insert or downsize buffers in the capture clock path.

Setup fixing in clock paths
pt_shell> set_eco_options -physical_enable_clock_data ...   ;# read clock physical data
pt_shell> fix_eco_timing -type setup -methods {size_cell insert_buffer} \
            -buffer_list {buf2 buf4 buf6 buf8} \
            -cell_type clock_network   ;# setup fixing in clock paths

Two options limit how far into the clock tree a change may go:

  • -⁠clock_fixes_per_change sets the minimum number of violations each change must fix. The default is 1. For example, resizing a cell that fans out to four register clock pins can fix four violations. A larger value gives fewer changes, higher in the tree, closer to the clock source.
  • -⁠clock_max_level_from_reg sets the maximum number of buffers between the change and the register clock pin. The default is no limit. A value of 1 limits each change to the immediate driver of the clock pin. A value of 0 restores the default.
Restricting clock network fixing
pt_shell> fix_eco_timing -type setup -methods {size_cell insert_buffer} \
            -buffer_list {buf2 buf4 buf6 buf8} -cell_type clock_network \
            -clock_fixes_per_change 4 \
            -clock_max_level_from_reg 6   ;# 4 fixes per change, up to 6 levels

Figure 16 shows both options on a small tree.

Limiting clock network changes
Fixes per change, and levels from the register
Limiting clock network changes
Figure 16 A clock tree feeding four flops. A change at B1 fixes four endpoints but sits three levels up. A change at B4 fixes one endpoint at level 1.What to notice: With -clock_fixes_per_change 4, only B1 and B2 qualify. With -clock_max_level_from_reg 1, only B3 to B6 qualify.

Fixing DRC in the clock network

With -⁠cell_type clock_network, fix_eco_drc fixes maximum transition, capacitance or fanout in the clock network. It upsizes and inserts buffers there. The default is data paths only.

Transition fixing in clock paths
pt_shell> fix_eco_drc -type max_transition \
            -methods {size_cell insert_buffer} \
            -buffer_list {buf2 buf4 buf6 buf8} \
            -cell_type clock_network   ;# DRC fixing in clock paths

Some paths use a clock signal as data. To allow hold fixing on them, set a variable.

Hold fixing where a clock is used as data
pt_shell> set_app_var eco_enable_fixing_clock_used_as_data true   ;# allow these paths

11.4  TNS-driven clock network fixing

Total negative slack (TNS) is the sum of all negative slacks. Worst negative slack (WNS) is the single worst one. One clock change often helps several endpoints but hurts another. By default, that trade is not allowed. Two options change this:

TNS targeting options
fix_eco_timing
  [-target_violation_type endpoint | tns]
  [-wns_limit float]
  • endpoint is the default, the same as leaving the option out. A clock change may not worsen any endpoint violation.
  • tns allows a clock change to worsen some violations while fixing others, aiming at TNS. WNS may not get worse than the existing WNS, or than -⁠wns_limit if given.

TNS targeting needs a PrimeTime-ADV license.

TNS-driven clock network fixing
pt_shell> fix_eco_timing -type hold \
            -cell_type clock_network \
            -methods {insert_buffer} -buffer_list {buf1 buf2 buf3} \
            -target_violation_type tns   ;# trade endpoints, aim at TNS

The result:

  • TNS goes down.
  • Some paths may get worse.
  • WNS does not get worse, or stays within -⁠wns_limit.

Let us walk through one example. A buffer in the clock network at inverter U1 would help the hold violations at FF2, FF3 and FF4. However, it would worsen the hold violation at FF1. FF9 has the worst violation, −4. The three outcomes are:

  • Default. No buffer is inserted. The violation is reported as unfixable, because launch and capture timing conflict. TNS stays −13.
  • -⁠target_violation_type tns. The tool inserts a buffer with a delay of 1. TNS improves from −13 to −11. FF1 worsens from −3 to −4, which equals the existing WNS of −4.
  • tns with -⁠wns_limit -⁠5. The tool inserts a buffer with a delay of 2. TNS improves to −9, and FF1 worsens to −5.

Figure 17 puts the three outcomes side by side.

Trading endpoints to cut TNS
Hold slack before and after a buffer in the clock network at U1
Trading endpoints to cut TNS
Figure 17 Default: no change is allowed, because FF1 would get worse. With tns, a delay of 1 is added; with -wns_limit -5, a delay of 2.What to notice: TNS improves from −13 to −11 to −9, while FF1 worsens from −3 to −4 to −5.

You can set -⁠wns_limit above or below the existing WNS. Clock network fixing respects it either way.

Mentor's tip

Use TNS targeting when many small violations share a clock branch. Always choose -⁠wns_limit on purpose. By default, other endpoints may worsen all the way down to the existing WNS.

11.5  Hold fixing with load capacitance cells

A very small hold violation is easy to over-fix. Even the smallest buffer may add too much delay and create a setup violation. Figure 18 shows an example, in picoseconds:

  • Before: hold slack −2 ps, setup slack +6 ps.
  • With the smallest buffer: +7 ps delay, so hold is +5 ps but setup is −1 ps.
  • With a load cell: +3 ps delay, so hold is +1 ps and setup is +3 ps.

A load capacitance cell, or load cell, adds capacitance to a net. Its delay effect is like that of a buffer. However, it is a better way to fix hold violations of about 5 ps or less.

A buffer over-fixes; a load cell fits
Fixing a 2 ps hold violation
A buffer over-fixes; a load cell fits
Figure 18 The smallest buffer adds 7 ps and breaks setup. A load cell on the net adds 3 ps and keeps both checks positive.What to notice: The load cell is also smaller: area 1.2 against 5.0 for the buffer.

Three kinds of cell can serve as load cells:

  • buffer cells, with the output left unconnected;
  • inverter cells, with the output left unconnected;
  • dedicated load cells. These are small single-pin cells that are easy to place.

A dedicated load cell has these attributes:

Table 8 Attributes of a dedicated load cell
Attribute Type Value
function_id string unknown
is_black_box boolean true
is_combinational boolean true
number_of_pins int 1

To insert load cells, use -⁠load_cell_list with hold fixing. You can fix small violations with load cells first, then the rest with buffers.

Load cells first, then buffers
fix_eco_timing -type hold -methods insert_buffer -load_cell_list $clist \
  -slack_lesser_than 0.000 -slack_greater_than -0.003   ;# only slack in (-3 ps, 0)
fix_eco_timing -type hold -methods insert_buffer -buffer_list $bflist ;# the rest

Or let the tool choose in one run:

Load cells and buffers together
fix_eco_timing -type hold -methods insert_buffer \
  -load_cell_list $clist -buffer_list $bflist   ;# small: load cells; large: buffers

The tool then fixes small violations with load cells and larger ones with buffers.

For physically aware fixing, write the change list for IC Compiler or IC Compiler II. Each new load cell gets a location and orientation.

Illustrative output — load cell lines in an icctcl change list
pt_shell> write_changes -format icctcl -output wc_eco.tcl
...
create_cell U_LOAD_CAP_CELL_1 CLOAD1
connect_net n231 [get_pins {U_LOAD_CAP_CELL_1/A}]
set_cell_location -coordinates {150.00 30.60} -orientation N

In the physically aware flow, eco_insert_buffer_search_distance_in_site_rows limits the search for a free site. This holds for buffers and for load cells.

11.6  ECOs with multiply instantiated modules

A multiply instantiated module (MIM) is one design used as several instances, such as four CPU cores. A fix in one core usually belongs in all of them.

When eco_enable_mim is true, the tool makes the same ECO changes across each set of MIM instances. It writes one change list file for each set. It recognizes a set like this:

  • in physically aware fixing, instances that share the same DEF file;
  • in logic-only fixing, instances that share the same parasitics file, by the -⁠path option of read_parasitics.

The steps are:

  1. Set eco_enable_mim to true.
  2. (Optional) Define MIM groups with set_eco_options -⁠mim_group, once per group. Report them with report_eco_mim_instances.
  3. Fix with fix_eco_drc, fix_eco_timing and fix_eco_power.
  4. Write the change lists with write_changes.
A MIM ECO with two groups
pt_shell> set_app_var eco_enable_mim true          ;# same fix in every MIM instance
pt_shell> set_eco_options -mim_group {CPU1 CPU2}   ;# group 1
pt_shell> set_eco_options -mim_group {CPU3 CPU4}   ;# group 2
pt_shell> report_eco_mim_instances                 ;# show the groups
pt_shell> write_changes -format icctcl -output pteco.tcl   ;# after fixing

Groups can cost more runtime and memory, because each group is analyzed on its own. This example writes three files. The module name is put in front of the given name:

  • pteco.tcl — changes for the top-level module;
  • CPU_pteco.tcl — changes for module CPU, instances CPU1 and CPU2;
  • CPU_0_pteco.tcl — changes for module CPU, instances CPU3 and CPU4.

This is a custom setup. By default, all changes in the CPU module go into one file.

For manual edits, two more controls decide whether a change stays inside one instance:

  • The eco_mim_preserve variable sets whether MIM groups are kept when eco_enable_mim is true.
  • The -⁠all_mim_instances option of size_cell, insert_buffer and remove_buffer overrides eco_mim_preserve when that variable is false.

Figure 19 shows the decision.

Does a manual change reach every MIM instance?
Two variables and one command option decide
Does a manual change reach every MIM instance?
Figure 19 Follow the arrows from the top. The group is kept unless MIM ECO is off or preserve is off, and even then -all_mim_instances keeps it.What to notice: The defaults: eco_enable_mim is false, and eco_mim_preserve is true.
TakeawayThe fixing methods range from simple sizing to clock tree changes. Use load cells for tiny hold violations, and eco_enable_mim so every copy of a block gets the same fix.

12  Reporting why fixing stopped

12.1  Unfixable timing and DRC violations

fix_eco_timing and fix_eco_drc can report why a violation could not be fixed. First, set how many violations to explain:

Explaining up to 50 unfixable violations
pt_shell> set_app_var eco_report_unfixed_reason_max_endpoints 50   ;# report limit

Then pick how to get the reasons:

Table 9 Ways to get unfixable reasons
To do this Use
Estimate the unfixable violations without fixing (fix_eco_timing only) fix_eco_timing -⁠estimate_unfixable_reasons
Fix, and print the reasons in the output fix_eco_timing or fix_eco_drc with -⁠verbose
Fix, and write the reasons to a log file -⁠unfixable_reasons_prefix file_name_prefix, plus -⁠unfixable_reasons_format text or csv if wanted
Fix, print the reasons and write them to a file -⁠verbose plus -⁠unfixable_reasons_prefix ...

A run of the estimate mode looks like this:

Illustrative output — estimating unfixable reasons
pt_shell> fix_eco_timing -type setup -estimate_unfixable_reasons
Information: Using option -estimate_unfixable_reasons. ...
Information: The design will not be changed.
Information: 22 violating endpoints located... (PTECO-022)
Information: 22 endpoints are being considered for fixing... (PTECO-027)
Unfixable violations:
   A - There are available library cells outside area limit
   B - Delay improvement is too small to fix the violation
   C - The violation is in clock network
   I - Buffer insertion with given library cells cannot fix the violation
   S - Cell sizing with alternative library cells cannot fix the violation
   T - Timing margin is too tight to fix the violation
   U - UPF restricts fixing the violation
   V - Net or cell is invalid or has dont_touch attribute
   W - Fixing the violation might degrade DRC violations
   Violation                          Reasons     Prio/slk
   -------------------------------------------------------
   S:FF1/Q
     U1/Y                             A B W        P8
     U2/Y                             B W          P9
   E:FF2/D                                       -0.150

Each entry lists the cells along a violating path, each with its reason codes. The last line of the entry gives the slack.

The estimate mode is the safest place to start. It is faster than real fixing, and it changes nothing. Use it to tune the options before you fix. In the reason codes above, I suggests a richer buffer list, A suggests relaxing the area limit, and T suggests relaxing margins.

The estimate works with every other fix_eco_timing option. For example, restrict it to one path with -⁠from and -⁠to:

Estimating reasons for one path only
pt_shell> fix_eco_timing -type setup -estimate_unfixable_reasons \
            -from FF1/Q -to FF2/D   ;# explain just this path

12.2  Unusable cells for power reduction

fix_eco_power has a similar feature. It reports why a cell could not be downsized. Power has no "violation", so the words differ: unusable cells instead of unfixable violations.

Explaining up to 100 unusable cells
pt_shell> set_app_var eco_power_report_max_unusable_cells 100   ;# report limit
Table 10 Ways to get unusable-cell reasons
To do this Use
Recover, and print the reasons in the output fix_eco_power -⁠verbose
Recover, and write the reasons to a log file fix_eco_power -⁠unusable_reasons_prefix file_name_prefix
Recover, print the reasons and write them to a file fix_eco_power -⁠verbose -⁠unusable_reasons_prefix file_name_prefix
Illustrative output — unusable cells
pt_shell> fix_eco_power -verbose
Unusable Cells:
  B - Power benefit is too small
  L - Physical constraints restrict sizing
  S - Cell has no alternate library cell with better power
  T - Sizing cell might degrade timing
  U - UPF restrictions prevent sizing
  V - Cell is invalid or has dont_touch attribute
  W - Sizing cell might degrade DRC
  X - Cell is unusable for ECO
  Z - Cell is sized
   Cell name      Lib_cell name      Reasons
   -----------------------------------------
   FF3            SDFFARX1_HVT       W
   U4             AO22X1_HVT         T
   U7             OA21X1_HVT         T W Z

A summary at the end counts the cells for each reason code.

The cells are listed, and cut to the limit, in an order that depends on the recovery type:

Table 11 Order of the unusable-cell list
Power fixing type Order
Area-based downsizing The order of [get_cells -⁠hier *]
Leakage swapping Pattern priority, lowest to highest, with the name as a tiebreaker
Attribute-based downsizing Decreasing library cell attribute value, with the name as a tiebreaker
Power-mode downsizing Decreasing instance cell power. In DMSA total power mode, the -⁠dynamic_scenario scenario sets the order
TakeawaySet the report limit variable, then ask for reasons. The estimate mode for timing is a fast, safe way to tune options before real fixing.

13  HyperTrace ECO fixing

13.1  What HyperTrace adds

HyperTrace is a technology that speeds up path-based analysis. The tool can use it to speed up fix_eco_timing and fix_eco_power when -⁠pba_mode is used. Its graph refinement data is updated on its own during fixing. This feature needs a PrimeECO license.

The supported modes are:

Table 12 PBA modes that HyperTrace ECO supports
Command Supported PBA mode values
fix_eco_timing exhaustive, ml_exhaustive
fix_eco_power path, exhaustive, ml_exhaustive

13.2  Turning it on

HyperTrace ECO fixing
pt_shell> set_app_var eco_enable_graph_based_refinement true   ;# HyperTrace for ECO
pt_shell> fix_eco_timing -pba_mode exhaustive ...   ;# or ml_exhaustive
pt_shell> fix_eco_power -pba_mode path ...          ;# or exhaustive, ml_exhaustive

eco_enable_graph_based_refinement is independent of timing_enable_graph_based_refinement. The second variable is for HyperTrace reporting, not ECO.

To confirm that HyperTrace is in use, look for this message:

HyperTrace confirmation message
Information: Running HyperTrace-based ECO fixing (PTECO-115)

fix_eco_power builds HyperTrace fully into its algorithms. So it does not use or need the reporting refinement variables:

  • timing_refinement_max_slack_threshold
  • timing_refinement_min_slack_threshold
  • timing_refinement_maximum_critical_pin_percentage

13.3  Options that block full HyperTrace

Some options allow only partial use of HyperTrace:

  • fix_eco_timing -⁠path_selection_options;
  • fix_eco_power -⁠start_end_type reg_to_reg;
  • fix_eco_power -⁠pba_path_selection_options.

With one of these, the tool issues PTECO-116 instead of PTECO-115:

Partial HyperTrace message
Information: Using HyperTrace to accelerate PBA-based ECO fixing.
(PTECO-116)

In that case, you must set the reporting refinement threshold variables to suitable values for ECO.

TakeawayHyperTrace speeds up PBA-based fixing. Turn it on with eco_enable_graph_based_refinement, and check for PTECO-115 in the log.

14  Writing change lists

14.1  Formats

A change list describes every change made by all ECO work in the session. It tells the implementation tool how to carry the changes out. The write_changes command writes it, and -⁠format picks the format:

Table 13 Change list formats
Format value What it writes
ptsh A Tcl script for the PrimeTime shell (the default)
text A list of changes in plain descriptive text
dctcl A Tcl script for Design Compiler
icctcl A Tcl script for IC Compiler or IC Compiler II
eco A binary file for the PrimeTime read_eco_changes command
aprtcl A Tcl-like script for third-party place-and-route tools

You can replay the scripts in a tool such as IC Compiler II to implement the changes. You can also replay them in other PrimeTime sessions. This helps you judge the ECO in other scenarios. Figure 20 shows where each format goes.

Where each change list goes
One set of changes, several formats
Where each change list goes
Figure 20 write_changes can feed a layout tool, a third-party tool, Design Compiler or another PrimeTime session. The binary eco format is for PrimeTime replay.What to notice: The eco format feeds read_eco_changes, which also merges block-level changes into a top-level run.

14.2  Replaying a change list in PrimeTime

The recommended flow is:

  1. In the original session, write the changes in the binary eco format.
  2. In a new or restored session, check the LEF/DEF with check_eco, then replay the changes with read_eco_changes.
  3. Judge the result, and run more ECO commands if needed.
  4. Write a change list for implementation.
Writing and replaying an ECO in PrimeTime
write_changes -format eco -output change_list_file   ;# step 1, original session
# --- later, in a new or restored session ---
restore_session ...                                  ;# step 2
set_eco_options ...                                  ;# same options as before
check_eco                                            ;# check the LEF/DEF data
read_eco_changes change_list_file                    ;# replay the changes
# step 3: report, and fix more if needed
write_changes -format icctcl new_change_list_file    ;# step 4, for layout

14.3  Bringing block-level ECOs into a top-level run

In a hierarchical flow, ECOs run at block level and at top level. Different teams may fix different blocks, even with different PrimeTime versions. The top-level run can then read all block changes.

Block level: save the changes
pt_shell> write_changes -format eco -output changesBlkA   ;# block A's ECO
Top level: apply them to block A
pt_shell> read_eco_changes -design_name BlkA changesBlkA   ;# apply to module BlkA

The name BlkA is the Verilog module name of the block. It can also be the reference name of a MIM. For a MIM, the changes go to every instance in the MIM group.

14.4  Change lists for third-party tools

In a physically aware flow, -⁠format aprtcl writes changes for third-party place-and-route tools. The name is short for automatic place-and-route. It writes pseudo-Tcl commands that belong to no particular tool. Your own scripts can parse them and feed them to any layout tool.

The commands special to this format are below. Any other command is the same as in the icctcl format.

Table 14 Pseudo-Tcl commands in the aprtcl format
ECO operation Pseudo-Tcl command
Insert buffer, pin-based insert_buffer new_lib_cell -⁠new_net_names ... -⁠new_cell_names ... [-location {x y}] [-orientation dir] [-inverter_pair] {pin_or_port_list}
Insert buffer, on-route As above, plus -⁠on_route and [-route_cut_location {x y}]
Resize cell size_cell leaf_cell new_lib_cell [-overlap] [-location {x y}] [-orientation dir]
Create cell (load cells) create_cell load_cell_name new_lib_cell [-location {x y}] [-orientation dir]
Connect net (load cells) connect_net net_name pin_or_port_list
Remove buffer remove_buffer cell_name

For an inverter pair, -⁠location and -⁠route_cut_location take two points: {x1 y1 x2 y2}.

Illustrative output — an aprtcl change list (part)
# Change list, formatted for Third Party Compiler
# aprtcl_file_syntax_version : 1.0
current_instance
current_instance {blk/subblk3}
insert_buffer -on_route BUFFD4 \
  -new_net_names {net1} -new_cell_names {BUF1} \
  -location {x1 y1} -route_cut_location {x1' y1'} \
  {sink1/I sink2/I sink3/I sink4/I}
insert_buffer -on_route BUFFD2 \
  -new_net_names {net2} -new_cell_names {BUF2} \
  -location {x2 y2} -route_cut_location {x2' y2'} \
  {sink1/I sink2/I sink3/I}
create_cell {U_LOAD_CAP_CELL_1} {CLOAD1_LVT} \
  -location {150.6320 61.8640} -orientation N
connect_net {design_ack_signal} {U_LOAD_CAP_CELL_1}

This example builds a buffer tree that drives four load pins, and adds a load cell to fix a hold violation. The order of the insert_buffer lines and their load pin lists re-create the tree.

The file header holds a syntax version, so parsers can adapt as the format changes. Today the only value is 1.0. It is better for a parser to check this value, so a future syntax change cannot cause silent errors.

TakeawayUse icctcl for IC Compiler II, aprtcl for other layout tools, and the binary eco format to replay changes in PrimeTime.

15  Implementing the changes in the layout tools

With separate tools, the loop is:

  1. In PrimeTime, write the change list: write_changes -⁠format icctcl new_change_list_file.
  2. In the layout tool, apply and route the changes:
    • In IC Compiler II, source the change list. Then place and legalize the ECO cells with place_eco_cells, insert fillers with create_stdcell_fillers, and update the routes with route_eco.
    • In IC Compiler, read the change list with eco_netlist. Then run place_eco_cells, legalize_placement and route_zrt_eco.
  3. Extract parasitics with StarRC.
  4. Read the updated full netlist and parasitics into PrimeTime.
  5. Rerun timing analysis and check the QoR.
  6. Repeat with more ECO passes as needed.

With a PrimeECO license, the PrimeECO tool can do physical implementation, extraction and signoff timing in a single shell.

16  The incremental ECO flow

16.1  Why incremental

In the normal loop, every pass writes the full netlist and extracts the full design. The incremental ECO flow handles only what changed:

  • IC Compiler II implements the changes and writes only the incremental changes.
  • StarRC extracts only the changed parts and writes an incremental parasitic file.
  • PrimeTime applies the incremental parasitics to a restored session and checks timing.

Each pass is faster, because only the changes are extracted and analyzed. However, final signoff still needs a full extraction and a full timing analysis. With a PrimeECO license, PrimeECO offers a single-shell alternative here too.

16.2  Two steps

  1. Initialize. Build the reference data in IC Compiler II, StarRC and PrimeTime. Enable tracking of changes in IC Compiler II.
  2. Iterate. Run the ECO in PrimeTime. Record the changes while IC Compiler II implements them.
Tracking changes in IC Compiler II
icc2_shell> record_signoff_eco_changes -init -def   ;# step 1: start the reference
icc2_shell> record_signoff_eco_changes -start       ;# step 2: begin recording
# ... place and route the ECO changes here ...
icc2_shell> record_signoff_eco_changes -stop        ;# end recording

At the end of each pass, IC Compiler II writes:

  • an incremental NDM database for StarRC extraction;
  • an incremental change list for PrimeTime's next pass.

Figure 21 shows the whole loop.

The incremental ECO loop
Initialize once, then iterate on the changes only
The incremental ECO loop
Figure 21 Step 1 builds a full reference in all three tools. Each later pass records only the changes in IC Compiler II, extracts them and applies them to a saved PrimeTime session.What to notice: The PrimeTime box restores the saved session and reads only the changes. It never re-reads the full netlist.

16.3  Initializing the flow

Step 1. In IC Compiler II, copy the block and initialize the ECO database.

Initialize — IC Compiler II
icc2_shell> open_lib Design.nlib                                  ;# open the library
icc2_shell> copy_block -from_block Block -to_block Block_pre_eco  ;# keep the original
icc2_shell> open_block Block_pre_eco                              ;# work on the copy
icc2_shell> record_signoff_eco_changes -init -def                 ;# save, Verilog, DEF

record_signoff_eco_changes saves the design and writes the Verilog netlist and the DEF data. PrimeTime uses these in step 3.

Step 2. In StarRC, extract in ECO mode with lines like these in the command file:

Initialize — StarRC command file lines
NDM_DATABASE: Design.nlib
BLOCK: Block_pre_eco
ECO_MODE: YES
GPD: Block_pre_eco.gpd

Step 3. In PrimeTime, run a full baseline, save it, and do the first ECO.

Initialize — PrimeTime baseline and first ECO
pt_shell> read_verilog ndm_path/design.full.v.gz   ;# full netlist
pt_shell> link_design                              ;# link it
pt_shell> read_parasitics Block_pre_eco.gpd        ;# full parasitics
pt_shell> read_sdc Block.sdc                       ;# constraints
pt_shell> update_timing -full                      ;# full timing update
pt_shell> save_session eco_session1                ;# the reference session
pt_shell> set_eco_options -physical_design_path \
            ndm_path/design.full.def.gz ...        ;# layout data
pt_shell> fix_eco_timing ...                       ;# first ECO
pt_shell> fix_eco_drc ...                          ;# then DRC
pt_shell> write_changes pt-eco_inc1.tcl            ;# changes for pass 1

Here ndm_path stands for Design.nlib/Block_pre_eco/attach/design.signoff.eco.data.

16.4  One incremental pass

Step 1. In IC Compiler II, implement the changes and track them.

Pass — IC Compiler II
icc2_shell> open_lib Design.nlib                                       ;# library
icc2_shell> copy_block -from_block Block_pre_eco -to_block Block_eco1  ;# new copy
icc2_shell> open_block Block_eco1                                      ;# open it
icc2_shell> record_signoff_eco_changes -start -input pt-eco_inc1.tcl   ;# record
# ... implement the ECO with the minimal physical impact flow ...
icc2_shell> record_signoff_eco_changes -stop -def                      ;# stop, write

Step 2. In StarRC, extract the modified design incrementally:

Pass — StarRC command file lines
NDM_DATABASE: Design.nlib
BLOCK: Block_eco1
ECO_MODE: YES
GPD: Block_pre_eco.gpd

Step 3. In PrimeTime, read the incremental netlist changes and parasitics, and check timing.

Pass — PrimeTime
pt_shell> restore_session eco_session1               ;# the reference session
pt_shell> read_eco_changes ndm_path/design.incr.pt   ;# incremental netlist changes
pt_shell> read_parasitics -eco Block_eco1_inc.gpd    ;# incremental parasitics
pt_shell> update_timing                              ;# incremental by default
pt_shell> save_session eco_session2                  ;# for the next pass
pt_shell> report_timing ...                          ;# is another ECO needed?
pt_shell> fix_eco_timing ...                         ;# if so, fix again
pt_shell> fix_eco_drc ...                            ;# and DRC
pt_shell> write_changes pt-eco_inc2.tcl              ;# changes for pass 2

Repeat steps 1 to 3, using the data from the previous pass, until timing closes. Then run a final full-chip extraction and timing analysis for signoff.

16.5  Hierarchical designs

The hierarchical flow is like the flat one. Usually, IC Compiler II and StarRC run each block and the top separately. PrimeTime puts all blocks and the top together and analyzes them as one. So you gather the incremental data from each run into PrimeTime.

First, initialize the top and each block as above. Then, per pass:

  • IC Compiler II, per block and top: copy the block and start recording with that level's change list. Run the minimum-physical-impact ECO, put fillers back, add metal fill, and stop recording. Metal fill is added with signoff_create_metal_fill -⁠auto_eco true, after setting its options with set_app_options.
  • StarRC, per block and top: extract in ECO mode. The top-level example also sets NETLIST_INCREMENTAL: YES and names the incremental GPD file.
  • PrimeTime: read every level's changes and parasitics into one restored session.
Pass — PrimeTime, top and blocks together
restore_session eco_session1                   ;# restore the initial session
read_eco_changes ndm_path_Top/design.incr.pt   ;# top-level changes
read_eco_changes ndm_path_Blk1/design.incr.pt  ;# block 1 changes
read_eco_changes ndm_path_BlkN/design.incr.pt  ;# ... block N changes
read_parasitics -eco Top_eco1_inc.gpd          ;# top-level parasitics
read_parasitics -eco Blk1_eco1_inc.gpd         ;# block 1 parasitics
read_parasitics -eco BlkN_eco1_inc.gpd         ;# ... block N parasitics
update_timing                                  ;# incremental by default
save_session eco_session2                      ;# for the next pass

read_eco_changes and read_parasitics -⁠eco apply the hierarchy stored in the incremental files on their own. You do not need current_instance or the -⁠path option of read_parasitics.

16.6  Incremental passes in DMSA

Start with an initial run like the one above, using a normal DMSA script. For each pass, create each scenario from its saved session with create_scenario -⁠image. Then read the incremental data in the workers and update timing.

Pass — DMSA manager
create_scenario -name $scenario \
  -image pre_session_dmsa/${scenario}_pre_eco_session   ;# from the saved session
remote_execute {                                        ;# runs in every worker
  read_eco_changes ndm_path_Top/design.incr.pt          ;# top-level changes
  read_eco_changes ndm_path_Blk1/design.incr.pt         ;# block 1 changes
  read_parasitics -eco Top_eco1_inc.gpd                 ;# top-level parasitics
  read_parasitics -eco Blk1_eco1_inc.gpd                ;# block 1 parasitics
  update_timing                                         ;# incremental by default
}
save_session eco_session2_dmsa                          ;# save for the next pass
fix_eco_timing ...                                      ;# fix again if needed
write_changes pt-eco_inc2_dmsa.tcl                      ;# changes for the next pass
TakeawayThe incremental flow restores a reference session and applies only the changed netlist and parasitics. It saves time per pass, but final signoff still needs a full run.

17  The reduced-resource ECO flow

17.1  What it does

This flow is being retired

The reduced-resource ECO feature is deprecated and will be removed from the tool. Using it gives warning PTECO-042. The Hybrid timing view feature of the PrimeECO tool replaces it. Learn the idea here, but prefer the replacement in new flows.

This flow cuts the memory and runtime of ECO fixing. It helps most when ECOs run in many scenarios under DMSA.

The idea is a smaller design for fixing. The ECO design holds only the data related to the violations being fixed, such as setup and hold. The fixing command uses it to fix violations against the chosen constraints. Figure 22 shows the flow, from static timing analysis (STA) to fixing.

A full analysis, then a small ECO run
write_eco_design ends the STA script; read_eco_design starts the ECO script
A full analysis, then a small ECO run
Figure 22 One large script is split in two. The timing run still needs 100 GB, but the ECO run needs about 10 GB. The memory sizes are illustrative.What to notice: The ECO script never reads the full netlist or parasitics.

To use it, split your script in two:

  • The STA script ends with write_eco_design, which writes the reduced ECO design.
  • The ECO script starts with read_eco_design, which reads it and fixes on it.

For example, if the STA script needs 100 GB, the ECO script might need only 10 GB. This matters when you run many ECOs, for different fixing types or scenarios.

With write_eco_design, you can choose which timing or design rule constraints to optimize. More constraint types give a larger ECO design. You can also limit the endpoints used to build it.

The reduced design may not show every possible violation. Thus, the flow is only for ECOs, never for final signoff. Always finish with a full-design analysis.

17.2  Several scenarios in one session

After STA in DMSA, write the ECO designs. Then stop the large hosts and start smaller ones for fixing.

Large hosts for STA, then write the ECO designs
create_scenario ...                       ;# DMSA scenarios
set_host_options -num_processes 20 \
  -submit_command "bsub [mem=100G] ..."   ;# 100 GB hosts for STA
start_hosts                               ;# launch the workers
current_session -all                      ;# focus on all scenarios
report_global_timing                      ;# STA
write_eco_design                          ;# write the ECO designs
Then swap to small hosts for ECO
stop_hosts                                              ;# stop the large hosts
remove_host_options                                     ;# clear the old host settings
set_host_options -submit_command "bsub [mem=10G] ..."   ;# 10 GB hosts for ECO
start_hosts                                             ;# launch the small workers
read_eco_design                                         ;# read the ECO designs
fix_eco_timing                                          ;# fix on the small designs

Each ECO run now needs 10 GB instead of 100 GB.

17.3  Many saved sessions

A common practice is to run and save one session per PVT corner (process, voltage and temperature). Later, a manager restores them as scenarios and runs the ECO.

To use the reduced flow here, set eco_save_session_data_type in each STA session before saving. This stores extra endpoint data in the session. write_eco_design then uses it to build the ECO designs.

Per-corner STA script (corner 1; corners 2 to 16 are the same)
read_verilog ...                                ;# netlist for this corner
read_parasitics ...                             ;# parasitics for this corner
report_timing                                   ;# STA
set_app_var eco_save_session_data_type timing   ;# save ECO data for timing ECO
save_session ./corner01                         ;# save the session with ECO data
DMSA manager — build ECO designs on 2 hosts, fix on 16 small hosts
create_scenario -image ./corner01         ;# one scenario per saved session
create_scenario -image ./corner16         ;# ... up to corner 16
set_host_options -num_processes 2 \
  -submit_command "bsub [mem=100G] ..."   ;# two 100 GB workers
start_hosts                               ;# launch two workers
current_session -all                      ;# focus on all scenarios
write_eco_design                          ;# restore sessions, extract ECO designs
stop_hosts                                ;# stop the large workers
remove_host_options                       ;# clear the old host settings
set_host_options -num_processes 16 \
  -submit_command "bsub [mem=10G] ..."    ;# sixteen 10 GB workers
start_hosts                               ;# launch 16 small workers
read_eco_design                           ;# load the ECO designs
fix_eco_timing                            ;# fix on the ECO designs
report_timing                             ;# check the result

write_eco_design finds the ECO data in the saved sessions, restores them and extracts the ECO designs. Two 100 GB machines do this one after another. Then read_eco_design starts 16 small workers on 10 GB machines. The full-design flow would need 16 large 100 GB machines for the same ECO.

17.4  Using negative margins to skip a check

In each scenario, you may only care about one check. A large negative margin makes the tool ignore the other check there, which saves runtime.

Setup only at worst case, hold only at best case
set scenario ${mode}_${corner}                ;# this run's scenario name
if { $scenario == "mode_worst"} {             ;# worst-case scenario
  read_parasitics -format SPEF ./worst.spef   ;# worst-case parasitics
  set_eco_options -timing_hold_margin -100.0 \
    -timing_setup_margin 0.050                ;# check setup, ignore hold
}
if { $scenario == "mode_best"} {              ;# best-case scenario
  read_parasitics -format SPEF ./best.spef    ;# best-case parasitics
  set_eco_options -timing_hold_margin 0.000 \
    -timing_setup_margin -100.0               ;# check hold, ignore setup
}

17.5  The non-DMSA variant

You can also run write_eco_design in standalone sessions. It then merges the failing endpoints of several sessions into one ECO design.

  1. In each session, set eco_save_session_data_type before save_session.
  2. Run write_eco_design with -⁠merge_sessions, listing the session directories.
Standalone STA, one script per corner and host
read_verilog ...                                ;# netlist for this corner
update_timing ...                               ;# timing update
set_app_var eco_save_session_data_type timing   ;# keep failing endpoint data
save_session $my_sess/STA_SESS_FF               ;# STA_SESS_SS on the other host
Writing a merged ECO design per corner
restore_session $my_sess/STA_SESS_FF            ;# STA_SESS_SS on the other host
set my_sess_list "$my_sess/STA_SESS_FF $my_sess/STA_SESS_SS"   ;# both sessions
write_eco_design $rreco_db/FF -merge_sessions $my_sess_list   ;# $rreco_db/SS there

The rest is the same as the DMSA flow. In the DMSA manager, read_eco_design $rreco_db finds the two ECO designs and starts two workers. It then runs fix_eco_timing or fix_eco_drc.

TakeawayThe reduced-resource flow fixes on a small ECO design built from a full analysis. It is deprecated, and it is never a signoff run.

18  The freeze silicon ECO flow

18.1  What it does

Making new masks for a chip costs time and money. In the freeze silicon flow, IC Compiler II changes only the metal and via layers. The silicon layers, such as implant, diffusion and poly, stay as they are. Thus, no new masks are needed for them.

This works only if spare cells were placed across the layout in advance. A spare cell is an unused cell waiting for a later ECO. The ECO connects spare cells into the design with metal routes.

The commands in each tool are:

IC Compiler II — preparation
add_spare_cells -cell_name ... -lib_cell ... -num_cells ...   ;# place spare cells
create_stdcell_fillers -lib_cells ...                         ;# fill the gaps
PrimeTime — freeze silicon ECO
set_eco_options ...                                      ;# spare cells, rules, LEF/DEF
fix_eco_drc -type ... -physical_mode freeze_silicon      ;# DRC on spare cells
fix_eco_timing -type ... -physical_mode freeze_silicon   ;# timing on spare cells
write_changes -format icctcl -output pt_eco.tcl          ;# the change list
IC Compiler II — freeze silicon ECO
set_app_options -name design.eco_freeze_silicon_mode -value true    ;# mode on
source pt_eco.tcl                                                   ;# apply changes
set_app_options -name design.eco_freeze_silicon_mode -value false   ;# mode off
connect_pg_net -automatic                                ;# connect power and ground
# Turn off timing-driven routing in all three routing stages
set_app_options -category route.global -list {timing_driven false}  ;# global
set_app_options -category route.track -list {timing_driven false}   ;# track
set_app_options -category route.detail -list {timing_driven false}  ;# detail
check_routes                                             ;# check the routes
route_eco -reroute modified_nets_only -open_net_driven true   ;# route the changes

Figure 23 shows the data used in this flow.

Freeze silicon data and commands
Spare cells in, a 1-to-1 spare cell mapping out
Freeze silicon data and commands
Figure 23 PrimeTime reads the usual timing data plus spare cell and rule data. It writes buffers with locations, each mapped to a spare cell, for IC Compiler II.What to notice: Every new cell in the change list lands on an existing spare cell. Nothing new is placed on silicon.

18.2  Preparing for the flow

The requirements are:

  • Spare cells must be in the chip layout.
  • The spare cells must be defined in the .lib library.
  • Their library and instance layout data must be in LEF/DEF files. IC Compiler II can write these.
  • The spacing rules for cell placement must be in a file. You can provide it in three ways:
    • with export_advanced_technology_rules in IC Compiler II, which writes the rules in a binary encrypted format;
    • as a script of set_lib_cell_spacing_label and set_spacing_label_rule commands;
    • in the Synopsys technology file format.

18.3  Programmable spare cells

A normal spare cell has one fixed function, such as a NAND gate. A programmable spare cell (PSC) is built from transistor-level parts that can be wired in many ways. So it can become one of several logic functions. If an ECO uses only part of a PSC, the rest stays free for later ECOs.

Figure 24 shows a row before and after an ECO. No cell can move in this flow, but PSCs can be wired up.

Programmable spare cells before and after an ECO
One PSC becomes a buffer; another becomes two buffers and two new PSCs
Programmable spare cells before and after an ECO
Figure 24 PSC1 becomes the large buffer B1. Part of PSC2 becomes buffers A1 and A2, and the unused parts are backfilled as PSC3 and PSC4. Red cells are new functional cells; gray cells are spare cells still free.What to notice: FILL1 does not move. In freeze silicon, nothing on silicon is ever moved.

In PrimeTime, set_eco_options chooses the flow and names the spare cells, the rules file and the LEF/DEF files.

Setting up a freeze silicon ECO
pt_shell> set_eco_options \
            -programmable_spare_cell_names {PSC1 PSC2 PSC3 PSC4 PSC5 PSC6} \
            -physical_lib_constraint_file ../tech_data/my_spacing_rules \
            -physical_tech_lib_path {../phy_data/my_tech.lef} \
            -physical_lib_path {../phy_data/my_lib.lef ../phy_data/my_design.def} \
            -log_file my_lef_def.log   ;# LEF/DEF errors and warnings go here

-⁠log_file writes the LEF/DEF processing messages to the named file.

18.4  LEF/DEF descriptions of PSCs

IC Compiler II can write the PSC layout data with write_lef and write_def.

  • In LEF, a PSC looks like an ordinary fill cell. However, a fill cell's MACRO section must have CLASS CORE FEEDTHRU or CLASS CORE SPACER. For a PSC, this is optional.
  • In DEF, a PSC instance must have SOURCE DIST in the COMPONENTS section, because it is not in the netlist. It must also be PLACED, because it has a location. It cannot be FIXED or COVER.
A PSC in LEF and in DEF
# LEF programmable spare cell, cell name = e0hd_cap12x
MACRO e0hd_cap12x
 CLASS CORE ;
 ORIGIN 0 0 ;
 SIZE 0.816 BY 0.42 ;
END e0hd_cap12x
# DEF instance of the programmable spare cell
-xofiller!ECO_DECAP_FILLER_!e0hd_cap12x!179638
e0hd_cap12x + SOURCE DIST + PLACED (264300 624100) N ;

To check the PSC descriptions, use -⁠log_file and look for the PSC messages after fixing.

Illustrative output — PSC messages in the LEF/DEF log
Information: Reading LEF file my_lib.lef
Information: Information: Identified programmable spare cell PSC1 at
 lineNumber 1238.
Information: Reading DEF file my_design.def
Physical Information Summary:
Identified programmable spare cells PSC1 ...

18.5  Exporting DEF and spacing rules from IC Compiler II

At icc2_shell — DEF and rules for each block
set myblocks "block1 block2 block3"                      ;# blocks to export
set mylib "design_A"                                     ;# library name
open_lib $mylib                                          ;# include all required libs
foreach blockx $myblocks {                               ;# one pass per block
  open_block $blockx                                     ;# open the design
  check_legality                                         ;# check placement legality
  link -force                                            ;# link the block
  write_def $blockx.def                                  ;# block DEF file
  export_advanced_technology_rules ${blockx}_rules.tcl   ;# technology rules
  close_blocks $blockx                                   ;# close it
}

18.6  A freeze silicon ECO in PrimeTime

Three commands do the work: set_eco_options sets the parameters, fix_eco_timing or fix_eco_drc makes the changes, and write_changes writes them. The script below fixes hold in several scenarios.

Freeze silicon hold fixing in DMSA
set_app_var read_parasitics_load_locations true           ;# keep node locations
remote_execute {                                          ;# in each worker:
  set_app_var timing_save_pin_arrival_and_slack true      ;# keep pin data
  update_timing -full }                                   ;# full timing update
remote_execute { set lef_files [glob ./*.lef]             ;# LEF list, then:
  set_eco_options \
    -physical_tech_lib_path $tech_lef_files \
    -physical_lib_path $lef_files \
    -physical_design_path ./design.def.gz \
    -physical_lib_constraint_file $rule_files \
    -programmable_spare_cell_names $pscs \
    -log_file ./lef_def.log }                             ;# physical data, per worker
set buffer_list {BUF_1 BUF_2 BUF_N}                       ;# allowed buffers
set_app_var eco_report_unfixed_reason_max_endpoints 50    ;# explain failures
fix_eco_timing -type hold -physical_mode freeze_silicon \
  -buffer_list $buffer_list -verbose                      ;# fix hold on spare cells
remote_execute { write_changes -format icctcl -output pt_eco.tcl }   ;# write

As before, -⁠physical_icc2_lib and -⁠physical_icc2_blocks can replace the LEF/DEF options.

In the change list, each insert_buffer gives the new buffer's location. A map_freeze_silicon command then names the spare cell it replaces.

Illustrative output — a freeze silicon change
insert_buffer [get_pins {U1/z}] e0hd_cap12x \
 -⁠new_net_names {eco_hold_net1} \
 -⁠new_cell_names {eco_hold_buf1} \
 -⁠location {665.4320 193.6320} -⁠orientation FS
map_freeze_silicon \
 -⁠eco_cell [get_cells -⁠hier " eco_hold_buf1 "] \
 -⁠spare_cell xofiller!ECO_DECAP_FILLER_!e0hd_cap12x!179638 \
 -⁠filler_map_strategy closest
TakeawayFreeze silicon fixes with metal changes only, by wiring up spare cells. PSCs make this flexible, and the change list maps each new cell to one spare cell.

19  Running ECO scenarios on fewer hosts

19.1  More scenarios than machines

Normally, each scenario has a host of its own. ECO can also run when there are more scenarios than hosts. Set eco_enable_more_scenarios_than_hosts to true.

The requirements are:

  • At least four hosts. The recommended number is at least eight, or a quarter of the scenarios, whichever is larger. For 64 scenarios, that is 16 hosts.
  • Enough disk space. The DMSA working directory must hold the session data of all scenarios. For example, 32 scenarios of 1 GB each need at least 32 GB.

As hosts decrease, runtime grows linearly. The extra turnaround also depends on design size, violation count, scenario types, network speed and free disk space.

19.2  Making the scripts faster

With fewer hosts, the hosts run in scenario swapping mode. They take turns, loading one scenario after another. This slows things down a lot. To swap less:

  • Use fewer merged reporting commands, such as report_timing and report_analysis_coverage.
  • Merge remote_execute commands into one block. Each remote_execute costs one round of swapping.
A DMSA ECO script that swaps as little as possible
remote_execute {                                      ;# setup in one block
  set_dont_touch $dont_touch_list                     ;# protect logic
  set_dont_use $dont_use_list                         ;# ban lib cells
  set eco_alternative_area_ratio_threshold 2          ;# an ECO variable setting
  update_timing                                       ;# update timing
}                                                     ;# one swap round for setup
fix_eco_timing -type setup                            ;# fix setup at the manager
remote_execute {                                      ;# all reports in one block
  report_analysis_coverage                            ;# coverage per scenario
  report_timing -delay_type max ...                   ;# setup paths
  report_timing -delay_type min ...                   ;# hold paths
  report_constraint -all_violators ...                ;# violations
}                                                     ;# one swap round for all reports
report_constraint -all_violators ...                  ;# minimum reports at the manager
current_scenario scen1                                ;# write from one scenario only
remote_execute { write_changes -output my_eco.tcl }   ;# one change list
TakeawayWith eco_enable_more_scenarios_than_hosts, ECO runs on fewer hosts by swapping scenarios. Group your remote commands so each swap round does as much as possible.

20  Manual netlist editing

20.1  When to edit by hand

Late in a project, only a few small edits may be allowed. You can then edit the netlist by hand and see the effect on timing. For many violations or larger changes, it is better to use the fixing commands.

The steps are:

  1. To replace or resize a cell, find the alternative library cells first.
  2. Edit the netlist with the commands in the table below.
  3. Write a change list with write_changes.
Illustrative output — alternatives as base names
pt_shell> get_alternative_lib_cells -base_names U135
AN2 AN2i
Table 15 Netlist editing commands
Object Task Command
Buffer Insert a buffer insert_buffer
Buffer Remove a buffer remove_buffer
Cell Change the size (drive strength) of a cell size_cell
Cell Create a cell create_cell
Cell Rename a cell rename_cell
Cell Remove a cell remove_cell
Net Add a new net create_net
Net Connect nets to pins connect_net
Net Disconnect nets from pins disconnect_net
Net Rename a net rename_net
Net Remove a net remove_net

20.2  What-if analysis with fast incremental updates

You can try changes inside PrimeTime and see the result quickly. The tool then uses a fast incremental update. It re-times only the part of the design the change affects.

Typical what-if changes are:

  • larger driving cells with size_cell, or buffers with insert_buffer;
  • separated victim and aggressor nets with set_coupling_separation, for crosstalk;
  • custom edits, such as removing a cell and connecting a new one with remove_cell, create_cell and connect_net.

These commands keep the update incremental:

  • size_cell
  • insert_buffer, remove_buffer
  • set_coupling_separation, remove_coupling_separation
  • connect_net, disconnect_net, remove_net
  • create_cell, remove_cell

Any other netlist editing command makes update_timing do a full update.

An incremental update works in four steps:

  1. Find the nets directly affected by the changes, and their aggressors.
  2. Filter the affected nets electrically.
  3. Run a first pass on the fanout cone of the affected nets. The depth of this cone is limited to where the slew changes.
  4. Run the second and any later passes on the nets in that cone.

When you are happy with the changes, write a change list for the layout tool.

What-if crosstalk results can differ slightly from a full analysis. This is because the analysis is iterative, and timing windows and crosstalk delays depend on each other. For final signoff, run a full analysis with complete GPD or SPEF data and the netlist from layout.

20.3  Automatic uniquifying

Suppose block low is used twice, and you edit one instance. That instance now differs from the other, so it must become its own design. PrimeTime does this for you, which is called uniquifying. It renames the edited instance's design to something like low_0, avoiding names already used.

In PrimeTime, no new design is created at that moment. A placeholder is created instead, like the one left by link_design -⁠remove_sub_designs. To list the designs created this way, use list_designs -⁠all. They become real only when you relink the design.

An edited block is uniquified together with every block above it. This stops at the first block that has a single instance. Figure 25 shows an example.

Editing one copy makes it unique
size_cell on i1/low/n1 uniquifies low and inter
Editing one copy makes it unique
Figure 25 Design inter is used twice, and each copy holds a low. Editing n1 inside i1 gives i1 and i1/low new design names. The second copy keeps the old ones.What to notice: i2 and i2/low still point to the original designs inter and low.
Illustrative output — size_cell triggers uniquifying
pt_shell> size_cell i1/low/n1 class/NR4P
Uniquifying 'i1/low' (low) as 'low_0'.
Uniquifying 'i1' (inter) as 'inter_0'.
Sized 'i1/low/n1' with 'class/NR4P'
1
pt_shell> get_attribute [get_cells i1/low] is_edited
true

Editing a block also marks its parent and all ancestors up to the top as edited. The Boolean attribute is_edited shows this, on designs and on hierarchical cells.

20.4  Naming library cells in editing commands

Many editing commands take a library cell, either as an object or as a name. To get objects, use get_lib_cells, for example get_lib_cells */*.

A library cell name can be:

  • the full name, such as mylib1/AND2, which is never ambiguous;
  • the base name, such as AND2, which must be resolved to a library.

Base names matter most in DMSA, because each scenario may have different libraries. You can use them in a single scenario too. Two options control how a base name is resolved:

  • -⁠current_library resolves it from the cell's currently linked library. It works with size_cell, get_alternative_lib_cells and report_alternative_lib_cells.
  • -⁠libraries gives a list of libraries, searched in order. It works with size_cell, insert_buffer and create_cell.

Without these options, the tool searches in this order:

  1. the link library of the current cell, for size_cell, get_alternative_lib_cells and report_alternative_lib_cells;
  2. libraries set by link_path_per_instance or set_link_lib_map;
  3. libraries in link_path.

The -⁠base_names option of get_alternative_lib_cells returns base names as strings, not a collection.

20.5  Estimating delay changes before editing

Checking each idea with report_timing costs an incremental timing update. For a quicker look at size_cell and insert_buffer ideas, use estimate_eco. It computes the options from the current timing of one stage: a driving cell plus the net it drives.

The estimate considers, as Figure 26 shows:

  • the incoming transition times;
  • the output loading and fanout loading;
  • detailed parasitics, if present;
  • the driver characteristics of the candidate cells.
What estimate_eco looks at
One stage: input slew, candidate driver, net and loads
What estimate_eco looks at
Figure 26 The estimate re-times just this stage for each candidate cell. It is fast but not exact, so confirm the final choice with report_timing.What to notice: The input transition arrives from the previous stage. It is an input to the estimate, not something the estimate changes.

The estimate is fast but not exact. Use it to explore, and confirm the final choice with report_timing. The steps are:

1. Show the options.

Illustrative output — estimate_eco for sizing
pt_shell> estimate_eco -type size_cell -max -rise CPU2/U93
delay type : max_rise
lib cell           area stage_delay   arrival      slack
---------------------------------------------------------
mylib90/INVD24     21.17     0.0265    0.0265     0.1671
mylib90/INVD20     18.35     0.0291    0.0291     0.1645
mylib90/INVD3       3.53     0.1295    0.1295     0.0212
*mylib90/INVD2      2.82     0.1936    0.1936    -0.0013
mylib90/CKNXD1      2.82     0.4271    0.4271    -0.3214

Each row is an alternative library cell and the timing it would give. An asterisk marks the current cell. Here INVD3 fixes the small violation with little extra area.

2. Estimate the stage delay change for the change you picked.

Illustrative output — estimate_eco for an inverter pair
pt_shell> estimate_eco -type insert_buffer -inverter_pair \
            -max -rise -verbose -lib_cells {INVD2} CPU2/U25/Y
cell name : CPU2/U25
current lib cell: mylib90/INVD1
buffer lib cell : mylib90/INVD2
max_rise                   current      estimate
------------------------------------------------
area                         0.925        1.270
cell delay                   0.371        0.175
output net delay             0.206        0.110
arrival time                 0.371        0.175
slack                        0.304        0.499

3. Commit and verify. When sure, run size_cell or insert_buffer, then update_timing to see the exact result.

The timing update does not include parasitic changes from new placement and routing. Those come only after layout and extraction.

To add columns to the estimate_eco report, set eco_estimation_output_columns. It can add the transition time and the stage maximum fanout. It can also add the stage minimum and maximum transition and capacitance.

20.6  Sizing cells

The size_cell command replaces a cell with another size of the same function. First, list the alternatives:

Illustrative output — alternatives and their slack
pt_shell> get_alternative_lib_cells CPU2/reg318
{"class/FD2P1", "class/FD2P2", "class/FD2P3"}
pt_shell> report_alternative_lib_cells CPU2/reg318
Alternative                     Slack
Library Cells
------------------------------------------
class/FD2P3                      1.88(r)
class/FD2 *                     -1.02(r)
class/FD2P1                     -2.88(r)
class/FD2P2                     -2.98(r)

report_alternative_lib_cells shows the slack at the cell's outputs for each choice. Only class/FD2P3 gives positive slack, so we choose it.

Sizing the cell
pt_shell> size_cell CPU2/reg318 class/FD2P3   ;# replace with the positive-slack size
Information: Sized 'CPU2/reg318' with 'class/FD2P3'
1

20.7  Inserting and removing buffers

The insert_buffer command adds a buffer at one or more pins. The remove_buffer command removes a buffer. Figure 27 shows an example.

Buffering two of three loads
pt_shell> insert_buffer {u3/A u4/A} class/B1I   ;# one buffer drives u3/A and u4/A
Inserting a buffer at two pins
Before and after insert_buffer {u3/A u4/A}
Inserting a buffer at two pins
Figure 27 The new buffer U1 takes its input from net ICLK and drives the new net net1. Load u5/A stays on ICLK.What to notice: u5/A was not listed, so it still hangs directly on ICLK.

The command creates buffer U1 and net net1. The buffer's input is the existing net ICLK, and its output is net1. The prefix of new buffer names comes from eco_instance_name_prefix, which is U by default.

20.8  Editing in the GUI

The PrimeTime GUI has an ECO menu for inserting buffers, removing buffers and sizing cells. ECO in the GUI needs a PrimeTime-ADV-PLUS license. You can undo a change easily, if the menu's undo option is enabled. If you will not use undo, turn it off to save memory.

20.9  dont_use and manual edits

The set_dont_use and set_target_library_subset restrictions apply only to the fix_eco_* commands. They do not stop manual edits, get_alternative_lib_cells or report_alternative_lib_cells. However, the tool warns you when a manual edit uses a restricted cell.

Illustrative output — manual edits with restricted cells
pt_shell> insert_buffer U9/Y slow/HVT_BUFX1
Warning: Library cell 'slow/HVT_BUFX1' is part of a -dont_use subset
specification that applies to cell 'U9'. (NED-076)
Information: Inserted 'U1' at 'U9/Y' with 'slow/HVT_BUFX1'. (NED-046)
pt_shell> size_cell U3 slow/HVT_OR2X2
Warning: Library cell 'slow/HVT_OR2X2' is part of a -dont_use subset
specification that applies to cell 'U3'. (NED-076)
Information: Sized 'U3' with 'slow/HVT_OR2X2'. (NED-045)
Common beginner mistake

A beginner reads NED-076 as an error and assumes nothing changed. The edit was made, as NED-046 or NED-045 confirms. Undo it, or choose an allowed cell, before writing the change list.

20.10  Swapping cells

The swap_cell command replaces the listed cells with a different design or library cell. It is meant for complex or hierarchical cells. A swap always causes a full timing update. For a simple resize, use size_cell, which is much more efficient.

Rules for swap_cell:

  • Before swapping, the tool checks the pins. For every pin of the old cell, the new cell needs a pin with the same name.
  • The command always relinks the replaced part. Do not run link_design afterwards, because it often undoes the swap.
  • The PrimeTime data model is instance based. The swap changes the instance, not the design behind it. Thus, a fresh link reverts to the old design.
  • The tool keeps the swap only until the next link. However, the change list records it, and write_changes exports it.

By default, swap_cell restores the constraints that were on the design before the swap. For many swaps, it is far more efficient to save the constraints first with write_script. Then swap with -⁠dont_preserve_constraints, and source the saved script at the end.

Swapping with a design and with a library cell
pt_shell> read_verilog A.v                                     ;# read design A
pt_shell> current_design TOP                                   ;# go to the top design
pt_shell> swap_cell {u1 u2 u3} A.db:A                          ;# u1-u3 become design A
pt_shell> swap_cell {u1 u2 u3} [get_lib_cells misc_cmos/LC3]   ;# or lib cell LC3

20.11  Renaming cells and nets

The rename_cell and rename_net commands change a name. With hierarchical names, the old and new names must be at the same level. Refer to any cell or net below the current instance by its full hierarchical name.

Illustrative output — renaming
pt_shell> rename_cell cellA cellB
Information: Renamed cell 'cellA' to 'cellB' in design 'blkA'. (NED-008)
1
pt_shell> rename_net [get_nets u1/low/w1] u1/low/netA
Uniquifying 'u1/low' (low) as 'low_0'.
Uniquifying 'u1' (inter) as 'inter_0'.
Information: Renamed net 'w1' to 'netA' in 'blkA/u1/low'. (NED-009)
1

The first command renames a cell in the current instance. The second renames a net lower down. Its blocks have several instances, so they are uniquified first. write_changes writes renames as rename_cell and rename_net commands.

20.12  Functional equivalence of library cells

ECO can replace a cell with a functionally equivalent cell of different area, drive or power. Such a cell has the same logic function, the same number and direction of pins, and the same timing arcs. Two variables relax the matching:

  • eco_strict_pin_name_equivalence, false by default. When false, cells can be sized even if pin names differ. The tool matches pins by other library information.
  • eco_strict_lib_arc_equivalence, true by default. When set to false, cells can be sized even if timing arcs differ. Again, the tool matches by other library information.

Some complex cells need a library cell attribute named user_function_class to describe their function. The foundry can supply function classes, so the right cells are chosen for upsizing.

20.13  Editing the netlist in several scenarios

A manual fix must not hurt timing in any scenario. To check this, edit under DMSA and use merged reports across the scenarios.

  • You can run any number of editing commands, with a changing command focus.
  • You can run editing commands directly at the manager. Complex nested command structures are not supported there.
  • All the commands in the editing table work in DMSA. swap_cell does not work at the manager, but it works through remote_execute.

Through remote_execute, these commands run in the workers and apply to all scenarios in focus:

  • set_coupling_separation — creates a separation constraint on nets in every scenario;
  • remove_coupling_separation — removes it from every scenario;
  • read_parasitics -⁠eco — reads StarRC ECO parasitic files into every scenario.
TakeawayManual edits suit a few late changes. Estimate first with estimate_eco, edit with incremental-friendly commands, verify with update_timing, and write a change list.

21  Worked example: a physically aware ECO on block TOP

Let us run one complete ECO pass on a small routed block named TOP, clocked by CLK. Figure 28 shows its three problems:

  • a setup violation of −0.150 ns from FF1 through U1 and U2 to FF2/D;
  • a hold violation of −0.002 ns (−2 ps) from FF3 to FF4/D;
  • a maximum transition violation on net n5, driven by the weak cell U3.
The worked example: block TOP
Three violations to fix in one ECO pass
The worked example: block TOP
Figure 28 Design TOP with its three problems. All numbers are illustrative.What to notice: The hold violation is only 2 ps, so a load cell is the right tool. A buffer would over-fix it.

Step 1 — Load the design with located parasitics

Step 1 — read, link, constrain, extract, time
pt_shell> read_verilog TOP.v                          ;# netlist written by layout
pt_shell> link_design TOP                             ;# link to the libraries
pt_shell> read_sdc TOP.sdc                            ;# constraints
pt_shell> set_app_var read_parasitics_load_locations true   ;# keep node locations
pt_shell> read_parasitics TOP.spef                    ;# parasitics with locations
pt_shell> set_app_var timing_save_pin_arrival_and_slack true ;# needed by ECO
pt_shell> update_timing                               ;# full timing update

Check: the location variable must be set before read_parasitics. Otherwise the locations are not kept.

Step 2 — See what is failing

Illustrative output — report_constraint -all_violators (shortened)
pt_shell> report_constraint -all_violators
max_transition
  Net          Required   Actual    Slack
  n5             0.200     0.260   -0.060 (VIOLATED)
max_delay/setup ('CLK' group)
  Endpoint     Slack
  FF2/D        -0.150 (VIOLATED)
min_delay/hold ('CLK' group)
  Endpoint     Slack
  FF4/D        -0.002 (VIOLATED)

Check: the list matches Figure 28. Save it, so you can compare after fixing.

Step 3 — Give the tool the layout

Step 3 — physical data and checks
pt_shell> set_app_var eco_allow_filler_cells_as_open_sites true   ;# fillers are free
pt_shell> set_eco_options -physical_tech_lib_path tech.lef \
            -physical_lib_path cells.lef -physical_design_path TOP.def \
            -filler_cell_names {FILL1 FILL2} -log_file lef_def.log   ;# layout data
pt_shell> report_eco_options   ;# confirm what was set
pt_shell> check_eco            ;# look for missing or bad LEF/DEF data

Check: check_eco reports no LEF/DEF problems, and lef_def.log has no errors.

Step 4 — Protect and restrict

Step 4 — what the fixer may not touch
pt_shell> set_dont_use [get_lib_cells */*X0*]   ;# no very weak cells in fixes
pt_shell> set_size_only [get_cells FF3]          ;# FF3 may be sized, never removed
pt_shell> set_app_var eco_report_unfixed_reason_max_endpoints 50   ;# explain failures

Check: report_eco_library_cells marks the banned cells with u.

Step 5 — Fix DRC

Step 5 — transition first
pt_shell> fix_eco_drc -type max_transition \
            -methods {size_cell insert_buffer} -buffer_list {BUFX2 BUFX4} \
            -physical_mode open_site -verbose   ;# only where there is room

Check: report_constraint shows no transition violation on n5. Setup or hold on paths through n5 may have moved, which is expected.

Step 6 — Estimate, then fix setup

Illustrative output — estimate before fixing
pt_shell> fix_eco_timing -type setup -estimate_unfixable_reasons
Information: The design will not be changed.
Information: 1 violating endpoints located... (PTECO-022)
Step 6 — setup fixing
pt_shell> fix_eco_timing -type setup -physical_mode open_site -verbose ;# size first
Illustrative output — fix_eco_timing setup summary
Final ECO Summary:
--------------------------------------------------------
Number of size_cell commands                           2
Total number of commands                               2
Area increased by cell sizing                       1.40
Total area increased                                1.40

Check: report_timing -⁠to FF2/D now shows positive slack. Also check hold, because setup fixing may create hold violations.

Step 7 — Fix hold with a load cell

Step 7 — small hold violations with load cells
pt_shell> fix_eco_timing -type hold -methods insert_buffer \
            -load_cell_list {CLOAD1} -buffer_list {BUFX1 DLY1X2} \
            -physical_mode open_site -verbose   ;# load cells for tiny violations

Check: FF4/D hold slack is now small and positive, and FF2/D setup slack is still positive.

Step 8 — Final leakage recovery

Step 8 — swap to lower-leakage cells where slack allows
pt_shell> fix_eco_power -pattern_priority {HVT NVT LVT}   ;# lowest-power prefix first

Check: compare report_power before and after. No new timing or DRC violations should appear.

Step 9 — Write the change lists and save

Step 9 — hand-off files
pt_shell> write_changes -format icctcl -output top_eco.tcl   ;# for IC Compiler II
pt_shell> write_changes -format eco -output top_eco.chg      ;# for PrimeTime replay
pt_shell> save_session top_after_eco                         ;# keep this state
Illustrative output — top_eco.tcl (part)
size_cell U1 NAND2X2
size_cell U2 INVX2
insert_buffer U3/Y BUFX2 -⁠location {48.6 22.8}
create_cell U_LOAD_CAP_CELL_1 CLOAD1
connect_net n8 [get_pins {U_LOAD_CAP_CELL_1/A}]
set_cell_location -⁠coordinates {61.20 15.60} -⁠orientation N

Check: every new cell in top_eco.tcl has a location.

Step 10 — Close the loop

  1. In IC Compiler II, source top_eco.tcl, then run place_eco_cells, create_stdcell_fillers and route_eco.
  2. Extract with StarRC, using the same settings as before.
  3. Read the new netlist and parasitics into PrimeTime and repeat Steps 1 and 2.

Check: the three violations are gone and no new ones appeared. If a few remain, run another pass, usually with open_site only.

22  Common mistakes and how to catch them

Table 16 Symptoms, causes and fixes
Symptom Likely cause Fix
Fixing works from incomplete timing data timing_save_pin_arrival_and_slack was not set, or no full update followed Set it to true, then run a full update_timing
Physically aware fixes are poor or misplaced Parasitics were read without node locations Set read_parasitics_load_locations before read_parasitics; check the StarRC settings
Many violations come back after layout Logic-only fixing asked for cells where there was no room Use the physically aware mode with open_site
New hold violations after setup fixing Setup fixing may create hold violations Fix setup first, then hold
DRC violations reappear after timing fixing -⁠ignore_drc was used Rerun fix_eco_drc, or avoid -⁠ignore_drc
A banned cell appears in a fix It was banned only for one block, or added by hand Check set_target_library_subset levels; look for NED-076 warnings
Small hold violations become setup violations The smallest buffer adds too much delay Use -⁠load_cell_list for violations of about 5 ps or less
A swap disappears link_design was run after swap_cell Never relink after swap_cell
HyperTrace does not seem to speed things up An unsupported option gives PTECO-116, not PTECO-115 Remove the option, or set the refinement threshold variables
A reduced-resource run passes, but signoff fails The ECO design does not show every violation Always finish with a full-design analysis
Netlist and parasitics do not match The netlist was written after extraction Write the netlist first, save, then extract

23  Interview preparation

Beginner
Q1. What is an ECO in PrimeTime, and which commands fix violations automatically?

An ECO is a small, late change to the design; fix_eco_drc, fix_eco_timing and fix_eco_power make it.

  • The tool sizes cells, replaces cells and inserts or removes buffers.
  • write_changes writes the result for the layout tool.
What is being tested:the basic vocabulary of the ECO flow.
Beginner
Q2. Why must you give -⁠type every time you run fix_eco_timing?

Because setup and hold need opposite changes.

  • Setup fixing reduces data path delay, by default with sizing alone.
  • Hold fixing adds delay, by default with sizing and buffer insertion.
What is being tested:understanding that setup and hold pull in opposite directions.
Beginner
Q3. What is the difference between logic-only and physically aware ECO?

Logic-only uses the netlist and parasitics; physically aware also uses placement data and only changes where there is room.

  • The physically aware change list includes locations.
  • It gives the best QoR and faster convergence.
What is being tested:why layout knowledge matters for buildable fixes.
Beginner
Q4. Which two variables must be set before a physically aware ECO, and when?

timing_save_pin_arrival_and_slack before the timing update, and read_parasitics_load_locations before reading parasitics.

  • The first keeps pin arrivals and slacks for the fixer.
  • The second keeps parasitic node locations.
What is being tested:setup order, which beginners often get wrong.
Intermediate
Q5. In what order should you fix DRC, setup and hold, and why?

DRC, then setup, then hold, with power recovery at the start and a leakage pass at the end.

  • DRC fixing can hurt setup and hold, but timing fixing does not hurt DRC.
  • Hold fixing protects setup, but setup fixing may create hold violations.
What is being tested:knowing which fixer protects which result.
Intermediate
Q6. When would you choose occupied_site over open_site?

Early in the project or on a dense design, when more fixes matter more than small cell moves.

  • occupied_site places cells even with no free sites, so it fixes more but displaces cells more.
  • open_site uses only free sites and suits late ECOs.
What is being tested:matching the physical mode to the project stage.
Intermediate
Q7. How does fix_eco_drc pick nets for crosstalk delta delay fixing?

By SI bottleneck analysis: nets above -⁠delta_delay_threshold on paths with negative slack, by default.

  • There is no delta delay slack, so the threshold is required.
  • -⁠slack_lesser_than widens or narrows the set of paths.
  • report_si_bottleneck previews the targets.
What is being tested:understanding of SI-driven ECO.
Intermediate
Q8. How do you fix a 2 ps hold violation without causing a setup violation?

Insert a load cell with -⁠load_cell_list, because even the smallest buffer may add too much delay.

  • A load cell adds a little capacitance, so a little delay.
  • It is also smaller than a buffer.
What is being tested:practical judgment on tiny hold fixes.
Intermediate
Q9. A fixing run leaves violations unfixed. How do you find out why?

Set eco_report_unfixed_reason_max_endpoints, then use -⁠verbose, -⁠unfixable_reasons_prefix or -⁠estimate_unfixable_reasons.

  • Codes such as I, S, A, T and V point to the next action.
  • The estimate mode changes nothing and runs faster.
What is being tested:debugging skills, not just running commands.
Advanced
Q10. What does -⁠target_violation_type tns allow in clock network fixing?

A clock change may worsen some endpoints to cut total negative slack, within the WNS limit.

  • By default, WNS may not get worse than it is.
  • -⁠wns_limit sets a different limit.
  • It needs a PrimeTime-ADV license.
What is being tested:trade-offs in clock-based fixing.
Advanced
Q11. What is the benefit and the limit of the incremental ECO flow?

Each pass extracts and analyzes only the changes, so it is faster; final signoff still needs a full run.

  • IC Compiler II records changes with record_signoff_eco_changes.
  • PrimeTime restores a session and applies read_eco_changes and read_parasitics -⁠eco.
What is being tested:understanding of fast iteration versus signoff accuracy.
Advanced
Q12. How does the freeze silicon flow avoid new masks for the silicon layers?

It implements every change by wiring spare cells with metal, so only metal and via layers change.

  • Use -⁠physical_mode freeze_silicon and -⁠programmable_spare_cell_names.
  • Programmable spare cells can be wired into several functions, and unused parts stay available.
What is being tested:knowledge of late, low-cost ECO methods.
Advanced
Q13. Why should you not run link_design after swap_cell?

Because the swap changes an instance, not the design, and a relink reverts to the old design.

  • swap_cell relinks the replaced part itself.
  • The change list still records the swap for write_changes.
What is being tested:understanding of the instance-based data model.
Advanced
Q14. Is it safe to leave machine learning on for every fix_eco_power run?

Yes; it can only help runtime, and unmatched data is simply ignored.

  • Coverage of 90% to 100% gives the best speed-up.
  • The QoR is similar with or without it.
What is being tested:judgment about adopting runtime features.

24  Chapter close

Compact glossary

Table 17 ECO flow glossary
Term Meaning
ECO Engineering change order: a small, late change to fix violations or cut power
Change list A script, written by write_changes, that describes every ECO change
Logic-only ECO Fixing with the netlist and parasitics only
Physically aware ECO Fixing that also uses placement data and writes locations
Open site A free placement site; open_site mode uses only these
Occupied site mode A mode that places or resizes cells even when no free site exists
Freeze silicon ECO with metal and via changes only, using spare cells
Programmable spare cell (PSC) A spare cell that can be wired into several functions
Load cell A small cell that adds capacitance, used for tiny hold fixes
Load buffering Inserting a buffer to strengthen a weak driver
Load shielding Inserting a buffer to hide non-critical loads from a critical one
Side-load sizing Downsizing off-path loads, then upsizing the critical path
Delta delay threshold The minimum crosstalk delta delay a net needs to be targeted
TNS / WNS Total of all negative slacks / the single worst slack
Power recovery Downsizing cells or removing buffers where slack allows
Training coverage Share of eligible cells that reuse a learned power decision
Unfixable reason A code that explains why a violation was not fixed
Unusable cell A cell that power recovery could not change, with a reason code
MIM Multiply instantiated module: one design used as several instances
Incremental ECO flow Passes that extract and analyze only the changes
ECO design The reduced design used by the reduced-resource flow
Scenario swapping Hosts taking turns on scenarios when there are fewer hosts than scenarios
Uniquifying Giving an edited copy of a shared block its own design name
HyperTrace A technology that speeds up path-based analysis during fixing

ECO flow on one page

Figure 29 is the summary to redraw from memory.

ECO flow on one page
Four boxes you should be able to redraw
ECO flow on one page
Figure 29 Setup, the fixing order, the hand-off loop, and the special flows and tools.What to notice: Each box ends with the one rule people most often forget.

Where the next chapter goes, and why

You can now find violations, fix them with the ECO commands and hand the changes to layout. Every fix so far changed a netlist that already existed. However, many timing problems are cheaper to prevent earlier, while the netlist is still being made.

The Using PrimeTime With Design Compiler chapter looks at that earlier stage. Design Compiler is the synthesis tool that makes the netlist. The chapter shows where the two tools time paths differently, how to share scripts between them, and how path groups compare. Thus, synthesis and signoff agree more closely, and fewer violations reach the ECO loop.