Intelligent Design Runs Next Steps - 2024.1 English

Vivado Design Suite User Guide: Design Analysis and Closure Techniques (UG906)

Document ID
UG906
Release Date
2024-06-05
Version
2024.1 English

As intelligent design runs take a long time to complete it is not practical to run them continuously with each design change. Therefore, when an Intelligent Design Run is complete, the learning from the run needs to be incorporated into a main project run. There are two ways to do this by right clicking on the top level Intelligent Design Run and selecting:

  1. Generate Single Pass Implementation Run
  2. Generate ML Strategy Runs

A single pass run creates an equivalent run to the Intelligent Design Run that replicates the results seen in the best run but in a more compile time efficient manner. The make up of this run is dynamic based on the following:

  • QoR Suggestions that have improved the design
  • Implementation command directives that is based on either Stage 1 implementation or Stage 2 ML predicted strategies depending on which of these is the best run.
  • When Stage 3: Last Mile is run and produces the best result, an additional set of commands leveraging incremental changes are added as a Tcl proc to a Tcl hook after route design.

The single pass run is useful when trying to replicate the same results with the same input netlist. In particular, if a timing closed build is required it can help close out a design with minimal user effort. However, this flow might perform poorly with design changes. In addition when the Last Mile stage is included, it can add compile time when this night not be appropriate.

The ML Strategy runs offer a more robust flow when design changes are being made. Using the ML strategy runs will:

  • Include any QoR Suggestions that improved the design
  • Run 3 implementation runs, each with one of the top 3 predicted implementation strategies. This is a good balance of compute against QoR rerun
It can also finish quicker as it excludes Last Mile flow which adds extra steps to the implementation run. This is generally better for iterations when the design is changing. If, at a later time, Last Mile needs to be added back in, the following script replicates the Last Mile flow and should be called on a fully routed DCP file.
package require Vivado 1.2022.1

namespace eval ::xilinx::designutils {
    namespace export last_mile
}

