Skip to content

Commit d65ee3c

Browse files
Sort paths by slack; and check hold-timing slack
1 parent f22f7ca commit d65ee3c

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

hdk/cl/developer_designs/cl_firesim/build/scripts/create_dcp_from_cl.tcl

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -311,18 +311,12 @@ if {$implement} {
311311
##############################
312312
# CL Post-Route Optimization
313313
##############################
314-
set SLACK [get_property SLACK [get_timing_paths]]
314+
set SLACK [get_property -min SLACK [get_timing_paths -delay_type min_max]]
315315
#Post-route phys_opt will not be run if slack is positive or greater than -200ps.
316316
if {$route_phys_opt && $SLACK > -0.400 && $SLACK < 0} {
317317
puts "\nAWS FPGA: ([clock format [clock seconds] -format %T]) - Running post-route optimization";
318318
impl_step route_phys_opt_design $TOP $post_phys_options $post_phys_directive $post_phys_preHookTcl $post_phys_postHookTcl
319319
}
320-
# Check if slack has improved after physopt.
321-
set SLACK [get_property SLACK [get_timing_paths]]
322-
if {$SLACK < 0} {
323-
puts "\nFATAL: Design did not meet timing requirements. Terminating.";
324-
exit 3
325-
}
326320

327321
##############################
328322
# Final Implmentation Steps
@@ -347,6 +341,13 @@ if {$implement} {
347341
# Generate debug probes file
348342
write_debug_probes -force -no_partial_ltxfile -file $CL_DIR/build/checkpoints/${timestamp}.debug_probes.ltx
349343

344+
# Before proceeding, coarsely check if we meet timing otherwise exit
345+
set SLACK [get_property -min SLACK [get_timing_paths -delay_type min_max]]
346+
if {$SLACK < 0} {
347+
puts "\nFATAL: Design did not meet timing requirements. Terminating.";
348+
exit 3
349+
}
350+
350351
close_project
351352
}
352353

0 commit comments

Comments
 (0)