AR# 64209

|

2015.2 Vivado - Tcl script that removes and then adds a block with the same name causes a crash

描述

I have a Tcl script which does the following:
 
  1. Removes a cell / block from the project.
  2. Creates a cell of the same name as the one removed.
  3. Then the script reads in a checkpoint for the created cell.

 

Example Script:

    set parent [get_property PARENT $reset_net]
    set reset_net_i [get_nets -hier -filter "PARENT == $parent"]
    remove_net -prune [lindex $reset_net_i 1]
    set myblock [get_cells <hierary reference>]
    remove_cell $myblock
    create_cell -reference reset_sync_macro $myblock -black_box
    read_checkpoint ../files/reset_sync_macro.dcp

During the process of reading the checkpoint, the tools crashes or gives an exception.

The last part of the log reads as follows:
 


Finished XDEF File Restore: Time (s): cpu = 00:00:00 ; elapsed = 00:00:00.064 . Memory (MB): peak = 1148.512 ; gain = 0.000
INFO: [Drc 23-27] Running DRC with 2 threads
INFO: [Project 1-461] DRC finished with 0 Errors
INFO: [Project 1-462] Please refer to the DRC report (report_drc) for more information.
INFO: [Opt 31-138] Pushed 0 inverter(s) to 0 load pin(s).

0000000045b7c1a0() Unknown
librdi_netlist.dll!000007fede6be7ea() Unknown
librdi_constraints.dll!000007fee670742e() Unknown
librdi_constraints.dll!000007fee6707bdd() Unknown
librdi_tcltasks.dll!000007fecf3c82b0() Unknown
librdi_tcltasks.dll!000007fecf3c71bc() Unknown
librdi_tcltasks.dll!000007fecf3c8476() Unknown
librdi_tcltasks.dll!000007fecf3c6103() Unknown
librdi_commontasks.dll!000007fee7ecc3b9() Unknown
tcl85t.dll!000000000ffe0e50() Unknown
tcl85t.dll!0000000010025688() Unknown
tcl85t.dll!000000001006fed4() Unknown
tcl85t.dll!000000000ffe0e50() Unknown
tcl85t.dll!0000000010025688() Unknown
tcl85t.dll!000000001006fed4() Unknown
tcl85t.dll!000000000ffe0e50() Unknown
tcl85t.dll!000000000ffe1d9e() Unknown
tcl85t.dll!000000001004a4f0() Unknown
librdi_commontasks.dll!000007fee7ee7e1d() Unknown
librdi_commontasks.dll!000007fee7ee754c() Unknown
librdi_common.dll!000007fee8c94424() Unknown
librdi_common.dll!000007fee8c96f9e() Unknown
tcl85t.dll!000000000ffe0e50() Unknown
tcl85t.dll!000000000ffe1291() Unknown
tcl85t.dll!000000000ffe2837() Unknown
tcl85t.dll!000000000ffe26cd() Unknown
librdi_commontasks.dll!000007fee7f05609() Unknown
librdi_commontasks.dll!000007fee7f05755() Unknown
librdi_commontasks.dll!000007fee7efd770() Unknown
librdi_commontasks.dll!000007fee7efda47() Unknown
librdi_common.dll!000007fee8c94424() Unknown
librdi_common.dll!000007fee8c96f9e() Unknown
tcl85t.dll!000000000ffe0e50() Unknown
tcl85t.dll!000000000ffe1291() Unknown
tcl85t.dll!000000000ffe2837() Unknown
tcl85t.dll!000000000ffe26cd() Unknown
librdi_commonmain.dll!000007fef6b24512() Unknown
tcl85t.dll!0000000010055a41() Unknown
librdi_common.dll!000007fee8cbe6e3() Unknown
> msvcr110.dll!_callthreadstartex() Line 354 C
msvcr110.dll!_threadstartex(void * ptd) Line 332 C
kernel32.dll!00000000774859ed() Unknown
ntdll.dll!00000000776bc541() Unknown

解决方案

The script above is creating an unknown state for the design.

  1. The remove_net puts info about the net into the undo/redo stack.
  2. Then, read_checkpoint replaces the parent cell view that contains the net, and then after that attempts to clear the undo/redo stack.
  3. At that point, the removed net tries to reference its parent cell, which has already been deleted.

Vivado will be updated in a future release to be able to handle this Tcl code. 

However, a better way to write the Tcl would be to set the variable based on the cell NAME value rather than the actual cell.

For Example:

The above script is getting and holding on to netlist objects as Tcl variables, for example:

set my_var [get_cells "/hier/name"]


The script then does a remove_cell $my_var (which is ok).

However it then does a create_cell $my_var.

$my_var has been removed, so this is not safe.

Instead, you can use the following:

set my_var [get_property NAME [get_cells "/hier/name"]]


Using this method, both the remove and create calls will work.

This issue will be fixed in Vivado 2015.3.

AR# 64209
日期 06/30/2015
状态 Archive
Type 已知问题
Tools
People Also Viewed