-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathincremental_opt.tcl
34 lines (29 loc) · 1.3 KB
/
incremental_opt.tcl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#Get a function for making nice short timing summaries for in the logs:
set script_path [ file dirname [ file normalize [ info script ] ] ]
source $script_path/timing_summary_parser.tcl
puts "Timing info:"
getTimingInfo
#incremental optimizations, taken from the Xilinx Design Analysis and Closure Techniques manual (UG906):
if {[get_property SLACK [get_timing_paths ]] <= -0.5} {
puts "The design has significant negative slack. Meeting timing seems highly unlikely and the script will not attempt incremental P&R optimizations."
break
}
set basename incremental_opt_
puts "Attempting incremental P&R optimizations."
for {set i 0} {$i < 3} {incr i} {
if {[get_property SLACK [get_timing_paths ]] >= 0} {break}; #stop if timing is met
place_design -post_place_opt
phys_opt_design -directive Explore
set checkpointname ""
append checkpointname $basename iteration $i _opt1
write_checkpoint $checkpointname.dcp -force
report_timing_summary -quiet -max_paths 10 -file $checkpointname.rpt
getTimingInfo
route_design -directive Explore -tns_cleanup
phys_opt_design -directive AggressiveExplore
set checkpointname ""
append checkpointname $basename iteration $i _opt2
write_checkpoint $checkpointname.dcp -force
report_timing_summary -quiet -max_paths 10 -file $checkpointname.rpt
getTimingInfo
}