原创 [转]pt修hold的脚本

2011-3-20 16:12 5100 3 3 分类: 消费电子

版权声明:转载时请以超链接形式标明文章原始出处和作者信息及本声明
http://bb2hh.blogbus.com/logs/62833291.html

pr后的网表里面有很多hold violation。用pt来修了下,然后做eco pr。

脚本如下:内容很简单
proc sta_fix_hold { {buf_lst {BUFX2 BUFX4 BUFX6 BUFX8 BUFX16 BUFX20 DLY1X1 DLY1X4 DLY2X1 DLY2X4 DLY4X1 DLY4X4}} {fmt astro} } {
  redirect -file tmp_hold_vio.rpt {report_timing -start_end_pair -path_type end -delay min -nosplit}
  set f [open tmp_hold_vio.rpt r]
  while {![eof $f]} {
   gets $f line
   set end_path [lindex $line 0]
   if { [string compare $end_path ""] && ![regexp {^Endpoint} $end_path] && ![regexp {^---} $end_path] } {
     puts "###fix hold violation###current hold violated end point =============> $end_path"
     fix_eco_timing -type hold -to $end_path -buffer_list $buf_lst
   }
  }
  close $f
  if {$fmt == "astro"} {
    write_astro_changes -format scheme  eco_fix_hold.cmd
  } else {
    write_changes -format icctcl -output  eco_fix_hold.tcl
  }
}

过程如下:

一些hold的violation:

****************************************
Report : timing
    -path_type end
    -delay_type min
    -slack_lesser_than 0.00
    -start_end_pair
Design : CMMB_TOP_PAD
Version: C-2009.06
Date   : Fri Apr 30 11:02:02 2010
****************************************

Endpoint                        Path Delay        Path Required    Slack
u_CMMB_TOP/ARM_SYS_inst/NMI_INTR_inst/r_reg_NMI_EXT_N_D1_0/D (SDFFTRX1)     5.55 r     6.18    -0.63
u_CMMB_TOP/ARM_SYS_inst/NORFCTRL_inst/r_FLASH_RY_reg0_reg/D (SDFFQX1)     5.31 r     6.19    -0.88
u_CMMB_TOP/ARM_SYS_inst/U_TIMER01/r_reg_T0_Q1_0/D (SDFFTRX1)     5.54 r     6.18    -0.64
u_CMMB_TOP/CMMB_SYS_inst/WRAP_GMAC_inst/reg_I_P1_RCV_DATA4_in_reg/D (SDFFHQX4)     2.83 f     2.91    -0.08

运行上面的函数之后,timing如下:

****************************************
Report : timing
    -path_type end
    -delay_type min
    -max_paths 1
Design : CMMB_TOP_PAD
Version: C-2009.06
Date   : Fri Apr 30 11:26:46 2010
****************************************

Endpoint                        Path Delay        Path Required    Slack
------------------------------------------------------------------------
u_CMMB_TOP/ARM_SYS_inst/NMI_INTR_inst/r_reg_NMI_EXT_N_D1_0/D (SDFFTRX1)     6.41 r     6.18     0.23
u_CMMB_TOP/ARM_SYS_inst/NMI_INTR_inst/r_reg_NMI_EXT_N_D1_0/D (SDFFTRX1)     6.02 r     5.86     0.15
u_CMMB_TOP/ARM_SYS_inst/NMI_INTR_inst/r_reg_NMI_EXT_N_D1_0/D (SDFFTRX1)     6.33 r     6.18     0.15

****************************************
Report : timing
    -path_type end
    -delay_type min
    -max_paths 1
Design : CMMB_TOP_PAD
Version: C-2009.06
Date   : Fri Apr 30 11:27:34 2010
****************************************

Endpoint                        Path Delay        Path Required    Slack
------------------------------------------------------------------------
u_CMMB_TOP/ARM_SYS_inst/NORFCTRL_inst/r_FLASH_RY_reg0_reg/D (SDFFQX1)     6.24 r     6.19     0.05

****************************************
Report : timing
    -path_type end
    -delay_type min
    -max_paths 1
Design : CMMB_TOP_PAD
Version: C-2009.06
Date   : Fri Apr 30 11:27:59 2010
****************************************

