用户工具

站点工具


vlsi:icc:report-track-utilization

Script to Report the Utilization of Each Metal Track in ICC

Description

To report the utilization of each track (how much of the track is filled with routes) in a specified metal layer, along with its starting coordinates, use the track_route_utilization_in_design Tcl procedure, which is defined in thetrack_route_util.tcl script. The starting location of a vertical track is calculated with respect to the lower design boundary. The starting location of a horizontal track is calculated with respect to the left design boundary.

The input to the track_route_utilization_in_design procedure is the routing layer name as specified in the technology file.

This procedure has the following limitations:

  • The pitch of the metal layer must be constant.
  • Rectilinear portions of the design are not properly captured in this version of the script.

You can use this script to further optimize the design based on the routing resources available after power and clock routing. Assume that at the early stage of the design, you allocate the middle two layers (for example, M3 and M4) for clock routing, and the top three layers (for example, M7, M8, and M9) for power routing. After performing power and clock routing, you run this script to see what the available routing resources are on these layers and see that there are many unused tracks on M4 and M7. This means that you might be able to further optimize the design by restricting clock routing the M3 and power routing to M8 and M9. The ability to determine the routing utilization of each track on a layer allows you to plan properly, so you can allocate more routing resources to signal nets to avoid congestion and reduce DRC violations, which is especially important in congestion-critical designs.

Usage

icc_shell> source track_route_per.tcl
icc_shell> track_route_utilization_in_design M3

Logs

START TIME Fri May 23 02:24:41 2014
Total number of horizontal tracks is 2569
Total route utilization of all horizontal metal M3 tracks in the design is 17.385601319 percent
To see the route utilization of each horizontal track of metal M3 in the design, open the file track_route_per.rpt 
END TIME Fri May 23 02:26:02 2014
The track_route_per.rpt file provides detailed numbers for each track on the specified layer, as shown in the following example:

The route utilization of horizontal track 498 starting at (0 ,151.36) is 7.78322749818 percent.
The route utilization of horizontal track 499 starting at (0 ,151.664) is 7.71095946672 percent.
The route utilization of horizontal track 500 starting at (0 ,151.968) is 8.90101254226 percent.
The route utilization of horizontal track 501 starting at (0 ,152.272) is 6.06143177582 percent.
The route utilization of horizontal track 502 starting at (0 ,152.576) is 27.1682383976 percent.
The route utilization of horizontal track 503 starting at (0 ,152.88) is 34.6914194547 percent.
The route utilization of horizontal track 504 starting at (0 ,153.184) is 30.760907339 percent.
Note that if the utilization for a track is 0.00, it means that the track is not used.

Scripts

