Before editing source with SVEditor, an SVEditor project must be created and configured. There are five steps to setting up an SVEditor project:
This step-by-step guide will use the UBus example, provided as part of the UVM package, as an example.
The first step in setting up an SVEditor project is to create an Eclipse project around the source to be edited. In the case of this example, the source that we are most interested in is the source for the UBus test bench environment. A video is available showing project Creation..
If you already have an argument file(s) please skip this step.
Source files, include paths, and other directives are specified to SVEditor via an argument file. Argument files should have a .f file extension.
There are two mechanisms for creating argument files within Eclipse:
An argument file tells the Eclipse which files are included in the project. If you didn't add the argument file in the wizard, or have your own argument file, the following steps show you how this can be added to the Eclipse Project.
Finally, we need to rebuild the project index and confirm that the project paths are properly specified. Rebuild the index by selecting the ubus project, then selecting Rebuild SV Index from the context menu.
After the project index is rebuilt, source files managed by the index will be shown with a small blue dot in the project explorer.
Note: that the source files, and files included by the root files, are annotated with a blue dot. Note that files that are not included in the index, such as the Makefiles, are not annotated with a blue dot.
Many, if not most, test bench environments use some external components. These components could be verification IP, components that are shared across projects, or verification methodology libraries.
One of the easiest ways to reference these external components is to define a variable that points to the external source.
Note: If an environment variable points to the external component, this variable can be used directly. There is no need to define a variable, as described in this section.
The ubus project depends on the UVM library. We will define a variable named UVM_HOME to point to the installation location of the UVM library. We will refer to this variable when specifying the files for SVEditor to parse.
Select Window->Preferences from the main Eclipse menu.
Navigate to the General->Workspace->Linked Resources category.
Select the New button, and specify the name of the variable and path to the file or folder. In this case, we specify UVM_HOME as the variable and the location where the UVM library is installed.
On larger projects it becomes useful to have Eclipse ignore selected resources or include only selected resources. Files to exclude are typically generated files, that just add clutter to the Eclipse workspace. Examples may include:
These can be configured in the Verilog Properties as follows:
Note: When this is done your Project Explorer view will reflect these changes (not show resources filtered out / be limited to selected resources), and Open Resource Ctrl+Shift+R will no longer list excluded resources.
It is reasonably easy to automate the generation of the project files used by eclipse to work on your project and save having to go through all the steps above each time you create a new user area / switch projects.
Please refer to the Automating Project Setup page for more details.
Last updated February 2018, v1.8.4