Endpoint                        Path Delay        Path Required    Slack
------------------------------------------------------------------------
u_CMMB_TOP/ARM_SYS_inst/U_TIMER01/r_reg_T0_Q1_0/D (SDFFTRX1)     6.40 r     6.18     0.22

****************************************
Report : timing
    -path_type end
    -delay_type min
    -max_paths 1
Design : CMMB_TOP_PAD
Version: C-2009.06
Date   : Fri Apr 30 11:28:26 2010
****************************************

Endpoint                        Path Delay        Path Required    Slack
------------------------------------------------------------------------
u_CMMB_TOP/CMMB_SYS_inst/WRAP_GMAC_inst/reg_I_P1_RCV_DATA4_in_reg/D (SDFFHQX4)     2.97 f     2.92     0.04

顺便把修setup和根据文件修setup,hold的脚本贴出。

proc sta_fix_setup {{fmt astro} {slk -0.1} } {
  redirect -file tmp_setup_vio.rpt {report_timing -start_end_pair -path_type end -delay max -nosplit}
  set f [open tmp_setup_vio.rpt r]
  while {![eof $f]} {
   gets $f line
   set end_path [lindex $line 0]
   set slack    [lindex $line 5]
   if { [string compare $end_path ""] && ![regexp {^Date} $end_path] && ![regexp {^Endpoint} $end_path] && ![regexp {^---} $end_path] && $slack > $slk } {
     puts "###fix setup violation###current setup violated end point =============> $end_path"
     fix_eco_timing -type setup -verbose  -to $end_path
   }
  }
  close $f
  if {$fmt == "astro"} {
    write_astro_changes -format scheme  eco_fix_setup.cmd
  } else {
    write_changes -format icctcl -output  eco_fix_setup.tcl
  }
}

proc sta_fix_hold { {buf_lst {BUFX2 BUFX4 BUFX6 BUFX8 BUFX16 BUFX20 DLY1X1 DLY1X4 DLY2X1 DLY2X4 DLY4X1 DLY4X4}} {fmt astro} {slk -0.1} } {
  redirect -file tmp_hold_vio.rpt {report_timing -start_end_pair -path_type end -delay min -nosplit}
  set f [open tmp_hold_vio.rpt r]
  while {![eof $f]} {
   gets $f line
   set end_path [lindex $line 0]
   set slack    [lindex $line 5]
   if { [string compare $end_path ""] && ![regexp {^Date} $end_path] && ![regexp {^Endpoint} $end_path] && ![regexp {^---} $end_path] && $slack > $slk } {
     puts "###fix hold violation###current hold violated end point =============> $end_path"
     fix_eco_timing -type hold -to $end_path -buffer_list $buf_lst
   }
  }
  close $f
  if {$fmt == "astro"} {
    write_astro_changes -format scheme  eco_fix_hold.cmd
  } else {
    write_changes -format icctcl -output  eco_fix_hold.tcl
  }
}

proc sta_fix_setup_file {file_name} {
  set f [open $file_name r]
  while {![eof $f]} {
   gets $f line
   set end_path [lindex $line 0]
   if { [string compare $end_path ""] && ![regexp {^Date} $end_path] && ![regexp {^Endpoint} $end_path] && ![regexp {^---} $end_path]} {
     puts "###fix setup violation###current setup violated end point =============> $end_path"
     fix_eco_timing -type setup -verbose  -to $end_path
   }
  }
  close $f
}

proc sta_fix_hold_file {file_name} {
  set buf_lst  {BUFX2 BUFX4 BUFX6 BUFX8 BUFX16 BUFX20 DLY1X1 DLY1X4 DLY2X1 DLY2X4 DLY4X1 DLY4X4}
  set f [open $file_name r]
  while {![eof $f]} {
   gets $f line
   set end_path [lindex $line 0]
   if { [string compare $end_path ""] && ![regexp {^Date} $end_path] && ![regexp {^Endpoint} $end_path] && ![regexp {^---} $end_path]} {
     puts "###fix setup violation###current setup violated end point =============> $end_path"
     fix_eco_timing -type hold -to $end_path -buffer_list $buf_lst
   }
  }
  close $f
}
PARTNER CONTENT

文章评论0条评论)

登录后参与讨论
EE直播间
更多
我要评论
0
3
关闭 站长推荐上一条 /3 下一条