Tips and Tricks

Editing

  1. Content assist
  2. [1.4.0]Content assist for enumerated types
  3. [1.5.0]Content assist for macros
  4. Code templates
  5. [1.4.0]Matching brackets
  6. Toggle comment
  7. Format source
  8. One key indentation
  9. NEWReminders (TODO markers)
  10. Check Naming Conventions
  11. Spell checking
  12. Folding
  13. Maximize editor
  14. Show line numbers
  15. Go to line
  16. Back/Forward navigation
  17. Go to last edit location
  18. Local history (backup)
  19. Inactive Code Highlight
  20. NEWMacro Expansion
  21. NEWQuick Macro Inspect

Navigation

  1. Tooltips
  2. Hyperlinks
  3. [2.0.0]Inheritance tree and members
  4. [2.0.0]Instance tree of a unit
  5. [2.6.0]Class Diagrams
  6. [1.5.0]Macro Hyperlinks and Tooltips
  7. Scope
  8. [1.4.0]Quick Types
  9. [1.5.0]Quick Macros
  10. [1.4.0]Quick Outline
  11. [1.4.0]Quick Layers
  12. [1.4.0]Quick Load Order
  13. [1.4.0]Quick Hierarchy
  14. Layers
  15. [1.4.0]Event Layers
  16. Types
  17. Checks
  18. Coverage
  19. [1.5.0]Macros
  20. Load Order
  21. Outline
  22. Mark occurrences
  23. Bookmarks

Searching

  1. [1.4.0]Search for method, field, event etc.
  2. [1.5.0]Search for references
  3. [1.5.0]See macro instances
  4. [2.0.0]See all defines, undefs and ifdefs for a specific macro
  5. [1.4.0]Search for whole word

Miscellaneous

  1. All shortcuts
  2. Project Properties
  3. [2.5.0]OVM Compliance Review
  4. [2.4.0]Export HTML Documentation
  5. [2.3.0]Project Templates
  6. [2.3.0]System Variables in Top Files or SPECMAN_PATH
  7. Generic launch (make, scripts etc.)
  8. Load in Specman
  9. [2.3.0]External Builders
  10. [2.3.0]External Documentation
  11. [2.3.0]Context Sensitive Help
  12. [2.3.0]Internal Builder Properties
  13. [2.3.0]Mapping Linux to Windows (/proj/ to Z:\proj\)
  14. Recover from abnormal inconsistencies

Editing source

Content assist

Content assist provides you with a list of suggested completions for partially entered text. In the e Language editor press Ctrl+Space.

Content assist selection dialog

Content assist for enumerated types

You can use content assist to speed up the access to enum items. Just press Ctrl+Space.

Suggestions for enum items

Content assist for macros

You can use content assist to speed up the access to macros. Just press Ctrl+Space.

Suggestions for macros

Code templates

Code templates are presented in content assist if applicable.

Code Templates Proposals

To create your own templates, go to the Opens the editor templates preference page E Language > Editor > Code Templates preference page and press the New button to create a template. For example, a template for the full syntax of the sequence statement will look like:

Template for sequence syntax

Matching brackets

To find a matching bracket place the cursor after the bracket and press Ctrl+Shift+P or chose Jump To Pair Bracket from the right click menu. You can also double click after the bracket - this selects the text between the two brackets.

Using 'double click' to select text between two brackets

Toggle comment

You can toggle comment on/off for the current line or the selected lines. Press Ctrl+/ or use the action from the drop down menu on right click in editor.

You can chose the Verilog or the VHDL comment style. Right click in the editor and use the switch comment style action.

Toggle comment

Format source

Use the Format Source action from the toolbar Format Source Button or from editor right click menu.

The whole file is formatted or the current selection, if any.

One key indentation

If you press Tab once at the begining of a line, it is automatically aligned to the enclosing context.

Press twice to insert a tab.

Reminders (TODO markers)

When you tag a comment in e source code with TODO, a corresponding taks is automatically created as a reminder. From the Tasks View, double click on the task takes you to the TODO in the code.

Same for for FIXME (higher priority) and XXX (lower priority) markers. You can also add your own tags, see the Reminders section of the documentation.

TODO in Source Code

TODO in Tasks View

Check Naming Conventions

