The "manual" way of configuring an SVEitor project is shown on this page. This takes a number of steps, and when working between multiple projects, user areas, can get a bit tedious. Fortunately this process can be automated with minimal effort.
Two XML files need to be created, after which the newly created project can be imported. The two files are .svproject and .project, which will typically reside at the top of your user area or sandbox. A simple <perl|other_favorite_scripting_language> script is all that is required to create these flies. After you create this script, it should be as easy as running the script as part of your user area creation.
The easiest way to do this process is to create and configure a project using the GUI. When you are happy with the way the project runs the project files can be used as templates for your script (or use them to modify the attached scripts).
The .project file contains the following items that I will be describing.
The project name can really be anything. The Project name is used in:
Given the above, keep the Project name short, unique, and reasonably descriptive. Often you will have multiple projects loaded into Eclipse, make it easy for yourself and others.
Example:
The project name is set when you go through new project creation in the following dialog:
In the .project file, this can be found near the top of the .project file:
<projectDescription>
<name>555_builderb_01</name>
There is a decent chance that your environment uses assorted environment variables, making it easy for your scripts to work in a user sandbox independent way. At a minimum most groups will have at least some version of SANDBOX_LOCATION or PROJECT_USER_LOCATION specified. If any of these environment variables are used in your files.f's, you'll want to include these environment variables in your project.
Using the GUI, these are added using the Project Properties>Resource>Linked Resources as shown in the picture below. Eclipse includes a number of standard variables which are useful including:
* ECLIPSE_HOME
In the example below, I have added a variable, '''CHIP''' which is identical to '''PROJECT_LOC'''. Chip in this example is the path to the root of my user sandbox.
Path variables can be identified in the ''.project'' file by looking for ''variable_list'' section as shown in the example below:
<variableList>
<variable>
<name>CHIP</name>
<value>$%7BPROJECT_LOC%7D</value>
</variable>
</variableList>
Resource filtering is another massively useful tool, which, if used can "lighten the load" for Eclipse, by filtering out files that Eclipse will never use, and should skip while indexing.
Using the GUI, you'll set these variables using Project Properties>Resource>Resource Filters. The example below shows me telling Eclipse to Exclude all files and folders, recursively that are named log.
The resource filters are stored in the .project file in the filteredResources section. Example of this given below. The last argument in the <arguments> section is the name of the directory to be excluded. In the example below we are ignoring anything in log and dir_to_exclude.
<filteredResources>
<filter>
<id>1390544795288</id>
<name></name>
<type>30</type>
<matcher>
<id>org.eclipse.ui.ide.multiFilter</id>
<arguments>1.0-name-matches-false-false-log</arguments>
</matcher>
</filter>
<filter>
<id>1390544911517</id>
<name></name>
<type>30</type>
<matcher>
<id>org.eclipse.ui.ide.multiFilter</id>
<arguments>1.0-name-matches-false-false-dir_to_exclude</arguments>
</matcher>
</filter>
</filteredResources>
The file .svproject is used by SVEditor to manage it's variables. Of these, the most important is the location of the files.f(s) which gives SVEditor a list of files in your project.
This is set via the GUI in Project Properties>System Verilog Project Properties>Argument Files.
This will appear in your .svproject file in the argFilePaths section
<argFilePaths>
<argFilePath path="${project_loc}/sim/files.f"/>
</argFilePaths>
A script is provided as a starting point for your specific environment. The script itself is reasonably simple to use. It is a Perl script. By the way, if you haven't already done so, install the EPIC perl editor in Eclipse, it rocks.
This example shows a .project/.svproject generated by Eclipse 4.3.1, and SVE version 1.5.0.
Follow the following steps to get the automation in progress:
While you are busy with the eclipse setup script, consider adding a launch configuration or two to the file. To add one create the launch configuration you want, then export it, File>Export>Run/Debug>Launch Configurations>SVEditor Build Script>your_launch_configuration. Once have the file, you can duplicate in your user area.
When you import the project you created in the above, the launch configuration(s) are automatically detected, and are ready to use.
TODO - Improve this section
It is possible to import the newly created eclipse project on the command line using the following command:
eclipse -nosplash -application org.eclipse.cdt.managedbuilder.core.headlessbuild -cleanBuild all -import <path_to_directory_containing_project_files> -data <path_to_workspace>
''Last update: August 2017''