.. _Hyperlinks:

Hyperlinks
==========


Place the mouse cursor over an identifier in the editor while holding down the :kbd:`Ctrl` key. The identifier becomes a **hyperlink**, and a list of navigation options is displayed.

The first option is **Open Declaration**. This is the default action when you click directly on the identifier.

**Hyperlinks** are available for all classes, modules, methods, fields, signals, macros, etc. in the source code files that DVT analyzes in your project.

.. list-table::
   :header-rows: 0

   * - Open Declaration
     - .. tip:: 
      
          Keyboard alternative: place editor cursor on an identifier and press **F3**.  
       
       .. figure:: ../../images/common/vlogdt-open-declaration.png  
       .. figure:: ../../images/common/vlogdt-open-declaration-target.png
   * - Open Extern Method Implementation
     - .. figure:: ../../images/common/vlogdt-open-extern-implementation.png  
       .. figure:: ../../images/common/vlogdt-open-extern-implementation-target.png
   * - Open Super Implementation
     - Available only if the method under cursor overrides a virtual method inherited from a superclass. Opens the implementation of the overridden method:  
       
       .. figure:: ../../images/common/vlogdt-open-super-implementation.png  
       .. figure:: ../../images/common/vlogdt-open-super-implementation-target.png
   * - Open Child Implementation
     - Available only if the method under cursor is overridden in a subclass. If there is only one override, it is opened. Otherwise the Quick Type Hierarchy View is opened.  
       
       .. figure:: ../../images/common/vlogdt-open-child-implementation.png  
       .. figure:: ../../images/common/vlogdt-open-child-implementation-target.png
   * - Open Instance
     - Available only for a design element under cursor which is instantiable. It jumps to the corresponding instance from design (which is also available in the Design Breadcrumb Navigation Bar).  
       
       .. figure:: ../../images/common/vlogdt-open-instance.png  
       .. figure:: ../../images/common/vlogdt-open-instance-target.png
   * - Open ... Type
     - .. figure:: ../../images/common/vlogdt-open-field-type.png  
       .. figure:: ../../images/common/vlogdt-open-field-type-target.png
   * - Jump to Assignment
     - Jumps to the next assignment of the signal under cursor in the current editor. 
   
       .. figure:: ../../images/common/vlogdt-jump-to-assignment.png  
       .. figure:: ../../images/common/vlogdt-jump-to-assignment-target.png
   * - Jump to Case Branch
     - Available only on enum constants and parameters. Jumps directly to the case branch where element under cursor is used.  
       
       .. figure:: ../../images/common/vlogdt-jump-to-case.png  
       .. figure:: ../../images/common/vlogdt-jump-to-case-target.png
   * - Jump to an Imported File
     - .. figure:: ../../images/common/vlogdt-hyperlink-to-imported-file.png  
       .. figure:: ../../images/common/vlogdt-hyperlink-to-imported-file-target.png
   * - Jump to a Macro Definition
     - .. figure:: ../../images/vlogdt-hyperlink-to-macro.png  
       .. figure:: ../../images/common/vlogdt-hyperlink-to-macro-target.png
   * - Jump to Connected TLM Port
     - Jumps to the next connected TLM port of the TLM port under cursor in the current editor.  
       
       .. figure:: ../../images/common/vlogdt-hyperlink-jump-to-tlm.png  
       .. figure:: ../../images/common/vlogdt-hyperlink-jump-to-tlm-target.png
   * - Show Connected TLM Ports
     - .. figure:: ../../images/common/vlogdt-hyperlink-show-tlm.png  
       .. figure:: ../../images/common/vlogdt-hyperlink-show-tlm-target.png
   * - Show in Config DB View
     - Shows the selected  set or get call in the :ref:`Config DB View`.  
       
       .. note:: 
        
          You need to perform :ref:`UVM Runtime Elaboration` in order to populate the Config DB View. 
       
       .. figure:: ../../images/common/vlogdt-hyperlink-show-in-config-menu.png  
       .. figure:: ../../images/common/vlogdt-hyperlink-show-in-config.png
   * - Show Associated Getters in Config DB View
     - Shows the associated get calls in the :ref:`Config DB View` for the selected set call.  
       
       .. note:: 
        
          You need to perform :ref:`UVM Runtime Elaboration` in order to populate the Config DB View. 

       .. figure:: ../../images/common/vlogdt-hyperlink-show-getter-in-config-menu.png  
       .. figure:: ../../images/common/vlogdt-hyperlink-show-getter-in-config.png
   * - Show Associated Setters in Config DB View
     - Shows the associated set calls in the :ref:`Config DB View` for the selected get call.  
       
       .. note:: 
          
          You need to perform :ref:`UVM Runtime Elaboration` in order to populate the Config DB View.  
       
       .. figure:: ../../images/common/vlogdt-hyperlink-show-setter-in-config-menu.png  
       .. figure:: ../../images/common/vlogdt-hyperlink-show-setter-in-config.png
   * - Show in Factory Overrides View
     - Shows the selected UVM factory override call in the :ref:`Factory Overrides View`.  
       
       .. note:: 
        
          You need to perform :ref:`UVM Runtime Elaboration` in order to populate the Factory Overrides View.  
          
       .. figure:: ../../images/common/vlogdt-hyperlink-show-in-factory-overrides-menu.png  
       .. figure:: ../../images/common/vlogdt-hyperlink-show-in-factory-overrides.png
   * - Show in Registers View
     - Shows the selected UVM register in the :ref:`Registers View`.  
       
       .. note:: 
        
          You need to perform :ref:`UVM Runtime Elaboration` in order to populate the Registers View.  
       
       .. figure:: ../../images/common/vlogdt-hyperlink-show-in-registers-menu.png  
       .. figure:: ../../images/common/vlogdt-hyperlink-show-in-registers.png

