Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
11 views

A Structured Approach To Instance Cell Resizing Using CUI TCL Procedures

tempus rm script

Uploaded by

thsim85
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views

A Structured Approach To Instance Cell Resizing Using CUI TCL Procedures

tempus rm script

Uploaded by

thsim85
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

A structured approach to instance cell resizing using CUI Tcl procedures

Explanation of Script
In many situations, physical implementation designers need to modify cells of a design. For example:

During netlist hand-off:


The netlist contains don’t use cells
The netlist contains cells with driving capability too high or too low
The clock cells are not of the correct type/library
Special structures need the use of specific cells (like delay line, synch cells, and so on)
During design closure:

Some cells may be found problematic for DRC or timing


Avoid weak or delay cells on critical paths
Use the same cell threshold for paths that are critical for both setup and hold
Use high-speed cells only on a few specific timing paths
A structured approach is proposed here with a focus on usability and versatility. A Tcl package (attached) provides all procedures and attributes for this activity.

The flow consists of the following three steps:

Define library rules to be used for resizing (for example, LVT to SVT)

Identify cells to be resized (from the timing path or other criteria)

Apply the cell resizing (update_timing required after this step)

Note that the procedures do not update the placement or routing after the design ECOs and additional steps may be needed (depending on the state of the design). For
example:

place_detail -eco
route_eco

Step 1: Define library cell rules to be used during resizing.

Commands:

define_lib_size_rules: Defines rules for cell sizing.


read_lib_size_rules: Read size rules from a file.
report_lib_size_rules: Reports currently defined rules.
reset_lib_size_rules: Resets all the defined rules.
write_lib_size_rules: Writes rules to a file.

It is a one-to-one mapping, one cell can be mapped only to another single cell.

Step 2: Identify the instances to be resized.

The list of instances being resized can be shown and eventually, some of them can be reset.

Commands:

analyze_path_for_sizing: Analyzes size cells in the timing paths.


report_sizing_cells: Report sizing candidates.
reset_sizing_cells: Reset sizing candidates.

You can repeat this step many times before proceeding with the actual cell sizing.

Step 3: Apply the planned modifications, it actually runs the eco_update_cell Innovus command.

Commands:

apply_sizing_cells: Apply eco_update_cell on sizing candidates.

After this command, the timing graph needs to be updated.

Snapshots

A snapshot mechanism is also provided to save the current instance cell type. A snapshot can be restored any moment. Especially during interactive eco, by using the
snapshot, you can quickly “undo” modifications and go back to a previous good status.

Snapshot commands are:

create_size_snapshot: Create a snapshot and save current instances base_cell type.


delete_size_snapshot: Remove an existing snapshot.
restore_size_snapshot: Restore instances base_cell form previously saved snapshot.
write_size_snapshot_script: Write script with modifications from one snapshot to another.

The define_lib_size_rules command gives a lot of versatility to define cell mapping rules.

The incremental option allows applying multiple name substitutions.

Here is one example:

define_lib_size_rules -objects [get_db base_cell:BUFX8HVT ] -match HVT -substitute LVT


BUFX8HVT -> BUFX8LVT
define_lib_size_rules -objects [get_db base_cell:BUFX8HVT ] -match BUF -substitute CLKBUF \
-incremental
BUFX8HVT -> CLKBUFX8LVT

For more flexibility, you can define an external text file with a specific cell mapping and import it.

The file format is (one cell pair for each line):

<old cell name> <new cell name>


For example:

define_lib_size_rules -objects …
define_lib_size_rules -objects … -incremental
write_lib_size_rule -out_file my.rule
<< edit the my.rule file >>
reset_lib_size_rules
read_lib_size_rule -in_file my.rule

The package has been tested on Innovus 20.1 and Tempus 20.1.

The attached tar file contains Tcl packages(s).

Usage
The following example shows the use model:

# Load the TCL package(s)


lappend auto_path <DIR>/msg
lappend auto_path <DIR>/stylus_size
package require stylus_size
# Mandatory setting to run the eco.
set_db eco_refine_place false
set_db eco_update_timing false
# Create an initial snapshot (backup initial cell types)
create_size_snapshot -snapshot initial -description initial
# ////////////////////////////////////////////
# 1. Convert all the clock cells to # cell of type CLK*
# ////////////////////////////////////////////
# Define cell rule
define_lib_size_rules -objects [get_db base_cells * -if { .name != CLK* } ] -match {^} -substitute CLK
define_lib_size_rules -objects [get_db base_cells *HVT ] -match HVT -substitute LVT -incremental
define_lib_size_rules -objects [get_db base_cells -if { .name != *LVT && .name != *HVT } ] -match {$} -substitute LVT -
incremental

report_lib_size_rules
# example output for the first rule:
BUFX12 CLKBUFX12
BUFX16 CLKBUFX16
...
INVX12 CLKINVX12
...

# Change instance of pins driving a clock net


report_timing ; # to populate .net.is_clock attribute
analyze_path_for_sizing -objects [get_db pins -if { .direction == out && .net.is_clock } ] ; # pins driving clock nets
apply_sizing_cells

# Create an intermediate snapshot (backup after changing clock cell types)


create_size_snapshot -snapshot clock -description { corrected clock cell types }

# //////////////////////////////////////
# 2. Remove forbidden cells
# driving strength X20 not allowed
# /////////////////////////////////////
define_lib_size_rules -objects [get_db base_cells *X20* ] -match X20 -substitute X1
report_lib_size_rules
analyze_path_for_sizing -objects [get_db insts ] ; # all instances
apply_sizing_cells

# Create an intermediate snapshot (backup after removing forbidden )


create_size_snapshot -snapshot dont_use -description { swapped dont use cells }

# //////////////////////////////////////
# 3. Remove weak cells from critical
# paths
# //////////////////////////////////////
reset_lib_size_rules
define_lib_size_rules -objects [get_db base_cells -if { .name==*XL || .name==*XLLVT || .name==*XLHVT } ] -match XL -subs
define_lib_size_rules -objects [get_db base_cells -if { .name==*X1 || .name==*X1LVT || .name==*X1HVT } ] -match X1 -subs
report_lib_size_rules

analyze_path_for_sizing -objects [report_timing -max_paths 100000 -nworst 100 -max_slack 0.5 -collection ] ; # instances
apply_sizing_cells

# Create an intermediate snapshot (backup after removing forbidden )


create_size_snapshot -snapshot weak_cells -description { avoid weak cells on critical paths }

# //////////////////////////////////////
# Optionally write a script to rerun
# any step of the eco
# //////////////////////////////////////
write_size_snapshot_script -from_snapshot initial -to_snapshot clock -out_file clock.tcl
write_size_snapshot_script -from_snapshot initial -to_snapshot weak_cells -out_file all.tcl

# //////////////////////////////////////

Internally, the package runs eco_update_cell, which will honor any eco_* root attribute settings. For example:

eco_batch_mode(root)
eco_check_logical_equivalence
eco_honor_dont_touch
eco_honor_dont_use
eco_honor_fixed_status
eco_honor_fixed_wires

The following settings should be set to false before applying design modifications:
set_db eco_refine_place false
set_db eco_update_timing false

Depending on the design stage (pre-place, pre-route, post-route) and the type of resize (footprint compatible vs. up-size/down-size), you may need to run
the place_detail -eco and route_eco commands after the ECO activity.

Code
Download and untar the attachment, and follow the instructions in the script explanation section to point to and load the Tcl package.

Internal Notes
None
Return to the top of the page

You might also like