SVEditor: For All Your Verilog and SystemVerilog Development Needs


This article focuses on a software that can be used for Verilog and SystemVerilog development projects. let us take a look at its features by installing it and setting up a project with it.

EFY Bureau

SVEditor is an Eclipse-based IDE (integrated development environment) for SystemVerilog and Verilog development. It provides a colourising editor for SystemVerilog with support for source navigation, content assist, source indent and auto-indent, SystemVerilog source templates and context-sensitive viewing of source documentation. Users have praised SVEditor for some of its features, such as searching for a colourisation of SystemVerilog keywords or words in a directory, auto-completion and some content assist. They believe you can use SVEditor for debugging if you love emacs. Quoting from, one user has said, “I’m totally stoked that this project is under active development. The tool is already very useful. Keep up the good work!”

Fig. 1: Install New Software menu

SVEditor provides a variety of features that make developing designs and test-bench environments in SystemVerilog simpler and more efficient. The software provides many ways to navigate across the project source. The ‘Open Declaration’ option navigates to the location of the item’s declaration like class, module, interface, field or method. By clicking the ‘Open Type Hierarchy’ tab, it opens the ‘Type Hierarchy’ view for the specified class or module. Another feature, called ‘Doc Hover,’ displays the code documentation when hovering around the documented element. The New Class/Interface/Module Wizards can be used to quickly create new files containing a class, interface, or module. The ‘Open Class Diagram’ displays a UML-style class diagram of the target class.

How to install SVEditor
Listed below are several ways to install SVEditor.

A combination of Eclipse and SVEditor, SVE provides a complete development environment for SystemVerilog. It is provided as an installable package for Debian and the Windows operating systems. If you are not already an Eclipse user, SVE is the simplest way to get started with SVEditor.

Fig. 2: Setting up an SVE project

Installing SVEditor in an existing Eclipse environment. Via the SVEditor Update Site, SVEditor can be installed into an existing Eclipse environment. All you need to do is to open the ‘Install New Software’ dialogue box by selecting the ‘Help-Install New Software’ option (in Eclipse) as shown in the Fig. 1. As you can see in the figure, a new dialogue box opens up. Then, select ‘Add’ and specify the URL of the SVEditor update site, as shown, and select ‘OK.’ The ‘Installation Wizard’ will get updated to show the SVEditor feature. By selecting the SVEditor feature and then clicking on ‘Next,’ you will be prompted to agree to SVEditor’s licence (EPL). Simply continue selecting ‘Next’ until the install process completes.

Updating SVEditor. With a new release every other week (on an average), SVEditor continues to grow and improve. Staying updated with the latest version will only provide you access to the latest features and bug fixes. Updating an Eclipse plug-in is simple. Select the tab ‘Help’ and click on ‘Check for Updates’ from the main IDE menu.

Updating SVE. If you have installed one of the SVE packages, updating the SVEditor plug-in will involve a procedure nearly identical to the one explained above. When SVE is installed, the SVEditor plug-in is typically installed by the systems administrator. As a result of this, a normal user cannot update the plug-in. SVE must be started by an administrator in order to update the SVEditor plug-in.

Fig. 3: Customising linked resources

Post installation
Getting started on an SVEditor project. An SVEditor project must be created and configured before editing the source with SVEditor. There are five main steps to setting up an SVEditor project. They are listed below:

1. An Eclipse project around the source must be created
2. Variables must be set to point to the external sources
3. An argument file must be created, in order to specify the root files
4. Specify the SVEditor project properties
5. Rebuild the project and check the results

This step-by-step guide will use the ‘UBus’ example, provided as part of the UVM package, as an example.

As listed above, 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 ‘UBus’ example, the source that we are most interested in is the source for the UBus testbench environment. Begin creating an Eclipse project by selecting New->Project… from the main menu, as shown in Fig. 2.

Expand the ‘General’ category, if required, and select ‘Project.’ Next, the project name must be specified and the physical location of the source files selected. To achieve this, follow the steps given below:

1. Specify the project name as ‘ubus’
2. The ‘Use default location’ check box must be unchecked
3. Click the ‘Browse’ button, select the location and then navigate to the directory where the source is located.

To create the project around the existing UBus source, select ‘Finish.’ The new UBus project will be shown in the Project Explorer.

Set external-source variables. Most test-bench environments, except a few, use some external components. These could be components that are shared across projects, verification IP, or verification methodology libraries. By defining a variable that points to the external source, these external components could be referenced, which is one of the easiest ways of doing this.