proc ::xilinx::designutils::last_mile {{write_intermediate_files 0} {write_final_files 0}} {
# Vivado   : Supported 2023.1 and later
#
# Families : Versal, Ultrascale+, Ultrascale
#
# Summary  : Run last mile flow. This is equivalent to 
#            running stage 3 in IDR.
#            The last mile flow will run intensive 
#            algorithms trying to close out timing 
#            on a fully routed design.
#            It is recommended to run post route 
#            phys_opt_design -directive Explore before 
#            running last mile.
#            A call to this script can be added as a 
#            TCL_POST hook to post route 
#            phys_opt_design -directive Explore.
#          
#            The requirements to run this are:
#              i)   A fully routed open design
#              ii)  When called a check will be made to
#                   see if the QoR Assessment Score of 3 
#                   or 4 is achieved, if not it will exit.
#              iii) A WNS >= -0.250
#
# Arguments:
#
# write_intermediate_files - 
# When set to 1, writes out intermediate DCP and timing 
# reports after:
#  i)   preplace phys_opt_design, 
#  ii)  place_design
#  iii) postplace phys_opt_design
#
# write_final_files - 
# Writes reports and DCPs after the final stage 
# route_design 
# when set to 1.
#  Project users:     It is recommended to leverage 
#                     project infrastructure to write 
#                     reports
#  Non-Project users: Recommended to add custom 
#                     write_checkpoint and reporting 
#                     commands after this script is 
#                     executed.
#
# Return Value:
# 1 - last mile completed successfully
#
# Categories: xilinxtclstore, designutils
set top [get_property TOP [current_design]]

# Entry Checks
puts "-I: Checking last mile entry criteria is met..."
if {[llength [current_design -quiet]] == 0} {
	puts "-E: Last mile requires an open design that is\
	fully routed"
	return -code 2 "Error: Last mile requires an open\
	design that is fully routed"
}
if {[report_route_status -boolean_check ROUTED_FULLY] == 0} {
	puts "-E: Last mile requires a design that is fully\
	routed"
	return -code 2 "Error: Last mile requires a design\
	that is fully routed"
}
# actual value is 3
if {[set score [get_assessment_score]] < 3} {
	puts "-E: Last mile requires a design has an QoR\
	Assessment Score of 3 or greater.\
	Design Score: $score"
	return -code 2 "Error: Last mile requires a design\
	has an QoR Assessment Score of 3 or greater.\
	Design Score: $score"
}
# actual value is -0.250
if {[set slack [get_property SLACK [get_timing_paths -setup]]] < -0.250} {
	puts "-E: Last mile requires a design a WNS >= -0.250\
	Design Slack: $slack"
	return -code 2 "Error: Last mile requires a design a\
	WNS >= -0.250. Design Slack: $slack"
}
puts "-I: Passed last mile entry criteria checks"

# QoR Suggestion Generation
puts "-I: Generating QoR Suggestions for Last Mile"
report_qor_suggestions -file ${top}_qor_suggestions_lastmile.rpt
if {[llength [get_qor_suggestions -filter {INCR_FRIENDLY} -quiet ] ] > 0} {
	puts "-I: Enabling generated incremental friendly\
	QoR Suggestions..."
	write_qor_suggestions -of_objects \
	[get_qor_suggestions -filter {INCR_FRIENDLY}] \
	-force -file ${top}_qor_suggestions_lastmile.rqs
	set_property ENABLED 1 [get_qor_suggestions \
	-filter {INCR_FRIENDLY}]
} else {
	puts "-I: No QoR Suggestions found for last mile\
	flow. Flow will continue.."
}

# Tool Flow Commands
phys_opt_design -clock_opt -retime -lut_opt
if {$write_intermediate_files != 0} {
	report_timing_summary -delay_type min_max \
	-report_unconstrained -check_timing_verbose \
	-max_paths 10 \
	-input_pins -routable_nets \
	-rpx ${top}_timing_lastmile_preplace_physopt.rpx \
	-file ${top}_timing_lastmile_preplace_physopt.rpt
	write_checkpoint -force \
	${top}_lastmile_preplace_physopt.dcp
}	
place_design -directive LastMile
if {$write_intermediate_files != 0} {
	report_timing_summary -delay_type min_max \
	-report_unconstrained \
	-check_timing_verbose \
	-max_paths 10 \
	-input_pins \
	-routable_nets \
	-rpx ${top}_timing_lastmile_placed.rpx \
	-file ${top}_timing_lastmile_placed.rpt
	write_checkpoint -force \
	${top}_lastmile_placed.dcp
}
phys_opt_design -directive Explore
if {$write_intermediate_files != 0} {
	report_timing_summary -delay_type min_max \
	-report_unconstrained \
	-check_timing_verbose \
	-max_paths 10 \
	-input_pins \
	-routable_nets \
	-rpx ${top}_timing_lastmile_postplace_physopt.rpx \
	-file ${top}_timing_lastmile_postplace_physopt.rpt
	write_checkpoint -force \
	${top}_lastmile_postplace_physopt.dcp
}	
route_design -directive Explore
if {$write_final_files != 0} {	
	report_timing_summary -delay_type min_max \
	-report_unconstrained -check_timing_verbose \
	-max_paths 10 -input_pins -routable_nets \
	-rpx ${top}_timing_lastmile_routed.rpx \
	-file ${top}_timing_lastmile_routed.rpt
	write_checkpoint -force \
	${top}_lastmile_routed.dcp
}
phys_opt_design -directive Explore
phys_opt_design -directive Explore
if {$write_final_files != 0} {	
	report_timing_summary -delay_type min_max \
	-report_unconstrained -check_timing_verbose \
	-max_paths 10 -input_pins -routable_nets \
	-rpx ${top}_timing_lastmile_postroute_physopt.rpx \
	-file ${top}_timing_lastmile_postroute_physopt.rpt
	write_checkpoint -force \
	${top}_lastmile_postroute_physopt.dcp
}

return 1
}