Naming convention violations are presented as warnings in the Problems View. You can show the Problems View from menu Window > Show View > Other > General > Problems. Double clicking on some warning will jump to the source location.

Name Check Warnings

Naming conventions are automatically checked when building a project. You just need to define them:

  • Globally: Go to the Opens the name checks preference page E Language > E Name Checks preference page (via menu Window > Preferences).
  • or Per Project: Right click on the project, chose Properties and go to the E Name Checks preference page.

Name Checks Preference Page

Spell checking You can enable spell-checking support in the e Language editor on the Opens the spelling preference page General > Editors > Text Editors > Spelling preference page. Spelling errors are displayed in the e Language editor and corresponding Quick Fixes are available:

An example of a spelling correction proposal.

There is currently no dictionary included in Eclipse. The required format is just a list of words separated by new lines.

Quick Fixes allow you to add new words to the dictionary on-the-fly.

Folding You can fold code sections to improve read-ability. This is how a folded file looks like:

Collapsed all example

Folding actions (to expand or collapse) are available in the toolbar or on right click in the editor. You may also use the + or - signs on the left side of the editor.
  • Use Collapse All Levels for folding to statement level.
  • Use Show First Level for folding to struct member level.
  • Use Expand All to fully expand the file.
When you type on a folded line, it is automatically expanded. You may see the folded code in a tooltip if you move with the mouse over the + sign.
Maximize editor

Double-click on the editor tab to maximize editor to full window. Double-click again to restore.

Show line numbers

Check Show line numbers from the Opens the general text editor preference page General > Editors > Text Editors preference page

Go to line

Press Ctrl+L shortcut or double click in the status bar Go To Line Dialog to jump to a specific line.

Go To Line Dialog

Back/Forward navigation

You can navigate between editors in a browser like way using the Back/Forward Navigation Back/Forward Buttons.

Go to last edit location

Useful when you navigated around in the code, before proceeding with the source change.

Click on Last Edit Location button Last Edit Location Button in the toolbar to jump to the file where you were previously editing.

Local history Whenever you edit a file, its previous contents are kept in the local history. Right click in the editor and chose Compare With/Replace With > Local History....

Compare with local history dialog

Inactive Code Highlight The editor marks with a colored background the areas of code which are not compiled due to preprocessing. See the Inactive Code Highlight documentation section.

Macro Expansion

You can apply preprocessing for a macro called in your code. Place the cursor on the macro, then right click -> Macros -> Expand All Levels to inspect the expanded macro in a new file.

You can also expand/collapse macros inline using Ctrl Shift = respectively Ctrl Shift -.



See the Macro Expansion section in the documentation

Quick Macro Inspect

You can quickly inspect macro reparsing if you go with the mouse over the macro marker which appears on the left bar. A tooltip appears showing how the macro is reparsed.

Searching

Search for method, field, event etc.

To search for the declaration of a specific type, method, field etc. :

  • Press Ctrl+H to open the Search Dialog
  • Click on the e Search tab.
  • Type the name in the Search String (if you select in the editor before pressing Ctrl+H, the Search String is automatically set to the selection).
  • Select type or method etc. and Declarations
  • Click Search.

Search for Method

Search for references

To search where a method (or field etc.) is used, right click on it's name > Refereces > Project.
The results are presented in the Search View.
You can also search for references from the Search Dialog (Ctrl+H).

Search for Method

See macro instances

To see where a macro is used click on it and press Shift+F3.
The results are presented in the Layers View.

Search for Method

See all defines, undefs and ifdefs for a specific macro

To see where a preprocessing define is used, including defines, undefs and ifdefs click on it and press Shift+F3.
The results are presented in the Layers View.

Search for Method

Search for whole word

To search for a whole word in all e files, in comments or not:

  • Press Ctrl+H to open the Search Dialog
  • Click on the e Search tab.
  • Type the name in the Search String (if you select in the editor before pressing Ctrl+H, the Search String is automatically set to the selection).
  • Select Whole Word and Do not search in comments or All occurences
  • Click Search.

Search for Whole Word

Code Navigation and Reading

Tooltips

When you position the mouse over a type, method, field etc., a tooltip will pop-up showing information on corresponding declaration.

Method tooltip

Hyperlinks

