Filter Option

This topic explains the filter option available from some DesignSync commands.

Enter an expression, to identify the exact subset of module members on which the command will operate. Specify comma-separated object expressions, where an object expression takes the form:

[+|-]<path_expression>

where:

  • +/- indicates whether a particular object expression indicates items to be included or excluded. The default is "-" , excluding items based on the <path_expression>
  • <path_expression> is an extended glob expression that specifies object paths. An extended glob expression is a standard glob-style expression, but extended to allow the use of the "..." syntax to mean "match any number of folder levels".

For example, the expression top/.../lib/*.v matches any *.v file in a folder path that starts with top, then has any number of levels (zero or more), ending in a lib sub-folder.

Note: A glob expression of * for a <path_expression> is not always the same as .../* . For an exclude ( -* or *), the * matches the folders in the top level folder, and therefore everything down the hierarchy. But for an include (+*), the * matches the top level directories, and does not match the lower level items, causing the lower level items to remain excluded.

Path expression matches are performed against the relative path of the objects from the starting point of the command.

If a match is performed against a full sync: URL, then a "..." value matches the sync://<host>:<port> at the start of the URL. For example, .../Chip matches sync://<host>:<port>/Modules/Chip.

Ordinarily, a command starts with everything included. But if the first entry in the Filter field is an include ( +<path_expression>), then it is assumed that the intention is to start with everything excluded, as if the expression had started with -.../* . This makes it simple to write expressions that just include some items.

Notes:

  • This field is only available when operating on module data.
  • The Exclude field is applied in addition to the Filter field.