UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

AR# 51444

Vivado - Tcl loop with a delete_run command causes abnormal program termination (EXCEPTION_​ACCESS_​VIOLATION)

Description

I have a script that I run to create a project, run synthesis, and implementation runs. The script contains the following loop to clean up existing runs:

foreach run_name $previous_runs {
delete_run -quiet ${run_name}
  file delete -force ${run_name}
}

When sourced, the script fails and reports the following:

Abnormal program termination (EXCEPTION_ACCESS_VIOLATION)

How can I work around the issue?

Solution

In this use case, the Tcl script is deleting the previous run, thus causing a null pointer which is causing the tool to crash.

The second iteration of:

delete_run
foreach run_name $previous_runs {
    delete_run -quiet ${run_name}
    file delete -force ${run_name}
}

In the script, previous_runs contains the objects synth_1 and impl_1. So, the first delete_run deletes synth_1 which has a side effect of deleting impl_1. On the second iteration, run_name is a bad pointer which causes the crash.

The desired behavior can be achieved with the following:

set previous_syn_runs [get_runs -filter {IS_SYNTHESIS==1}] foreach syn_run_name $previous_syn_runs {
    #Check that the run still exists and was not deleted as a by product
    #of deleting another run.
    if {[lsearch [get_runs] ${syn_run_name}] != -1} {
        delete_run -quiet ${syn_run_name}
        file delete -force ${syn_run_name}
    }
}

You can also perform a reset_run, which will clean up the run directory, but the run names will remain in the GUI.

Note: In Vivado Design Suite 2013.4, the delete_run command was changed to delete_runs. In Vivado 2013.4 and later tool versions, the recommended methodology to delete all runs is to run detele_runs $all_runs.

AR# 51444
Date Created 10/19/2012
Last Updated 01/09/2014
Status Active
Type General Article
Tools
  • Vivado Design Suite