Use Case 2: Adding a Debug Port - 2021.1 English

Vivado Design Suite User Guide: Implementation (UG904)

Document ID
Release Date
2021.1 English

You can easily route an internal signal to a debug port with a netlist change. The schematic below shows the pin demuxState_reg/Q, which you can observe on an external port of the device.

Figure 1. Schematic Showing demuxState_reg

The following Tcl script shows how to add a port to the existing design and route the internal signal to the newly created port.

create_port -direction out debug_port_out
set_property PACKAGE_PIN AB20 [get_ports {debug_port_out}] 
set_property IOSTANDARD LVCMOS18 [get_ports [list debug_port_out]] 
create_cell -reference [get_lib_cells [get_libs]/OBUF] ECO_OBUF1 
create_net ECO_OBUF1_out
connect_net -net ECO_OBUF1_out -objects ECO_OBUF1/O
connect_net -net ECO_OBUF1_out -objects [get_ports debug_port_out]
connect_net -net [get_nets -of [get_pins demuxState_reg/Q]] -objects ECO_OBUF1/I

The example script accomplishes the following:

  • Creates a debug port.
    • Assigns it to package pin AB20.
    • Assigns it an I/O standard of LVCMOS18.
  • Creates an OBUF that drives the debug port through net ECO_OBUF1_out.
  • Creates a net to connect the output of the demuxState_reg register to the input of the OBUF.

The following figure shows the schematic of the resulting logical netlist changes.

Figure 2. Schematic after Adding/Routing a Debug Port

After the netlist has been successfully modified, the logical changes must be implemented. Because the port has been assigned to a package pin, the OBUF driving the port is automatically placed in the correct location. Therefore, the placer does not have anything to place and therefore incremental compile is not triggered when running place_design followed by route_design. To route the newly added net that connects the internal signal to the OBUF input, use the route_design -nets command or route the net manually to avoid a full route_design pass which might change the routing for other nets. Alternatively, you can run route_design -preserve, which preserves existing routing. See Using Other route_design Options.