Do note that if an environment variable points to the external component, this particular variable can be used directly. There would be no need to define a variable, as described in this section. The UBus project depends on the UVM library. You must 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, as shown in Fig 2. 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.

Creating argument files. Source files include paths, and the other directives are specified to SVEditor via an argument file. Argument files should have a ‘.f’ file extension. For the UBus project, it is necessary to create a single argument file to specify file and include paths. First, select the UBus project in the ‘project explorer,’ and then select New->File from the context menu. Specify the name of the new file as ‘ubus.f,’ then select ‘Finish.’

It is important to determine the file paths that should be specified in the argument file. Currently, the UBus project uses a ‘Makefile’ to compile the sources. Expand the examples sub-directory of the UBus project, then open the ‘Makefile.questa’ file.

Locate the comp target within the ‘Makefile.’ From the compilation command we can determine the files that must be specified to SVEditor (refer Fig. 4).

From this command, we can see the following tasks need to be done:

1. Specify an include path to ‘sv’ directory
2. Specify ‘examples/’ as a source file

Unfortunately, we’re not quite done yet. The UVM examples specify core include paths and root files as part of the definition of the VLOG variable. The VLOG variable is defined in the common ‘Makefile.questa’ file.

From the definition of the VLOG variable, you can see that we also need to specify the following:

1. Specify an include path to ‘${UVM_HOME}/src’
2. Specify ‘${UVM_HOME}/src/’ as a source file
3. Enter the following information in the argument:


Note that content-assist for paths in the argument file can be triggered with ‘CTRL+SPACE.’ The screenshot shows content assist being invoked on the ${UVM_HOME} directory (refer Fig. 4).

Fig. 4: Configuring the UBUS project to point to the argument file

Specify project properties
After setting up the argument file, we now must configure the UBus project to point to the argument file. Select the UBus project as shown, then select ‘Properties’ from the context menu. Select the ‘SystemVerilog Project Properties’ category. Now, select the ‘Add’ button to add a new argument file. Select the ‘Add Project Path’ button in the resulting dialogue box, then select ‘ubus.f’ in the file browser.

Rebuild the project and check the results
Finally, we need to rebuild the project index and confirm that the project paths are properly specified. The index can be rebuilt 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.

651_box-2Recent changes in SVEditor
1. For nearly every SystemVerilog language feature, moving from scanner-based source analysis to a recursive-descent parser has been achieved. A few language features, inclusive of assertions, are still analysed via a scanner. But these are now in the minority, and will eventually be handled via the full parser.

2. The persistence strategy has been modified to depend on a translation-unit-based cache backed by filesystem storage. This increases the granularity of the cache, and doesn’t allow unnecessary portions to reside in memory.

3. The opening of the textual and structural components of a file have been decoupled. In the new release, the textual element of the file is immediately displayed in the editor. Meanwhile, a background thread works on any required parsing tasks to obtain the structural element of the file.

According to the developer, this strategy would allow important new functionality to be introduced and evaluated, while still admitting daily users of SVEditor to continue to utilise the stable release.

What’s new in SVEditor 1.2.8
1. An issue that resulted in certain operators not being correctly coloured in the editor was corrected. Operator lists were stored in different places in the code, but now all the operators are listed in the SVOperators class.

2. An off-by-one line numbering issue with the Argument File editor was corrected. This issue caused errors to be annotated one line off from where they should have been positioned.

3. There is now an enhanced argument-file editor to react to resource-variable changes.

4. A build issue with the 1.2.7 version, which caused the template-instantiation wizard not to load, has been corrected.

5. Support has been enhanced for editing files (that were not a part of an index), but within a project where configuration of indexed files occurs. This happens frequently, for example, when a new file is added to a project. With these enhancements, macro-definitions are pulled from the project’s index.

6. A bug that involved ‘selected-word highlighting’ for words containing regular-expression character was corrected.

7. A bug that involved ‘first_match’ in an assertion was corrected.

8. A bug that involved ‘within’ being used within an assertion was corrected.

The future of SVEditor
There are many helpful features that developers would want to add to SVEditor. These include:

1. Locating references in the project sources to classes, methods, fields, etc.
2. Re-factoring support–renaming classes, methods, etc.
3. A more detailed analysis of the source structure.
4. Support for large design descriptions and the test bench.
5. Further distinguish the task of editing from parsing the source structure.

Download latest version of the software: click here


Please enter your comment!
Please enter your name here