How to Inspect Constraints Using the DVT Eclipse IDE
Overview
In DVT you can easily see where a variable is constrained: right click on it's name and pick Show ... Constraints, or simply use the hyperlink option if the variable has the rand qualifier.
The results are shown in the Search View, and they include static constraints, in-line (randomize_with, uvm_do_with) constraints as well as calls to rand_mode() and constraint_mode() which affect the variable randomization.
Explore the design and verification tools: https://www.dvteclipse.com
Or request a license: https://www.dvteclipse.com/request-license
Details
Showing Constraints for a Variable
To see where a variable is constrained, right-click on its name and select Show Constraints.
For random class variables, you can also hold down the Ctrl key while hovering the name of the variable with the mouse cursor and pick Show Constraints from the pop-up list.
Viewing the Constraint Results
The results are presented in the Search view, where you can see the file, line, and scope of the constraint.
Double-click to go to source.
The results include:
- Constrained blocks involving the variable.
- Inline constraints of the variable inside
randomize() with
or`uvm_do_with()
. - Calls to
rand_mode()
andconstraint_mode()
, which affect the variable randomization.
Refining the Results
Type a few letters in the quick filter to further refine the results.
You can hide constraint mode and run mode calls using the toolbar Filters button.