How to Automate Project Bring-up Using the DVT Eclipse IDE CLI
Description
Get a ready-to-use DVT project with a single command using the DVT Command Line Interface.
The DVT Command Line Interface allows you to seamlessly integrate DVT in your flows. This video covers the common use-cases for project bring-up: reuse of simulator arguments, dealing with huge cluttered project layouts, connecting to the version control system.
This video was shot using DVT 21.1.6
Explore the design and verification tools: https://www.dvteclipse.com
Or request a license: https://www.dvteclipse.com/request-license
Transcript
In DVT, you can automate project creation and configuration using the command-line interface. The dvt_cli.sh
script is in the bin
directory of the DVT distribution.
Running the createProject
Command
The mandatory arguments of the create
project command are the path to the project location and the project language. In case you are working on a mixed-language project, use the -lang
argument multiple times with any of the languages that DVT supports, for instance a mixed SystemVerilog and VHDL project.
The first time it's executed, the script will open the tool. Subsequently, if DVT is already running in the specified workspace, it will reuse the existing session. Note that the project is automatically created with the specified languages enabled.
Default Build File and Autoconfiguration
A default build file is generated containing a single build autoconfig directive. This directive tells DVT to scan the project and figure out what needs to be compiled. Once the build is done, the tool is ready to use.
Specifying Build Configuration from the Command Line
Optionally, we can specify the build configuration from the command line. This is done using the -default.build
argument, followed by a list of compilation directives, such as top files, incdirs, defines, and so on. Be aware that all flags that come after the -default.build
switch, up to the end of the command line, are considered build configuration directives.
If you already have some file lists or argument files that you pass to the simulator, you can simply reuse them. Usually, we first specify the +dvt_init
compilation directive, followed by a compatibility mode, because it tells DVT how to interpret the simulator-specific arguments that follow.
Multiple Build Configurations
Of course, you can specify multiple build configurations, such as test bench only, RDL only, SoC, ABV on, etc., and also instruct the tool which one to build. In this simple example, default
is just a name.
Recreating Projects Using the Force Flag
As you can see, since the project is already created, we need to use the -force
flag in order to recreate the project. In case you prepared the build configuration file upfront, perhaps using a different script, just omit the flag from the CLI invocation. DVT will automatically use the existing build file.
Excluding Irrelevant Files to Improve Performance
Huge file system hierarchies under the project directory, such as regression results, generated documentation, or similar artifacts, may slow down the platform. Most of the time, such resources are not relevant within the IDE. To automatically exclude any file or directory which is not relevant for compilation, use the -include auto
argument on the command line. Note that the Project Explorer now only presents directories containing compiled sources, and everything else is hidden.
You can further tune what files and directories should be available in the IDE via the -include
, -exclude
, and -map
switches.
Connecting Your DVT Project to Version Control
The command-line interface also allows you to connect your DVT project to version control. Just make sure to use the proper CLI arguments depending on what you are using. For example, to connect it to a Git repo, add the -git
option followed by the path to the Git repository.
Conclusion
In this video, we've only covered the basics. The DVT CLI has many more features and represents the right way to go for a seamless, reusable flow integration.