AR# 53748

Vivado - How to format list of objects output from a get_* command?

Description

When a list is returned from a get_* command in Vivado, the list is un-formatted and returned to stdout in a single line delimited by a space.

This un-formatted return makes it difficult to see what has been returned in the Tcl Console and the Vivado IDE. 

How can I have each item in the list returned on a separate line?

Solution

The two Tcl commands below can be used to format the list with each value written to a new line.

  • foreach cell [get_cells *] {puts "$cell\n"}
  • join [get_cells *] \n
AR# 53748
Date 12/08/2014
Status Active
Type General Article
Tools