Project Setup: Truss example
This second example shows how to create a project file that excludes specific files and directories inside a top-level directory. In this project, every testbench configuration has the same file name which leads to conflicts when trying to resolve modules and classes.
Note! This example skips a few click-through steps as it assumes you are familiar with the first UVM project example that in more detail shows how to define a project and include the UVM package. This example uses Linux if you use Windows or Mac some shortcuts are different.
This example creates a project file for the quad UART configuration. The quad UART testbench is a top-level environment that combines the block UART and ALU block level configurations for chip level tests.
The projects compile script requires that specific files, like
testbench.sv, exists for each configuration. For IntelliJ navigation to work well, we need to exclude the files that do not belong to the current configuration.
Excluding files is easy to do! Let's get started.
Get access to example code.
This project uses example code from an open-source verification library called Truss available on GitHub. In a terminal, from an appropriate directory, clone the example directory to an with the following command. In IntelliJ, you can open a terminal with
[Alt][F12] or use search for any command,
[Ctrl][Shift][A] and search for "terminal."
git clone https://github.com/rekendahl/edaphic-studio-truss-project.git edaphic_demo
Import the main configuration directory.
1: Start IntelliJ and choose "File->New->Project from existing sources" or better use the find any command keymap,
[Ctrl][Shift][A], to bring up the action search window. The search for any command pane uses fuzzy matching, so you type something like "new proj exis" to find the "Project from existing sources..." command
2: From the open file manager choose to import the
edaphic_demo/examples/quad_uart directory. The import wizard presents four import screen with default choices. The default choices work for this example so keep hitting the [Next] and then [Finish] buttons to get to the main screen.
3: IntelliJ presents an "Unregistered VCS root detected" pop-up. Click on the pop-up to expand it and choose "Add root" which connects the built-in graphical revision system with your project.
Add Teal and Truss external libraries
Exluding specific directories
After the import we still have the same file names and module names in a couple of locations. In this step we remove the files that are not compiled by the build script.