If you place the mouse over a type, method, field etc. and press the Ctrl key, a hyperlink will be presented. Click on the hyperlink to jump to definition.

You can also jump to a definition if you put the cursor on the relevant name and press F3.

Hyperlink to field

Inheritance tree and members (Hierarchy View)

You can view the inheritance tree and all the members of a struct by placing the mouse over it and pressing the F4 key.
See also Hierarchy View.

Hierarchy View

Instance tree of a unit (Instance Tree View)

You can view the instance tree of a unit (including ports) by placing the mouse over it and pressing Shift+F4.
See also Instance Tree View.

Instance Tree View

Class Diagrams

You can create class diagrams to inspect or document the architecture of a verification environment.
For more details see the Diagrams > Class Diagrams chapter in eDT User Guide.

Class Diagram Editor

Macro Hyperlinks and Tooltips

If you place the mouse over a macro you'll see a tooltip with the documentation.

Define as macro tooltip example:

Macro tooltip

Preprocessing define tooltip example:

Macro tooltip preproc


If you press the Ctrl key, a hyperlink will be presented. Click on the hyperlink to jump to definition.

You can also jump to a definition if you put the cursor on the relevant name and press F3.

Hyperlink to macro

Scope

Your current scope (in which method or struct you are editing) is always presented in the status bar.

Current Scope in Status Bar

Quick Types

You can quickly open a specific type definition. Press Ctrl+Shift+T or press the Open Type buttonNew project button in the toolbar.

The Quick Types View will pop-up and you can enter any regular expression to locate a type. Select and press Enter or click to jump to its definition.

Quick Types View

Quick Macros

Press Ctrl+P to open the Quick Macros View which presents available macros, both preprocessing and define as. You can enter any regular expression to locate a macro and jump to its definition (select and press Enter or click).

Quick Macros View

Quick Outline

Press Ctrl+O to open the Quick Outline which presents an overview of your file. You can enter any regular expression to locate a place to jump in the current file.

Quick Outline View

Quick Layers

Press Ctrl+Shift+O with the cursor positioned on the name to quickly see extensions.

Quick Layers View

Quick Load Order

You can quickly open a file which is imported via the top files. Just press Ctrl+I.

The Quick Import View will pop-up and you can enter any regular expression to locate a file. Select and press Enter or click to open the file.

Quick Import View

Quick Hierarchy

Position the cursor on the struct name and press Ctrl+T to see the Quick Hierarchy View.

Quick Hierarchy View

Layers

You can view all the extensions (layers) of a specific type, method, event etc.
Position the cursor on the relevant name and press Shift+F3 or right click and chose Show Layers from the menu.
See also Layers View.

Layers View

Event Layers

Layers include on and cover definition.
Position the cursor on the event name and press Shift+F3 or right click and chose Show Layers from the menu.
See also Layers View.

Layers View

Types

You can view all the types (enums, structs) in the project (including each struct fields, methods etc.) in the Types View.
Open the view from menu Window > Show View > Other > e Language > Types View.
See also Types View.

Types View

Checks

You can view all the checks ("check that", "expect", "assert", "assume") in the project in the Checks View.
Open the view from menu Window > Show View > Other > e Language > Checks.
See also Checks View.

Checks View

Coverage

You can browse all the coverage definitions in the project using the Coverage View.
Open the view from menu Window > Show View > Other > e Language > Coverage.
See also Coverage View.

Coverage View

Macros

You can see the macros in your project in the Macros View.
Open the view from menu Window > Show View > Other... > e Language > Macros.
Double click to jump to macro definition.
See also Macros View.

Macros View

Load Order

You can see the load order of the files in your project in the Load Order View.
Open the view from menu Window > Show View > Other... > e Language > Load Order.
See also Load Order View.

Load Order View

Outline

You can see the summary contents of the current file (structs, field, methods) in the Outline View. Open the view from menu Window > Show View > Other... > General > Outline.

Outline View

Mark occurrences

When working in the e Language editor, turn on Mark Occurrences in the toolbar Mark Occurrences Toolbar Button or press Alt+Shift+O.

Occurrences Highlighted

Bookmarks

Similar with a web browser, you can add bookmarks in your code without altering the code.
Right click on the left vertical bar of the editor and chose Add Bookmark....