###################################################################################
# ?2014 Synopsys, Inc.  All rights reserved.             
#                                                                  
# This script is proprietary and confidential information of        
# Synopsys, Inc. and may be used and disclosed only as authorized   
# per your agreement with Synopsys, Inc. controlling such use and   
# disclosure.                                                       
#             
###################################################################################
# Script to report the utilization of each metal track in the specified metal layer
###################################################################################
# Description: This script reports the utilization of each track (how much of the
#    track is filled with routes) in the specified metal layer, along with its 
#    starting coordinates
# The input to the track_route_utilization_in_design procedure is the routing 
#    layer name as specified in the technology file
# Limitation 1: The pitch of the metal layer must be constant
# Limitation 2: Rectilinear portions of the design are not properly captured 
#    in this version of the script.
# Note 1: The starting location of a vertical track is calculated with respect to
#    the lower design boundary. The starting location of a horizontal track is 
#    calculated with respect to the left design boundary
# Note 2: If a track's utilization is 0.00, it is not used
#
#########################################################################
#
# VERSION : 1
#
###########################################################################
#
# Usage:
#
# icc_shell> source track_route_util.tcl
# icc_shell> track_route_utilization_in_design M3
#
# Output
# START TIME Fri May 23 02:24:41 2014
# Total number of horizontal tracks is 2569
# Total route utilization of all horizontal metal M3 tracks in the design is 17.385601319 percent
# To see the route utilization of each horizontal track of metal M3 in the design, open the file track_route_util.rpt 
# END TIME Fri May 23 02:26:02 2014
#
# The generated track_route_util.rpt file provides the detailed numbers, as shown
# in the following example:
#
# The route utilization of horizontal track 498 starting at (0 ,151.36) is 7.78322749818 percent.
# The route utilization of horizontal track 499 starting at (0 ,151.664) is 7.71095946672 percent.
# The route utilization of horizontal track 500 starting at (0 ,151.968) is 8.90101254226 percent.
# The route utilization of horizontal track 501 starting at (0 ,152.272) is 6.06143177582 percent.
# The route utilization of horizontal track 502 starting at (0 ,152.576) is 27.1682383976 percent.
# The route utilization of horizontal track 503 starting at (0 ,152.88) is 34.6914194547 percent.
# The route utilization of horizontal track 504 starting at (0 ,153.184) is 30.760907339 percent.
#
######################################################################################################
 
 
#####################################################################
#Proc to calculate the route utilization of a  vertical track
proc util_cal_v { llx lly urx ury metal_name } {
  set nt_sp_len 0
  set box1 [split [get_attribute [ get_die_area ] bbox] "{ }" ]
  #set h_trk_len [lindex $box1 5]
  set v_trk_len [lindex $box1 6]
  set ab [sizeof_collection [get_net_shapes -quiet -intersect "$llx $lly $urx $ury" -filter "layer_name==$metal_name"]]
  if { $ab != 0 } {
    set nt_sp [get_net_shapes -quiet -intersect "$llx $lly $urx $ury" -filter "layer_name==$metal_name"]
    set nt_sp_lst [collection_to_list -name_only -no_braces $nt_sp]
    foreach nt $nt_sp_lst {
      set h_v [string index $nt 0]
      if {$h_v == "V"} {
        set nt_sp_len [expr $nt_sp_len + [get_attribute [get_net_shapes $nt] length]]
      } else {
        set nt_sp_len [expr $nt_sp_len + [get_attribute [get_net_shapes $nt] width]]
      }
    }
    set ut_v [expr $nt_sp_len / $v_trk_len]
  } else {
    set ut_v 0.00
  }
  return $ut_v
}
 
###############################################################3
#Proc to calculate the route utilization of a  horizontal track
proc util_cal_h { llx lly urx ury metal_name } {
  set nt_sp_len 0
  set box1 [split [get_attribute [ get_die_area ] bbox] "{ }" ]
  set h_trk_len [lindex $box1 5]
  #set v_trk_len [lindex $box1 6]
  set ab [sizeof_collection [get_net_shapes -quiet -intersect "$llx $lly $urx $ury" -filter "layer_name==$metal_name"]]
  if { $ab != 0 } {
    set nt_sp [get_net_shapes -quiet -intersect "$llx $lly $urx $ury" -filter "layer_name==$metal_name"]
    set nt_sp_lst [collection_to_list -name_only -no_braces $nt_sp]
    foreach nt $nt_sp_lst {
      set h_v [string index $nt 0]
      if {$h_v == "H"} {
        set nt_sp_len [expr $nt_sp_len + [get_attribute [get_net_shapes $nt] length]]
      } else {
        set nt_sp_len [expr $nt_sp_len + [get_attribute [get_net_shapes $nt] width]]
      }
    }
    set ut_h [expr $nt_sp_len / $h_trk_len]
  } else {
    set ut_h 0.00
  }
return $ut_h
}
 
