数字IC后端实现Innovus中使用report_property可以报告出各种各样object的属性,主要有cell,net,PG Net,Pin,时钟clock,时序库lib属性,Design属性,timing path,timin arc等属性。
在数字IC后端实现中我们写自动化脚本经常会使用这个命令来获取相关object的各种属性。因此很有必要向大家分享下report_property,get_property以及它们在实际项目中的应用。
数字IC后端笔试面试必备 | 低功耗设计实现十大灵魂拷问
report_property属性" />
数字后端零基础入门系列 | Innovus零基础LAB学习Day10
report_property和get_property不同之处是它可以获取object对象的所有属性。
数字IC后端实现之Innovus Place跑完density爆涨案例分析
1)报告具体instance的所有属性property
report_property [get_cells u_cortexa7/u_cortexa7l2/u_cortexa7l2noram/u_ca7scu/U43987]
2)报告具体net的所有attribute
report_property [get_nets u_cortexa7/u_cortexa7l2/u_cortexa7l2noram/u_ca7scu/FE_OFN148398_n86644 ]
通过report_property我们可以快速知道对应object对象的所有属性,这样我们可以通过get_property来获取object相关属性具体的值。
比如我们可以通过下面的命令来快速获取某条net的driver pin。
innovus 183> get_property [get_nets u_cortexa7/u_cortexa7l2/u_cortexa7l2noram/u_ca7scu/FE_OFN148398_n86644 ] driver_pins
u_cortexa7/u_cortexa7l2/u_cortexa7l2noram/u_ca7scu/FE_OFC58904_n86644/ZN
innovus 184> get_object_name [get_property [get_nets u_cortexa7/u_cortexa7l2/u_cortexa7l2noram/u_ca7scu/FE_OFN148398_n86644 ] driver_pins]
u_cortexa7/u_cortexa7l2/u_cortexa7l2noram/u_ca7scu/FE_OFC58904_n86644/ZN
PS: 如果获取到的对象是指针,我们还可以通过get_object_name来获取指针对应的object名字。
3)获取pg net所有属性
report_property [get_pg_nets -of_objects u_cortexa7/u_cortexa7l2/u_cortexa7l2noram/u_ca7scu/U43987]
report_property使用方法" />
4)报告lib cell相关属性
report_property [get_lib_cells -of_objects u_cortexa7/u_cortexa7l2/u_cortexa7l2noram/u_ca7scu/U43987]
比如获取具体instance对应lib cell的pin数量和lib中std_cell_main_rail_name属性。
innovus 207> get_property [get_lib_cells -of_objects CTS_ccl_inv_02172 ] pin_count 2
innovus 211> get_lib_cells -of_objects u_cortexa7/u_cortexa7l2/u_cortexa7l2noram/u_ca7scu/U43987
tcbn28hpcplusbwp40p140ssg0p81v125c_ccs/AN2D2BWP40P1400xd9e9
innovus 212> get_property [get_lib_cells -of_objects u_cortexa7/u_cortexa7l2/u_cortexa7l2noram/u_ca7scu/U43987] std_cell_main_rail_name
NA
5)报告具体instance所有timing arc
innovus 216> get_lib_arcs -of_objects [get_lib_cells tcbn28hpcplusbwp40p140ssg0p81v125c_ccs/AN2D2BWP40P140] 0xd9f4
report_property [ get_lib_arcs -of_objects [get_lib_cells tcbn28hpcplusbwp40p140ssg0p81v125c_ccs/AN2D2BWP40P140]]
innovus 223> get_property [get_lib_arcs -of_objects [get_lib_cells
tcbn28hpcplusbwp40p140ssg0p81v125c_ccs/AN2D2BWP40P140]] from_lib_pin
tcbn28hpcplusbwp40p140ssg0p81v125c_ccs/AN2D2BWP40P140/A1
tcbn28hpcplusbwp40p140ssg0p81v125c_ccs/AN2D2BWP40P140/A2
0xda10
innovus 224> get_property [get_lib_arcs -of_objects [get_lib_cells tcbn28hpcplusbwp40p140ssg0p81v125c_ccs/AN2D2BWP40P140]] to_lib_pin
tcbn28hpcplusbwp40p140ssg0p81v125c_ccs/AN2D2BWP40P140/Z tcbn28hpcplusbwp40p140ssg0p81v125c_ccs/AN2D2BWP40P140/Z0xda15
6)报告timing path相关cell,pin属性
innovus 226> **set path [report_timing -to u_cortexa7/u_cortexa7l2/u_cortexa7l2noram/u_ca7scu/g_cpu_0__u_cpuslv_u_dw_dw_data_buff_reg_0__10_/D -collection ]
0xda17**
innovus 227> foreach_in_collection path1 $path {set points [get_property $path1 timing_points]}
innovus 228> puts $points
0xda1a
下面通过get_property来获取timing path上各个pin。当然我们还可以改装成获取timing path上的所有instance和对应的cell name。
咱们社区低功耗四核A7Top对common clock path做clock shielding就是先抓出这条clock path上的所有pin,然后对每一段clock net设置net attribute完成ndr和shielding的处理。
innovus 230> get_property $points pinpd_a7_0_dwn_clamp_n
u_cortexa7/FE_OFC15517_pd_a7_0_dwn_clamp_n/I u_cortexa7/FE_OFC15517_pd_a7_0_dwn_clamp_n/ZN u_cortexa7/FE_OCPC17521_FE_OFN146884_n/I u_cortexa7/FE_OCPC17521_FE_OFN146884_n/ZN u_cortexa7/FE_OCPC17522_FE_OFN146884_n/I u_cortexa7/FE_OCPC17522_FE_OFN146884_n/ZN u_cortexa7/FE_OCPC17523_FE_OFN146884_n/I u_cortexa7/FE_OCPC17523_FE_OFN146884_n/ZN u_cortexa7/FE_OCPC17529_FE_OFN114_FE_DBTN0_pd_a7_0_dwn_clamp_n/I u_cortexa7/FE_OCPC17529_FE_OFN114_FE_DBTN0_pd_a7_0_dwn_clamp_n/ZN u_cortexa7/FE_OCPC17530_FE_OFN114_FE_DBTN0_pd_a7_0_dwn_clamp_n/I u_cortexa7/FE_OCPC17530_FE_OFN114_FE_DBTN0_pd_a7_0_dwn_clamp_n/ZN u_cortexa7/FE_OCPC17531_FE_OFN114_FE_DBTN0_pd_a7_0_dwn_clamp_n/I u_cortexa7/FE_OCPC17531_FE_OFN114_FE_DBTN0_pd_a7_0_dwn_clamp_n/ZN u_cortexa7/FE_OCPC17532_FE_OFN114_FE_DBTN0_pd_a7_0_dwn_clamp_n/I u_cortexa7/FE_OCPC17532_FE_OFN114_FE_DBTN0_pd_a7_0_dwn_clamp_n/ZN u_cortexa7/FE_OFC39_pd_a7_0_dwn_clamp_n/I u_cortexa7/FE_OFC39_pd_a7_0_dwn_clamp_n/ZN u_cortexa7/FE_OFC13540_FE_OCPN156551/I u_cortexa7/FE_OFC13540_FE_OCPN156551/Z u_cortexa7/FE_OCPC17888_FE_OFN158805_n/I u_cortexa7/FE_OCPC17888_FE_OFN158805_n/ZN u_cortexa7/FE_OCPC18349_FE_OFN161153_n/I u_cortexa7/FE_OCPC18349_FE_OFN161153_n/ZN u_cortexa7/FE_OCPC18350_FE_OFN161153_n/I u_cortexa7/FE_OCPC18350_FE_OFN161153_n/Z u_cortexa7/snps_CPU0__CPU02MP_LOW_snps_biu_dw_data_o_10__UPF_ISO/ISO u_cortexa7/snps_CPU0__CPU02MP_LOW_snps_biu_dw_data_o_10__UPF_ISO/Z u_cortexa7/FE_OCPC97807_biu_cpu0_dw_data_10/I u_cortexa7/FE_OCPC97807_biu_cpu0_dw_data_10/Z u_cortexa7/u_cortexa7l2/u_cortexa7l2noram/u_ca7scu/g_cpu_0__u_cpuslv_u_dw_dw_data_buff_reg_0__10_/D
foreach_in_collection path1 $path {set attributes [report_property $path1 ]}
下面我们在innovus中报告前面那条timing path的setup时序,看看setup是否和通过get_property获取到的值一致。结果表明完全一样。
report_timing -to u_cortexa7/u_cortexa7l2/u_cortexa7l2noram/u_ca7scu/g_cpu_0__u_cpuslv_u_dw_dw_data_buff_reg_0__10_/D
典型案例1:
抓取特定timing path的逻辑深度。这个可以用来快速判断逻辑关键路径和物理关键路径是否一致!
proc report_logic_depth {timing_path} { set total_logic_depth [get_property $timing_path num_cell_arcs] set bufinv 0 foreach_in_collection tp [get_property [get_property $timing_path timing_points] pin] { if { [get_property $tp object_type]=="pin" && [sizeof_collection [filter_collection [get_cells -of_object $tp] "is_buffer==true||is_inverter==true"]]} { incr bufinv }} return [list $total_logic_depth [expr $bufinv/2]]}
像咱们社区cortexa7core后端训练营项目中这条timing path,我们使用上述脚本快速获取data path的逻辑深度和buffer,inverter数量。通过输出结果我们就可以知道当前这条timing path是有大问题的!
Output:Total logic depth of path: 21
Count of buf/inv in path: 9
典型案例2:
这个案例使用get_property,get_arcs等命令来获取某个view下某条net的delay情况。而且我们还可以稍作改进修改成抓取design中net delay大于特定数值的net list。
proc get_arc_delay {netName viewName} {set net [ get_nets -hier $netName]foreach_in_collection net_coll $net {set netObj [get_object_name $net_coll]puts ""puts "########################################"puts "Delay parameters for net $netObj "set drv [ get_object_name [ get_property [get_nets $netObj ] driver_pins ] ]set drv1 [ get_property [get_nets $netObj ] driver_pins ]set load [ get_property [get_nets $netObj ] load_pins ]set load_col [ sizeof_collection $load ]set drv_col [ sizeof_collection $drv1 ]
if { $load_col >= 1 && $drv_col >=1 } {foreach_in_collection lPin $load {set name [ get_object_name $lPin ]set netArcCollection [get_arcs -from $drv -to $name]
foreach_in_collection arc $netArcCollection {set del_max_rise [get_property $arc delay_max_rise -view $viewName]set del_max_fall [get_property $arc delay_max_fall -view $viewName]set del_min_rise [get_property $arc delay_min_rise -view $viewName]set del_min_fall [get_property $arc delay_min_fall -view $viewName]
puts "########################################"puts "Arc from $drv to $name:Delay_max_rise: $del_max_rise Delay_max_fall: $del_max_fall Delay_min_rise: $del_min_rise Delay_min_fall: $del_min_fall" } } }}}