.. _Non-top files:

Non-top files
=============

.. rst-class:: lead

    Some of the source files in your project might not be part of the full compilation (they are not referenced from the .dvt/default.build).

For example code fragments which have not been integrated yet, or components which are part of a different build configuration than the active one (see :ref:`Multiple .build Files`).
For convenience, all such files are called **non-top files**.

You can easily identify non-top files as they are missing the blue bullet decoration in Eclipse / the **C** decoration in VS Code.

In order to provide advanced functionality when editing non-top files, DVT compiles them ad-hoc when opened, in the global scope.
As a result, new problems might be reported and DVT's internal database is updated, which is reflected in the contents of views, autocomplete, design and class hierarchies etc.   

When you are done editing a non-top-file and close the editor, all the content contributed by that file is removed: problem markers, types and API, etc.

.. note::
    
    Verilog non-top-files are compiled as if part of a library called "non-top-files".

.. note::
    
    The message of problems reported in non-top files are prefixed with an underscore. This is an indication that problems may be caused by compiling a file ad-hoc out of context.

.. note::
    By default, the non-top-files compilation is enabled. You can disable it by specifying the ``+dvt_disable_nontop_files_compilation`` directive. 
