DVT IDE for VS Code SystemVerilog User Guide
Rev. 24.1.9, 26 April 2024

22.3.5 Component Diagram Filters

You can customize the diagram using the Filters button from the toolbar.

Use the drop-down menu at the top of the dialog to select from available filters.

Use the buttons in the top-right corner of the dialog to create, duplicate, or delete the current filter.

Use the checkboxes at the bottom of the dialog to further clean up the diagram.

A filter is defined using filter rules (one per line). The general form of a filter rule is:

command element_kinds matching regex [ using color_name_or_code]

  • command is one of hide, show, or color

  • element_kinds is a comma-separated list of kinds. The available kinds are instances, types, ports, port types and transaction types

  • regex is a regular expression that matches the relevant diagram element labels

  • color_name_or_code is a color specified by name, 6- or 3-digit hexadecimal code, comma-separated decimal RGB code or the keyword random. This is relevant only for color rules.

To apply a filter rule only to elements under a specific instance, you must provide the relevant path in the regex section of the rule:

  • a path must always begin with the name of the top instance in the diagram (if instance is under top_instance, then top_instance/instance/... is valid, while instance/... is not)

  • a path consists only of names of instances and " /"

  • each level is separated from the previous using " /'''" (valid: '''top_instance/inst1/inst2/...; not valid: top_instance.inst1.inst2...)

  • regular expressions may be used in the path section of a rule (for example, top_instance/.*/some_instance)

  • if the regex contains " /' ", everything before the last "/" is the ''path, the rest is used to match the relevant diagram elements (in the following example, the bolded text is the path: '''top_instance/.*/inst1/ .*drv.*)

  • if the regex does not contain " /", it applies to all elements of the appropriate element_kinds

TIP: You can hide the hierarchy under an instance with the filter "hide instances matching path/to/instance/.*".