Use Cases
=========

.. rst-class:: lead

    Using the same settings across all workspace and projects can be achieved by configuring the corresponding file and adding it in the user location (where ``$DVT_USER_SETTINGS`` points to).

To share the settings with other users you must put the setting files in a common location and set ``$DVT_COMMON_SETTINGS`` to that location.

A recommended work-flow for sharing any type of settings with other users is:

#.  Start DVT in a clean workspace
#.  Customize preferences
#.  Define run configurations, compile waivers, etc. on a reference project and move the corresponding files in the user location (available under *DVT-Settings/user*)
#.  Close DVT and move the files from the user location to a common location where all users can point the ``$DVT_COMMON_SETTINGS`` system variable


Memory Allocation Thresholds
~~~~~~~~~~~~~~~~~~~~~~~~~~~~



Create or modify the **eclipse.ini** file in the user settings location and add the new memory arguments. For example:
 -vmargs

 -Xmx2048m

 -Xss1m

After adding the new memory thresholds every DVT instance will use them. If you want to change the memory only for a single invocation of DVT you can use the dvt.sh arguments (-heap_size corresponding to -Xmx and -stack_size corresponding to Xss) in the command used to invoke DVT.

To share this configuration with other users you can put the eclipse.ini file in common location. Users will still be able to change the settings using an eclipse.ini in the user location.

Workspace Preferences
~~~~~~~~~~~~~~~~~~~~~



Workspace Preferences are automatically saved in the user location **preferences.ini** file. Reusing them across workspaces is automatically achieved.

To share a set of preferences you must copy the preferences.ini file in the common location.

Some workspace preferences that are usually shared between users are:

-  Key Bindings - :menuselection:`General --> Keys`
-  Code Templates - :menuselection:`DVT --> Code Templates`
-  Task Tags - :menuselection:`DVT --> Task Tags`
-  Formatting - :menuselection:`DVT --> e Language / SystemVerilog / VHDL --> Editor --> Formatting`
-  Tab width and spaces - :menuselection:`General --> Editors --> Text Editors`

Run Configurations
~~~~~~~~~~~~~~~~~~



Run Configurations can be used to launch 3rd party tools and can be reused across workspaces and projects by using the :menuselection:`Common Tab --> Save as --> Shared file` and save it in **DVT-Settings/user** project directory.

To share them with other users move them in the common location.

Compile Waivers
~~~~~~~~~~~~~~~



You can create :ref:`Compile Waivers` for libraries or IPs using a reference project and copy the **<project>/.dvt/waivers.xml** file in the user location to make it available for all projects.

To share them with other users move them in the common location.

Content Filters
~~~~~~~~~~~~~~~



You can create Content Filters for libraries or IPs using a reference project and copy the **<project>/.dvt/content_filters.xml** file in the user location to make it available for all projects.

To share them with other users move them in the common location.

External Builders
~~~~~~~~~~~~~~~~~



You can create |external-builder| to invoke any 3rd party script or tool and back-annotate the output to the source code using the |new-external-builder|. The external builders will be saved in **<project>/.dvt/external_builders.xml** and you can reuse them by copying the file in the user location.

Export HTML Documentation
~~~~~~~~~~~~~~~~~~~~~~~~~



To use the same settings for |export-documentation| regardless of the project where you create the documentation you must generate a documentation using the desired settings. They will be saved in the **<project>/.dvt/dvt_export_html.xml** file. You can manually edit the file to remove specific settings like the  tag.

The file can be moved afterwards in the user or common locations.


Custom Pragmas
~~~~~~~~~~~~~~



You can create :ref:`Custom Pragmas` to emphasize generated regions of code. They will be saved in <project>/.dvt/custom_pragmas.xml and you can reuse them by copying the file in the user location.

To share them with other users move them in the common location.

