標(biāo)準(zhǔn)流程產(chǎn)生的文件
- spef(start_rc 提取)
- netlist(布局布線后的網(wǎng)表,以及邏輯綜合后的網(wǎng)表)
- sdc(邏輯綜合和布局布線)
自定義的文件提取
- pt時(shí)序報(bào)告(邏輯綜合和布局布線后锰提,獲取每個(gè)寄存器數(shù)據(jù)路徑處的slack值的值)
report_timing -max_paths 100 -slack_lesser_than 100 -nworst 1 -nets -transition_time -capacitance -input_pins -delay_type max -significant_digits 7 -rise_to [all_registers -data_pins]
- 布局信息(邏輯綜合和布線后试躏,獲取數(shù)據(jù)集)
1.導(dǎo)入特征提取函數(shù)(布局布線后的特征提取函數(shù))
proc format_float {number {format_str "%.6f"}} {
switch -exact -- $number {
UNINIT { }
INFINITY { }
default {set number [format $format_str $number]}
}
return $number;
}
proc show_paths {args} {
echo [format "%-20s %-20s %7s" "From" "To" "Slack"]
echo "--------------------------------------------------------"
foreach_in_collection path [get_timing_paths -nworst 1] {
set slack [get_attribute $path slack]
set startpoint [get_attribute $path startpoint]
set endpoint [get_attribute $path endpoint]
set point [get_attribute $path points]
echo [llength $point]
foreach_in_collection cell $point {
echo $cell
echo [format "%s " [get_attribute $cell full_name] ]
}
}
}
proc show_arcs {args} {
set arcs [eval [concat get_timing_arcs $args]]
echo [format "%15s %-15s %8s %8s %s" "from_pin" "to_pin" \
"rise" "fall" "is_cellarc"]
echo [format "%15s %-15s %8s %8s %s" "--------" "------" \
"----" "----" "----------"]
foreach_in_collection arc $arcs {
set is_cellarc [get_attribute $arc is_cellarc]
set fpin [get_attribute $arc from_pin]
set tpin [get_attribute $arc to_pin]
set rise [get_attribute $arc delay_max_rise]
set fall [get_attribute $arc delay_max_fall]
set from_pin_name [get_attribute $fpin full_name]
set to_pin_name [get_attribute $tpin full_name]
echo [format "%15s -> %-15s %8s %8s %s %s %s %s" \
$from_pin_name\
$to_pin_name \
[format_float $rise]\
[format_float $fall] \
$is_cellarc\
[get_attribute $arc is_disabled]\
[get_attribute $arc when]\
[get_attribute $arc sense]\
]
}
}
proc export_timing {} {
#Inport
set count 0
echo "Inport"
echo [sizeof_collection [get_ports * -filter "direction==in"]]
foreach_in_collection inPort [get_ports * -filter "direction==in"] {
echo [format "%s %s %s"\
[get_attribute $inPort full_name] \
[get_attribute $inPort x_coordinate]\
[get_attribute $inPort y_coordinate]\
]
}
#Outport
echo "Outport"
echo [sizeof_collection [get_ports * -filter "direction==out"] ]
foreach_in_collection outPort [get_ports * -filter "direction==out"] {
echo [format "%s %s %s"\
[get_attribute $outPort full_name]\
[get_attribute $outPort x_coordinate]\
[get_attribute $outPort y_coordinate]\
]
}
set count 0
#com_cell
echo "com_cell"
echo [sizeof_collection [get_cells -hierarchical * \
-filter "is_combinational==true" ]]
foreach_in_collection cell [get_cells -hierarchical * \
-filter is_combinational==true] {
if { [get_attribute $cell is_hierarchical] ==false \
&& [get_attribute $cell number_of_pins] >1} {
echo [format "%s" [get_attribute $cell full_name] ]
foreach_in_collection pin [get_pins -of_objects $cell \
-filter "direction==in"] {
foreach_in_collection pinOut [get_pins -of_objects $cell \
-filter "direction==out"] {
# name slew capacitance location1 location2 delay
echo [format "%s %s %s %s %s %s %s,%s %s %s %s %s,%s | %s,%s"\
[get_attribute $pin full_name]\
[get_attribute $pin actual_rise_transition_max]\
[get_attribute $pin actual_fall_transition_max]\
[get_attribute $pin pin_capacitance_max_rise] \
[get_attribute $pin pin_capacitance_max_fall]\
[get_attribute $pin x_coordinate]\
[get_attribute $pin y_coordinate] \
\
[get_attribute $pinOut full_name] \
[get_attribute $pinOut x_coordinate]\
[get_attribute $pinOut y_coordinate]\
[get_attribute $pinOut actual_rise_transition_max]\
[get_attribute $pinOut actual_fall_transition_max]\
\
[get_attribute [get_timing_arcs -from $pin -to $pinOut ] delay_max_rise]\
[get_attribute [get_timing_arcs -from $pin -to $pinOut ] delay_max_fall]\
\
[get_attribute [get_timing_arcs -from $pin -to $pinOut] sense ] ]
}
}
} else {
set count [expr {$count +1}]
echo [format "alone %s " [get_attribute $cell full_name] ]
}
}
#reg_cell
echo "reg_cell"
echo [sizeof_collection [get_cells -hierarchical * \
-filter "is_combinational==false" ]]
foreach_in_collection cell [get_cells -hierarchical * \
-filter "is_combinational==false"] {
if { [get_attribute $cell is_hierarchical] ==false \
&& [get_attribute $cell number_of_pins] !=1} {
echo [format "%s " [get_attribute $cell full_name] ]
foreach_in_collection pin [get_pins -of_objects $cell \
-filter "direction==in"] {
foreach_in_collection pinOut [get_pins -of_objects $cell \
-filter "direction==out"] {
# name slew capacitance location1 location2 delay
echo [format "%s %s %s %s %s %s %s %s,%s %s %s %s,%s | %s,%s"\
[get_attribute $pin full_name]\
[get_attribute $pin actual_rise_transition_max]\
[get_attribute $pin actual_fall_transition_max]\
[get_attribute $pin pin_capacitance_max_rise] \
[get_attribute $pin pin_capacitance_max_fall]\
[get_attribute $pin x_coordinate]\
[get_attribute $pin y_coordinate] \
\
[get_attribute $pinOut full_name] \
[get_attribute $pinOut x_coordinate]\
[get_attribute $pinOut y_coordinate]\
[get_attribute $pinOut actual_rise_transition_max]\
[get_attribute $pinOut actual_fall_transition_max]\
\
[get_attribute [get_timing_arcs -from $pin -to $pinOut ] delay_max_rise]\
[get_attribute [get_timing_arcs -from $pin -to $pinOut ] delay_max_fall]\
\
[get_attribute [get_timing_arcs -from $pin -to $pinOut ] sense]
]
}
}
} else {
set count [expr {$count +1}]
echo [format "alone %s " [get_attribute $cell full_name] ]
}
}
echo $count
echo "netflag"
foreach_in_collection net [get_nets -hierarchical *] {
echo [format "%s %s %s %s" \
[get_attribute $net full_name]\
[get_attribute $net pin_capacitance_max_rise]\
[get_attribute $net pin_capacitance_max_fall]\
[get_attribute $net wire_capacitance_max]\
]
foreach_in_collection driver [get_attribute $net leaf_drivers] {
foreach_in_collection sink [get_attribute $net leaf_loads] {
#start end delay
echo [format "%s %s %s %s" \
[get_attribute $driver full_name] \
[get_attribute $sink full_name] \
[get_attribute [get_timing_arcs -from $driver -to $sink ] delay_max_rise]\
[get_attribute [get_timing_arcs -from $driver -to $sink ] delay_max_fall]
]
}
}
}
}
邏輯綜合后,特征提取的函數(shù)
proc format_float {number {format_str "%.6f"}} {
switch -exact -- $number {
UNINIT { }
INFINITY { }
default {set number [format $format_str $number]}
}
return $number;
}
proc show_paths {args} {
echo [format "%-20s %-20s %7s" "From" "To" "Slack"]
echo "--------------------------------------------------------"
foreach_in_collection path [get_timing_paths -nworst 1] {
set slack [get_attribute $path slack]
set startpoint [get_attribute $path startpoint]
set endpoint [get_attribute $path endpoint]
set point [get_attribute $path points]
echo [llength $point]
foreach_in_collection cell $point {
echo $cell
echo [format "%s " [get_attribute $cell full_name] ]
}
}
}
proc show_arcs {args} {
set arcs [eval [concat get_timing_arcs $args]]
echo [format "%15s %-15s %8s %8s %s" "from_pin" "to_pin" \
"rise" "fall" "is_cellarc"]
echo [format "%15s %-15s %8s %8s %s" "--------" "------" \
"----" "----" "----------"]
foreach_in_collection arc $arcs {
set is_cellarc [get_attribute $arc is_cellarc]
set fpin [get_attribute $arc from_pin]
set tpin [get_attribute $arc to_pin]
set rise [get_attribute $arc delay_max_rise]
set fall [get_attribute $arc delay_max_fall]
set from_pin_name [get_attribute $fpin full_name]
set to_pin_name [get_attribute $tpin full_name]
echo [format "%15s -> %-15s %8s %8s %s %s %s %s" \
$from_pin_name\
$to_pin_name \
[format_float $rise]\
[format_float $fall] \
$is_cellarc\
[get_attribute $arc is_disabled]\
[get_attribute $arc when]\
[get_attribute $arc sense]\
]
}
}
proc export_timing {} {
#Inport
set pad "0"
set count 0
echo "Inport"
echo [sizeof_collection [get_ports * -filter "direction==in"]]
foreach_in_collection inPort [get_ports * -filter "direction==in"] {
echo [format "%s %s %s"\
[get_attribute $inPort full_name] \
$pad\
$pad\
]
}
#Outport
echo "Outport"
echo [sizeof_collection [get_ports * -filter "direction==out"] ]
foreach_in_collection outPort [get_ports * -filter "direction==out"] {
echo [format "%s %s %s"\
[get_attribute $outPort full_name]\
$pad\
$pad\
]
}
set count 0
#com_cell
echo "com_cell"
echo [sizeof_collection [get_cells -hierarchical * \
-filter "is_combinational==true" ]]
foreach_in_collection cell [get_cells -hierarchical * \
-filter is_combinational==true] {
if { [get_attribute $cell is_hierarchical] ==false \
&& [get_attribute $cell number_of_pins] >1} {
echo [format "%s" [get_attribute $cell full_name] ]
foreach_in_collection pin [get_pins -of_objects $cell \
-filter "direction==in"] {
foreach_in_collection pinOut [get_pins -of_objects $cell \
-filter "direction==out"] {
# name slew capacitance location1 location2 delay
echo [format "%s %s %s %s %s %s %s,%s %s %s %s %s,%s | %s,%s"\
[get_attribute $pin full_name]\
[get_attribute $pin actual_rise_transition_max]\
[get_attribute $pin actual_fall_transition_max]\
[get_attribute $pin pin_capacitance_max_rise] \
[get_attribute $pin pin_capacitance_max_fall]\
$pad\
$pad\
\
[get_attribute $pinOut full_name] \
$pad\
$pad\
[get_attribute $pinOut actual_rise_transition_max]\
[get_attribute $pinOut actual_fall_transition_max]\
\
[get_attribute [get_timing_arcs -from $pin -to $pinOut ] delay_max_rise]\
[get_attribute [get_timing_arcs -from $pin -to $pinOut ] delay_max_fall]\
\
[get_attribute [get_timing_arcs -from $pin -to $pinOut] sense ] ]
}
}
} else {
set count [expr {$count +1}]
echo [format "alone %s " [get_attribute $cell full_name] ]
}
}
#reg_cell
echo "reg_cell"
echo [sizeof_collection [get_cells -hierarchical * \
-filter "is_combinational==false" ]]
foreach_in_collection cell [get_cells -hierarchical * \
-filter "is_combinational==false"] {
if { [get_attribute $cell is_hierarchical] ==false \
&& [get_attribute $cell number_of_pins] !=1} {
echo [format "%s " [get_attribute $cell full_name] ]
foreach_in_collection pin [get_pins -of_objects $cell \
-filter "direction==in"] {
foreach_in_collection pinOut [get_pins -of_objects $cell \
-filter "direction==out"] {
# name slew capacitance location1 location2 delay
echo [format "%s %s %s %s %s %s %s %s,%s %s %s %s,%s | %s,%s"\
[get_attribute $pin full_name]\
[get_attribute $pin actual_rise_transition_max]\
[get_attribute $pin actual_fall_transition_max]\
[get_attribute $pin pin_capacitance_max_rise] \
[get_attribute $pin pin_capacitance_max_fall]\
$pad\
$pad \
[get_attribute $pinOut full_name] \
\
$pad\
$pad\
[get_attribute $pinOut actual_rise_transition_max]\
[get_attribute $pin actual_fall_transition_max]\
\
[get_attribute [get_timing_arcs -from $pin -to $pinOut ] delay_max_rise]\
[get_attribute [get_timing_arcs -from $pin -to $pinOut ] delay_max_fall]\
\
[get_attribute [get_timing_arcs -from $pin -to $pinOut ] sense]
]
}
}
} else {
set count [expr {$count +1}]
echo [format "alone %s " [get_attribute $cell full_name] ]
}
}
echo $count
echo "netflag"
foreach_in_collection net [get_nets -hierarchical *] {
echo [format "%s %s %s %s" \
[get_attribute $net full_name]\
[get_attribute $net pin_capacitance_max_rise]\
[get_attribute $net pin_capacitance_max_fall]\
[get_attribute $net wire_capacitance_max]\
]
foreach_in_collection driver [get_attribute $net leaf_drivers] {
foreach_in_collection sink [get_attribute $net leaf_loads] {
#start end delay
echo [format "%s %s %s %s" \
[get_attribute $driver full_name] \
[get_attribute $sink full_name] \
[get_attribute [get_timing_arcs -from $driver -to $sink ] delay_max_rise]\
[get_attribute [get_timing_arcs -from $driver -to $sink ] delay_max_fall]
]
}
}
}
}
2.輸出特征
export_timing