For challenging designs, it can take multiple iterations of Vivado implementation using multiple different strategies
to achieve timing closure. This topic shows you how to launch multiple implementation
strategies at the same time in the hardware build (-t
hw), and how to identify and use successful runs to generate the device binary
and complete the build.
As explained in
--vivado
Options
, the --vivado.impl.strategies command enables you to specify
multiple strategies to run in a single build pass. The command line would look as
follows:
v++ --link -s -g -t hw --platform xilinx_zcu102_base_202010_1 -I . \
--vivado.impl.strategies "Performance_Explore,Area_Explore" -o kernel.xclbin hello.xo
In the example above, the Performance_Explore and Area_Explore
strategies are run simultaneously in the Vivado
build to see which returns the best results. You can specify the ALL to have all available strategies run within the tool.
--vivado.impl.jobs or the --vivado.impl.lsf commands. You can also determine this option in a configuration file in the following form:
#Vivado Implementation Strategies
[vivado]
impl.strategies=Performance_Explore,Area_Explore
The Vitis compiler automatically picks the
first completed run results that meets timing to proceed with the build process and
generate the device binary. However, you can also direct the tool to wait for all runs
to see the result of all strategies. This would require the use of the
{}ALL_IMPL{} macro to apply custom settings to all runs and the
multiStrategiesWaitOnAllRuns directive to see the
result of all strategies:
[advanced]
#param=compiler.multiStrategiesWaitOnAllRuns=1
[vivado]
impl.strategies=ALL
prop=run.{}ALL_IMPL{}.STEPS.PLACE_DESIGN.TCL.PRE=../../vpp_cfg/place_design_pre.tcl
prop=run.{}ALL_IMPL{}.STEPS.ROUTE_DESIGN.TCL.PRE=../../vpp_cfg/route_design_pre.tcl
compiler.multiStrategiesWaitOnAllRuns=0
represents the default behavior. If you want v++ to
wait for all runs to complete, which will get their report files, change that parameter
value to 1. This includes an overview of the implementation results, in addition to a
Timing Summary report. Seeing all results will give you an indication on how hard it is
to close timing for the tool for the all strategies that are allowed to run to
completion. You can use this feature to review the different strategies and results.
You can also manually review the results of all implementation strategies
after they have completed. Then, use the results of any of the implementation runs by
using the --reuse_impl option as described in Using --to_step and Launching Vivado Interactively.