Overriding Inherited Methods in a SystemVerilog Class Using the DVT Eclipse IDE
Overview
DVT provides multiple methods to override inherited virtual functions or taks in a SystemVerilog class. Browse through a list of valid override candidates and take your picks, or just type the prefix of a specific method you wish to override. For any class-based SystemVerilog testbench, including UVM-based environments, this feature is a definite time-saver.
Details
Overriding Inherited Methods Using Keyboard Shortcuts
In DVT, it's very easy to override functions or tasks inherited from a parent class.
Place the cursor inside a class and type a few letters of the method name. Press Ctrl + Space, select the Override Methods entry from the list, and hit Enter. A dialog pops up, showing you a list of all the inherited virtual methods that match the provided input. Hit Enter to override.
Note that the automatically generated method stub includes TODO reminders, which you can see in the Tasks View.
Overriding Methods Using the Context Menu
You can also open the dialog from the right-click context menu by selecting Source > Override Methods. Note that all the inherited virtual methods are aggregated under their parent class. The quick search allows you to locate specific methods. Select all and click OK to insert the code into the editor.
Overriding a Single Function Using Autocomplete
To override a single function, just type the word function
followed by a part of the method name. Hit Ctrl + Space and pick the desired method from the autocomplete list.