get_nets Command - 2021.2 English

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

Document ID
UG894
Release Date
2021-11-17
Version
2021.2 English

The get_nets command can return multiple representations of the same net as the net traverses through the design hierarchy. Below are some examples using the options provided with get_nets to ensure that the proper representation of the net is selected.

The following examples use the leaf pin of a LUT2 as defined below to query different segments of the net connected to the leaf pin.

set mypin [get_pins{egressLoop[7].egressFifo/buffer_fifo/infer_fifo.wr_addr_reg[9]_i_1__6/I0}]
mark_objects -color green $mypin
Figure 1. Set mypin Example
Page-1 Sheet.2

Simply getting the net connected to the leaf pin mypin returns the net segment within the hierarchy directly connected to the leaf pin.

select_objects [get_nets -of $mypin]

In order to select all segments of the net connected to leaf pin mypin, use the -segments option.

select_objects [get_nets -segments -of $mypin]
Figure 2. get_nets Segments Example
Page-1 Sheet.2

In order to only get the net segment at the highest level of the hierarchy connected to the leaf pin mypin, use the -top_net_of_hierarchical_group along with the -segments option. This is often useful when printing debug statements as this will provide the name of the net with the shortest number of characters.

select_objects [get_nets -top_net_of_hierarchical_group -segments -of $mypin]
Figure 3. get_nets Top Segments Example
Page-1 Sheet.2
Figure 4. get_nets of Pin Example
Page-1 Sheet.2