######################################################################################
#Proc to calculate the start location of each track
proc track_route_utilization_in_design { metal_name } {
  echo  "START TIME [date]"
  set fp [ open "track_route_util.rpt" "w" ]
  set pitch [get_attribute [get_layers $metal_name] pitch]
  set box [split [get_attribute [ get_die_area ] bbox] "{ }" ]
  set wdth [lindex $box 5]
  set ht [lindex $box 6]
  if {[get_attribute [get_layers $metal_name] preferred_direction] == "vertical"} {
    set trk_v_off 0.0
    set tck [get_tracks -filter "layer==$metal_name && direction==vertical"]
    set trk_v_off1 [lindex [get_attribute -class track $tck start] 0]
    foreach p $trk_v_off1 {
      if {$p != 0} {
        set trk_v_off $p 
      }
    }
    set ver_trk_ref 0
    set cnt_v 0
    set design_util_v 0
    while { $ver_trk_ref < $wdth } {
      if { $cnt_v == 0 } {
        set ver_trk_ref [expr $ver_trk_ref + $trk_v_off]
        incr cnt_v
        #set ab [sizeof_collection [get_net_shapes -quiet -intersect "$ver_trk_ref 0 $ver_trk_ref $ht" -filter "layer_name==$metal_name"]]
        set v_trk_util [ util_cal_v $ver_trk_ref 0 $ver_trk_ref $ht $metal_name ]
        set design_util_v [ expr $design_util_v + $v_trk_util ]
        puts $fp "The route utilization of the vertical track $cnt_v starting at ($ver_trk_ref , 0) is [ expr $v_trk_util * 100 ] percent."
      } else {
        set ver_trk_ref [expr $ver_trk_ref + $pitch]
        incr cnt_v
        set v_trk_util [ util_cal_v $ver_trk_ref 0 $ver_trk_ref $ht $metal_name ]
        set design_util_v [ expr $design_util_v + $v_trk_util ]
        puts $fp "The route utilization of vertical track $cnt_v starting at ($ver_trk_ref , 0) is [ expr $v_trk_util * 100 ] percent."
      }
    }
    puts "Total number of vertical tracks is $cnt_v"
    puts "Total route utilization of all vertical metal $metal_name tracks in the design is [ expr [ expr $design_util_v / $cnt_v ] * 100 ] percent"
    puts "To see the route utilization of each vertical track of metal $metal_name in the design, open the file track_route_util.rpt "
  } else {
    set tck [get_tracks -filter "layer==$metal_name && direction==horizontal"]
    set trk_h_off 0.0
    set trk_h_off1 [lindex [get_attribute -class track $tck start] 1]
    foreach p $trk_h_off1 {
      if {$p != 0} {
        set trk_h_off $p 
      }
    }
    set hor_trk_ref 0
    set cnt_h 0
    set design_util_h 0
    while {$hor_trk_ref < $ht} {
      if {$cnt_h == 0} {
        set hor_trk_ref [expr $hor_trk_ref + $trk_h_off]
        incr cnt_h
        #set ab [sizeof_collection [get_net_shapes -quiet -intersect "$ver_trk_ref 0 $ver_trk_ref $ht" -filter "layer_name==$metal_name"]]
        set h_trk_util [ util_cal_h  0 $hor_trk_ref $wdth $hor_trk_ref $metal_name ]
        set design_util_h [ expr $design_util_h + $h_trk_util ]
        puts $fp "The route utilization of horizontal track $cnt_h starting at (0 ,$hor_trk_ref) is [ expr $h_trk_util * 100 ] percent."
      } else {
        set hor_trk_ref [expr $hor_trk_ref + $pitch]
        incr cnt_h
        set h_trk_util [ util_cal_h 0 $hor_trk_ref $wdth $hor_trk_ref $metal_name  ]
        set design_util_h [ expr $design_util_h + $h_trk_util ]
        puts $fp "The route utilization of horizontal track $cnt_h starting at (0 ,$hor_trk_ref) is [ expr $h_trk_util * 100 ] percent."
      }
    }
puts "Total number of horizontal tracks is $cnt_h"
puts "Total route utilization of all horizontal metal $metal_name tracks in the design is [ expr [ expr $design_util_h / $cnt_h ] * 100 ] percent"
puts "To see the route utilization of each horizontal track of metal $metal_name in the design, open the file track_route_util.rpt "
}
close $fp
echo "END TIME [date]" 
}
define_proc_attributes track_route_utilization_in_design -info "Script to report the route utilization of each metal track."
vlsi/icc/report-track-utilization.txt · 最后更改: 2014/08/26 08:16 (外部编辑)