This post discusses the selectors in XJDeveloper and how you can customise them. Selectors are used whenever you have to select either a Net or a Device. Entries in a selector are grouped into categories that can be customised.
Entries are placed into categories based on their name in the netlist. The categories can be edited or new categories can be added from the Tools -> Options menu item. This can be useful if the naming convention of nets or devices in your netlists differ from the defaults used in XJDeveloper.
Each category has a name and a pattern to match names against. This pattern can either be a simple pattern, or a regular expression.
Simple Pattern
A combination of characters and the wildcards * and #
* matches 1 or more characters (letters, numbers, any other characters)
# matches 1 or more numbers
Some Examples
NET* – Anything that start with “NET” and has at least 1 character after it will be included in the category. e.g. “NET1”, “NETA”, “NET_TDO”
R# – Anything that start with “R” and has at least 1 number after it will be included in the category. e.g. “R1”, “R20”, but not “RP1”
Regular Expressions
Clicking the Regex… button will convert your simple pattern into a regular expression. Regular expressions allow more flexibility, for instance you could have an expression that says:
match to an optional “+” or “-“, followed by either a series of numbers then “V” or the text, “VCC”
As you can see this is far more powerful than the simple pattern approach!
Regular expressions use regular expression syntax, which is beyond the scope of this blog entry. There is extensive documentation on regular expressions on the internet if you wish to find out more. You can also look at all the regular expressions used by the default categories in XJDeveloper.
Take a look at the patterns used for the default categories that XJDeveloper uses, and don’t be afraid to edit them or add new ones. If you make a mistake you can always press the Reset all categories button. The next entry in the series will look how BOM information can be used to refine categories further.
Leave A Comment