Scripts
dvt.sh
DVT Eclipse IDE Launcher
dvt.sh [-h[elp]] [-site site] [-bg] [-dvt_log_location <file>]
[-workspace <dir> [-import_workspace_settings <dir> | -force_import_workspace_settings <dir>]]
[-eclipsespace <dir>] [-heap_size <size>] [-stack_size <size>] [-options <opt>] [-eclipse_args <args> --]
-help Show this help.
-bg Launch DVT in background.
-dvt_log_location <file> Path to the log of stdout/sterr. Default is /tmp/dvt_log_<PID>.
-workspace <dir> Path to the eclipse workspace (temporary eclipse directory).
-import_workspace_settings <dir> Path to the eclipse workspace from which settings will be imported.
-force_import_workspace_settings <dir> Same as -import_workspace_settings, but it will overwrite target workspace settings.
-eclipsespace <dir> Path to the Eclipse configuration and user area. Default is /home/user/.eclipse.
-heap_size <size> Set the Java heap size (syntax is <N>[g|G|m|M|k|K]). Default is 3072m.
-stack_size <size> Set the Java thread stack size (syntax is <N>[g|G|m|M|k|K]). Default is 4m.
-options <option list> Comma separated list of options:
disable_browser - do not use SWT browser component and skip auto-config
disable_swt_auto_config - do not auto-config SWT GTK version and SWT browser engine
disable_chromium - do not use bundled Chromium browser engine
disable_xulrunner - do not use bundled XULRunner browser engine
disable_webkit - do not use OS's WebKit browser engine
disable_cairo - do not use Cairo advanced graphics library
disable_force_gtk2 - do not force Eclipse to use GTK2
disable_gtk_theme - do not use custom GTK2 themes generated through DVT
disable_force_classic_theme - do not force Eclipse to use the classic theme
disable_shutdown_timeout - do not force stop JVM when shutdown exceeds 5 seconds
disable_chromium_mtml - do not use Chromium multithreaded message loop
disable_chromium_launcher_library - do not use Chromium launcher library
disable_chromium_early_init - do not use early init for Chromium browser engine
dump_allocated_swt_resources - dump SWT allocated resources when 'No more handles' error is thrown
-eclipse_args <args> A list of eclipse.ini arguments to be passed directly to the Eclipse binary.
To indicate the end of list use -- argument.
See also
Examples
Start DVT without any option. You will be prompted for the workspace location.
$> dvt.sh
Start DVT with the maximum heap size of 4096 MB. You will be prompted for the workspace location.
$> dvt.sh -heap_size 4096m
Start DVT in the specified workspace.
$> dvt.sh -workspace /home/$USER/dvt/workspace
Start DVT in the specified workspace and use the specified Eclipse configuration and user area (plugins installed by user on top of a shared installation).
$> dvt.sh -workspace /home/$USER/dvt/workspace -eclipsespace /path/to/$USER/dvt/eclipsespace
Start DVT with a custom configuration file. The default is $DVT_HOME/eclipse/eclipse.ini.
$> dvt.sh -eclipse_args --launcher.ini /home/$USER/dvt/eclipse.ini
dvt_cli.sh
dvt_kit_installer.sh
This script is a command line utility that can be used to install / uninstall plugins delivered with the DVT Kit Distros.
The script allows you to enable in a DVT distro any of the following plugins:
Available Plugins
- Revision Control System Plugins:
CVS (org.eclipse.cvs)
CLEARCASE (net.sourceforge.eclipseccase)
GIT (org.eclipse.egit)
PERFORCE.2020 (com.perforce.team.feature)
SVN (org.eclipse.team.svn)
- Language Support Plugins:
BASH (de.jcup.basheditor)
CPP (org.eclipse.cdt)
JAVA (org.eclipse.jdt)
JSON (jsonedit-feature)
PERL (org.epic.feature.main)
PYTHON (org.python.pydev.feature)
TCL (org.eclipse.dltk.tcl)
YAML (de.jcup.yamleditor)
- Review and Task Management Plugins:
GERRIT (org.eclipse.egerrit.feature)
MYLYN (org.eclipse.mylyn_feature)
- Other Plugins:
EDITOR_CONFIG (editorconfig-eclipse-feature)
Usage
dvt_kit_installer.sh [options] operation
OPTIONS:
The options must be specified before the operation
[-w|workspace <dir>]
- Temporary workspace directory (default /tmp/)
[-s|simulate]
- Simulate the operation
[-h|help]
- Display this help
OPERATIONS:
The operation must be specified after the options and only one operation
can be specified followed by a list of plugins (containing at least one plugin)
[-i|install <space separated list of plugins>]
- Install the plugins specified in the list
[-d|delete|uninstall <space separated list of plugins>]
- Uninstall the plugins specified in the list
[-l|list]
- List the plugins installed with this script
Examples
Install the plugins for GIT and C++
$DVT_HOME/bin/dvt_kit_installer.sh install GIT CPP
Uninstall the plugin for GIT
$DVT_HOME/bin/dvt_kit_installer.sh uninstall GIT
List installed plugins
$DVT_HOME/bin/dvt_kit_installer.sh list
Simulate the installation of the JAVA plugin
$DVT_HOME/bin/dvt_kit_installer.sh -s install JAVA
dvt_plugin_installer.sh
This script is a command line utility that can be used to install/uninstall/update plugins from any type of update site into the DVT Eclipse distribution.
Usage: $DVT_HOME/bin/dvt_plugin_installer.sh ...
[-i|install <feature>]*
- The name of the feature to be installed
[-d|delete|uninstall <feature>]*
- The name of the feature to be uninstalled
[-u|update <feature>]*
- The name of the feature to be updated
[-r|repo|repository <uri>]*
- Repository URI or filesystem path
[-w|workspace <dir>]
- Temporary workspace directory for this script (default /tmp/)
[-s|simulate]
- Simulate the operation
[-l|list]
- List installed features
[-h|help]
- Display this help
Examples
Update DVT offline from a downloaded archived update site:
$DVT_HOME/bin/dvt_plugin_installer.sh \
repo /path/to/dvt_update_site-*.zip \
update ro.amiq.dvt.feature
Update DVT from online update site:
$DVT_HOME/bin/dvt_plugin_installer.sh \
repo https://eda.amiq.com/update/latest/ \
update ro.amiq.dvt.feature
Uninstall a plugin (ViPlugin) from the distribution:
$DVT_HOME/bin/dvt_plugin_installer.sh \
delete com.mbartl.eclipse.viplugin.feature
List all installed plugins:
$DVT_HOME/bin/dvt_plugin_installer.sh list
dvt_build.sh
This script allows you to use the DVT compiler in batch mode.
dvt_build.sh
[-cmd <command file>]
[-compile_waivers <XML file>]
[-custom_report_location <directory>]
[-gen_custom_report <FTL file>]
[-heap_size <size>]
[-help]
[-ignore_build_config_errors]
[-license_queue_timeout <timeout>]
[-print_all_compile_problems]
[-lang <language>]
[-log <log file>]
[-print_compile_waivers_info]
[-silent]
[-stack_size <size>]
[-version]
Where:
[-cmd <command file>]
Optional. Compile using the specified compilation arguments file.
If not specified, compilation arguments are automatically detected by scanning the current working directory for source files.
[-compile_waivers <XML file>]
Optional. Waive compilation errors using the waivers specified in the XML file. Waivers specified with this flag will have the highest precedence.
[-custom_report_location <directory>]
Optional. Destination directory for the custom build report.
[-gen_custom_report <FTL file>]
Optional, one or more. Generate a custom report using the specified template.
[-heap_size <size>]
Optional. Set the Java heap size (syntax is <N>[g|G|m|M|k|K]). Default is 3072m.
[-help]
Print help and exit.
[-ignore_build_config_errors]
Optional. Ignore build configuration errors.
[-license_queue_timeout <timeout>]
Optional. Maximum time in seconds to wait in queue for a license when one is not available.
[-print_all_compile_problems]
Optional. Print all compile problems. Include waived problems if used with "-print_compile_waivers_info".
[-lang <language>]
Mandatory. Enable support for the specified language (e, vlog, vhdl).
[-log <log file>]
Optional. Log to specified file.
[-print_compile_waivers_info]
Optional. Prints how many problems each compile waiver has matched.
[-silent]
Optional. Turn on minimal output.
[-stack_size <size>]
Optional. Set the Java thread stack size (syntax is <N>[g|G|m|M|k|K]). Default is 4m.
[-version]
Print version and exit.
Exit code
0 : The compilation completed successfully: at least a source file got analyzed and no configuration or compilation errors were reported
1 : Either no source files were compiled or configuration/compilation errors were encountered
Examples
Compile using the specified arguments file in mixed SystemVerilog + VHDL language:
dvt_build.sh -lang vlog -lang vhdl -cmd my_compile.args
Compile and generate a custom report using the specified template file:
dvt_build.sh -lang vlog -cmd my_compile.args -gen_custom_report template.xml.ftl
Custom Report
To generate a custom compilation report in a text-based format starting from a template use the -gen_custom_report
.
You must provide the path to a FreeMarker template file (see FreeMarker).
By default the custom report is generated in the current working directory. Specify a different location using -custom_report_location
.
Inside the template file, information about the compilation results can be obtained using the API available on the ${builder} variable.
Main API
getAllProblems(): returns a list of all the compile problems
getAllWaivers(): returns a list of all the compile waivers
getAllFiles(): returns a list of all the compiled files in compilation order; a file may be compiled multiples times
getTotalCompilationTimeFormatted(): returns the total compilation time
getTotalCompilationTimeMilliseconds(): returns the total compilation time in milliseconds
getNofCompiledLines(): returns the total number of compiled lines
Problems API
getId()
getSeverity()
getMessage()
getLine()
getFile()
Waivers API
getDescription()
getName()
getSeverity()
getFile()
getLine()
getHitCount(): how many problems a waiver has matched
getMatches(): returns the waiver’s “match” clauses
Match Clause API
getPath()
getMessage()
File API
getPath()
getCompileSyntax(): returns the language and language version that was used to compile a file (e.g. Verilog_2001)
getNofLines()
getCompileIndex()
getCompileTime()
Custom Report Examples
Example 1 - XML Report Template
<report>
<#list builder.getAllProblems() as problem>
<problem
id="${problem.getId()}"
severity="${problem.getSeverity()}"
line="${problem.getLine()}"
message=<#if (problem.getMessage())?has_content>"${problem.getMessage()}"<#else>"*"</#if>
file="${problem.getFile()}"
/>
</#list>
</report>
The resulting XML file will look like this:
<report>
<problem
id="MISSING_PORT_CONNECTION"
severity="WARNING"
line="5"
message="MISSING_PORT_CONNECTION: Missing port connection to input port(s) 'bist_req_i'"
file="mx_1/top.v"
/>
<problem
id="IMPLICIT_LIBRARY_ACCESS"
severity="WARNING"
line="31"
message="IMPLICIT_LIBRARY_ACCESS: Access to 'work' library is implicit; the library clause can be removed"
file="mx_1/jop/ext/gaisler/srctrl.vhd"
/>
</report>
Example 2 - JSON Report Template
{
"nofCompiledLines":"${builder.getNofCompiledLines()}",
"compilationTime":"${builder.getTotalCompilationTimeFormatted()}"
"files": [
<#list builder.getAllFiles() as file>
{
"filePath":"${file.getPath()}",
"compilationTime":"${file.getCompilationTime()}",
"fileNofLine":"${file.getNofLines()}",
"fileSyntax":"${file.getSyntax()}",
"fileCompilationIndex":"${file.getCompilationIndex()}",
},
</#list>
],
"waivers": [
<#list builder.getAllWaivers() as waiver>
{
"waiverName":"${waiver.getName()}",
"waiverSeverity":"${waiver.getSeverity()}",
"waiverDefLine":"${waiver.getLine()}",
"waiverDescription":<#if (waiver.getDescription())?has_content>"${waiver.getDescription()}"<#else>"*"</#if>,
"waiverFile":"${waiver.getFile()}",
"waiverHitCount":"${waiver.getHitCount()}",
"waiverMatches": [
<#list waiver.getMatches() as match>
{
"matchPath":<#if (match.getPath())?has_content>"${match.getPath()}"<#else>"*"</#if>,
"matchMessage": <#if (match.getMessage())?has_content>"${match.getMessage()}"<#else>"*"</#if>,
},
</#list>
]
},
</#list>
] ,
"problems": [
<#list builder.getAllProblems() as problem>
{
"problemId":"${problem.getId()}",
"problemSeverity":"${problem.getSeverity()}",
"problemLine":"${problem.getLine()}",
"problemMessage":<#if (problem.getMessage())?has_content>"${problem.getMessage()}"<#else>"*"</#if>,
"problemFile":"${problem.getFile()}",
},
</#list>
]
}
The resulting JSON file will look like this
{
"nofCompiledLines":"22,602",
"compilationTime":"5s.531ms"
"files": [
{
"filePath":"mx_1/top.v",
"compilationTime":"305",
"fileNofLine":"190",
"fileSyntax":"Verilog_2001",
"fileCompilationIndex":"1",
},
{
"filePath":"mx_1/i2c_master_slave_core/verilog/rtl/controller_interface.v",
"compilationTime":"71",
"fileNofLine":"547",
"fileSyntax":"Verilog_2001",
"fileCompilationIndex":"2",
},
"waivers": [
{
"waiverName":"SIGNAL_NEVER_USED",
"waiverSeverity":"DISABLED",
"waiverDefLine":"21",
"waiverDescription":"*This waiver disables all problems that contain 'SIGNAL_NEVER_USED' inside their message AND were reported under 'mx_1/jop/vhdl/top/'.",
"waiverFile":"mx_1/.dvt/waivers.xml",
"waiverHitCount":"146",
"waiverMatches": [
{
"matchPath":"mx_1/jop/vhdl/top/",
"matchMessage": "SIGNAL_NEVER_USED: Signal is never used",
},
{
"matchPath":"*",
"matchMessage": "*SIGNAL_NEVER_USED*",
},
]
},
{
"waiverName":"",
"waiverSeverity":"ERROR",
"waiverDefLine":"25",
"waiverDescription":"*",
"waiverFile":"mx_1/.dvt/waivers.xml",
"waiverHitCount":"6",
"waiverMatches": [
{
"matchPath":"mx_1/jop/vhdl/simulation/tb_jop_iic.vhd",
"matchMessage": "NON_STANDARD_API: Unexpected method/",
},
{
"matchPath":"''",
"matchMessage": "*SIGNAL_NEVER_WRITTEN*",
},
]
},
],
"problems": [
{
"problemId":"MISSING_PORT_CONNECTION",
"problemSeverity":"WARNING",
"problemLine":"5",
"problemMessage":"MISSING_PORT_CONNECTION: Missing port connection to input port(s) 'bist_req_i'",
"problemFile":"mx_1/top.v",
},
{
"problemId":"MISSING_PORT_CONNECTION",
"problemSeverity":"WARNING",
"problemLine":"5",
"problemMessage":"MISSING_PORT_CONNECTION: Missing port connection to output port(s) 'bist_ack_o, bist_err_o'",
"problemFile":"mx_1/top.v",
}
]
}