Add Bookmark Action

Specify a meaningful name:

Bookmark Action

You can jump to bookmarks from Bookmarks View. Open the view from menu Window > Show View > Other... > General > Bookmarks.

Bookmarks View

Miscellaneous

All shortcuts

Press Ctrl+Shift+L to see all shortcuts.

All Shortcuts

Project Properties

Select the project in the Navigator View, right click and chose Properties.
Or from menu Project > Properties.

Project Properties

Export HTML Documentation

To generate the HTML Documentation click the Export HTML Documentation Wizard button in the toolbar of the e Language Perspective.

Export HTML Button

For more details see the Export HTML Documentation chapter in EDT User Guide.

OVM Compliance Review

To perform the OVM compliance review of your project click the OVM Compliance Review button in the toolbar of the e-Language Perspective.

For more details see the OVM Compliance Review chapter in EDT User Guide.

Project Templates

A project template is a parameterized directory tree. Both in the file contents (.e, ,.sh - practically any file) and in the file or directory names you can use parameters.

Combined with TODO markers, you can use a project template as a customized wizard.

For more details see the Project Templates chapter in EDT User Guide.

System Variables

To specify Top Files, SPECMAN_PATH etc. you can also directly edit the corresponding files <project_dir>/.dvt/.vlog_top_files, <project_dir>.dvt/.vlog_specman_path etc. and use:

  • system variables like ${var}or %var%

  • absolute paths

  • comments (//,--,#)

Generic launch (make, scripts etc.)

You can launch external scripts:

  1. Menu Run > Run....
  2. Select Generic configuration and click the New button.
  3. Specify name, working directory and command.
  4. Click Run.

New Generic Launch

You can launch again at any time from menu Run > Run History... or directly from the toolbar
(simple click launches last):

Launch from Toolbar

Load in Specman

Right click on a file in Navigator (usually top or test) and from menu Run As chose Load in Specman.

Load in Specman

The invocation output is dumped to the Console View.

Click on hyperlinks in the Console View to jump directly to the to source location.

Console Hyperlinks

External Builders

An external builder allows you to invoke any script/tool and back-annotate its output (errors, warnings etc.) to the source code. It is a mean which allows you to connect any 3d party tool (compiler, linter etc.) to DVT error signaling engines.

You can configure one or more external builders on a project:

  • The commands you define will be invoked on project clean, full build and incremental build.

  • The patterns you define will be applied on the command output to recognize errors, warnings etc.

  • The pattern matches will be back-annotated to the source code and presented in a similar way DVT signals errors (file, line, in the Errors View etc.)

DVT ships with some predefined example configurations to get you started.

For more details see the External Tools > External Builders chapter in EDT User Guide.

External Documentation

You can browse and search through 3rd party documentation using the Eclipse help system.

For more details see the External Tools > External Documentation chapter in EDT User Guide.

Context Sensitive Help

A focused set of help topics that is related to the current context can be shown to users on demand using context-sensitive help. This form of user assistance is delivered to users when a platform-specific trigger is activated (e.g. F1 key on Windows, Ctrl+F1 on GTK, Help key on Carbon).

For more details see the Getting Started > Context Sensitive Help chapter in EDT User Guide.

Internal Builder Properties

You can configure the EDT Builder from project properties, section Internal Builder.

For more details see the EDT Builder (Internal DVT Builder) chapter in EDT User Guide.

Mapping Linux to Windows (/proj/ to Z:\proj\)

Linux directories can be mapped to Windows drives, which allows editing files from Windows. For example /home/simi is mapped to Z:\. This has an impact on paths configured for a DVT project, for example INCDIRs etc. The paths are set using Linux conventions, however Eclipse runs in Windows and the DVT builder needs to know about the mapping in order to compile the files.

To specify the mapping, set the system variable %DVT_CROSSPLATFORM_MAP% before invoking Eclipse. You can add multiple mappings separated by ";" e.g.:

/projects/=p:\;/home/lars/=Z:\lars\
Recover from abnormal inconsistencies

In the event of a disfunction (missing results in search, types in type browsing, hyperlinks, tooltips etc.) please manually trigger a clean build from menu Project > Clean... or toolbar button All Shortcuts.