When the identifier under the cursor is a **macro** that expands to a single identifier, you can also see all the hyperlinks available for the **macro replacement**.

For example you can open the declaration or show the usages of a macro replacement, which is a class, as seen below:
 
.. list-table::

   * - Open Declaration of a Macro Replacement
     - .. figure:: ../../images/common/vlogdt-hyperlink-to-open-declaration-macro-value.png  
       .. figure:: ../../images/common/vlogdt-target-of-open-declaration-macro-value2.png


Hyperlinks in Comments
~~~~~~~~~~~~~~~~~~~~~~

You can define hyperlinks in comments using the **@link** or **@see** pragmas, for example:

.. code-block::

 // @link uvm_pkg::run_test
 // For more details @see spi_if.miso and @see spi_if.mosi

Hover the hierarchical id specified after the pragma with the mouse cursor while holding down the **Ctrl** key, and click to go to the element's declaration.
Alternatively, place the editor cursor on the hierarchical id and press **F3**

.. figure:: ../../images/common/vlogdt-hyperlink-in-comment.png




The hierarchical identifier following **@link** or **@see** is of the form:

.. code-block:: 
  
 [<package_name>::<type_name>.<inner_type_name>.]<element_name>

where **<element_name>** must be a type (class, struct, module, entity, interface, etc.) or a type member (method, field, event, signal, port etc.).

.. rubric:: Examples

- @link <element_name>  

.. figure:: ../../images/common/vlogdt-hyperlink-in-comment-identifier.png




- @link <type_name>.<element_name>  

.. figure:: ../../images/common/vlogdt-hyperlink-in-comment-type-identifier.png


- @link <type_name>.<inner_type_name>.<element_name>  

.. figure:: ../../images/common/vlogdt-hyperlink-in-comment-type-innertype-identifier.png




- @link <package_name>::<type_name>.<element_name> : 

.. figure:: ../../images/common/vlogdt-hyperlink-in-comment-absolute-path.png



.. note:: 

 If **<path.to.element>** does not solve to a unique element in code, a list of navigation options is displayed. 

 .. figure:: ../../images/common/vlogdt-hyperlink-in-comment-ambiguity.png




