Sharing Hook Scripts Between Steps - 2024.1 English

Vivado Design Suite User Guide: Using Tcl Scripting (UG894)

Document ID
UG894
Release Date
2024-05-30
Version
2024.1 English

When the hook script is step agnostic and only generates a set of reports for an implementation step, it is not efficient to duplicate the script content for each step and just change, for instance, the report file name to match the implementation step. A better way to proceed is to share the same hook script for all the implementation steps and use the Tcl variable ACTIVE_STEP to build the report filename. This ensures a different file name for each step.

In Project mode, the Vivado IDE automatically updates the Tcl variable ACTIVE_STEP when submitting a run through the run infrastructure to match the implementation step being run.

Note: The Tcl variable ACTIVE_STEP is only available in Project mode while using the run infrastructure.

The following is an example of a hook script using the ACTIVE_STEP variable:

set step $ACTIVE_STEP
report_timing_summary -file tim_summary_${step}.rpt
if {$step == {route_design}} {
  report_route_status -file route_status.rpt
}