Intel® Quartus® Prime Pro Edition User Guide: Debug Tools

ID 683819
Date 12/04/2023
Public
Document Table of Contents
Give Feedback

8.5.1. Locating Available Services

System Console uses a virtual file system to organize the available services, which is similar to the /dev location on Linux systems. Board connection, device type, and IP names are all part of a service path. Instances of services are referred to by their unique service path in the file system. To retrieve service paths for a particular service, use the command get_service_paths <service-type>.

Locating a Service Path

#We are interested in master services.
set service_type "master"

#Get all the paths as a list.
set master_service_paths [get_service_paths $service_type]

#We are interested in the first service in the list.
set master_index 0

#The path of the first master.
set master_path [lindex $master_service_paths $master_index]

#Or condense the above statements into one statement:
set master_path [lindex [get_service_paths master] 0]

System Console commands require service paths to identify the service instance you want to access. The paths and indexes for different components can change between runs of System Console and between versions. Use the get_service_paths command to obtain service paths.

The string values of service paths change with different releases of the tool. Use the marker_node_info command to get information from the path.

System Console automatically discovers most services at startup. System Console automatically scans for all JTAG and USB-based service instances and retrieves their service paths. System Console does not automatically discover some services, such as TCP/IP. Use add_service to inform System Console about those services.

Marker_node_info

Use the marker_node_info command to get information about SLD nodes associated with the specified service.

set slave_path [get_service_paths -type altera_avalon_uart.slave slave]
array set uart_info [marker_node_info $slave_path]
echo $uart_info(full_hpath)

Locating the Correct Service Path

If the design contains multiple instances of the same service, it is necessary to use the full hierarchy path to correctly identify the service path.

In the following example, to identify the correct service path for a debug endpoint called master_0:

  1. Locate the full hierarchy name of the endpoint in your design.
  2. Right-click master_0 and select Copy in the context-sensitive menu. This copies the full hierarchical path, (ed_synth_top|master_0).
  3. Save this hierarchy path to a Tcl variable for easy reference later, as follows:
    set desired_hpath ed_synth_inst|master_0
  4. Use the get_service_paths command with the –hpath flag and the hierarchy path to obtain specific service path of the desired endpoint. The command returns a list with a service path.
    #Return a list of one element with the desired element
    set service_paths [get_service_paths -hpath $desired_hpath master]
    
  5. Save the service path as a variable for easier access later.
    #Extract and store the element in a variable
    set master_0_spath [lindex $service_paths 0]