Design Rule Management with the Constraints Editor

Nexus message

This documentation page references Altium NEXUS/NEXUS Client (part of the deployed NEXUS solution), which has been discontinued. All your PCB design, data management and collaboration needs can now be delivered by Altium Designer and a connected Altium 365 Workspace. Check out the FAQs page for more information.

 

Parent page: Defining, Scoping & Managing PCB Design Rules

The Constraints Editor is a document-based user interface that offers an alternative approach for viewing, creating, and managing the design constraint rules used for your PCB layouts. The editor is arranged into six selectable rule sections of increasing priority – Nets, Diff Pairs, xSignals, Polygons, Components, and Advanced. In this arrangement, the first five sections (Nets to Components) represent a design object view of the rules, while the Advanced view section applies to more complex rules (typically using queries) that cannot be expressed as the simpler design object-orientated rules.

The Constraints Editor – an alternative approach for managing design rules.
The Constraints Editor – an alternative approach for managing design rules.

The Constraints Editor is accessed by clicking the Switch to Document View button in the PCB Rules and Constraints Editor dialog.

Switching to the Constraint Editor view from the PCB Rules and Constraints Editor dialog.
Switching to the Constraint Editor view from the PCB Rules and Constraints Editor dialog.

Click the Switch to Dialog View button in the editor's Properties panel to return to the PCB Rules and Constraints Editor dialog.

Switching back to the PCB Rules and Constraint Editor dialog from the Constraint Editor view.
Switching back to the PCB Rules and Constraint Editor dialog from the Constraint Editor view.

Some of the advantages of using the editor are:

  • Using a document-based presentation interface rather than a dialog means that the PCB Editor and its associated functions remain active and accessible.
  • A shift from query-based rule scoping to an applied object type matching simplifies constraint rule creation.
  • Rule priority is automatic based on the natural hierarchy of design objects.
  • Interactive rule validation checking for detecting common syntax, assignment and scoping errors.

Constraint Rule Types

In the Constraints Editor, existing rules that feature more complex query expressions in their matching scope are considered Advanced Rules (or Custom Rules) while simpler rules are re-expressed as the object-type Basic Rules, i.e. rules based on the type of design objects being checked. 

Most rules in the Advanced (query-based) format can be converted to the simpler Basic rules by dragging and dropping the rule onto the Basic Rules listing or by selecting the Move Custom Rule to Basic option from the Advanced rule's right-click menu. When converted, the advanced rule's query-based scope will be interpreted to the basic rule's object type qualification.

Query-based Advanced rules can be converted to simpler Basic rules.
Query-based Advanced rules can be converted to simpler Basic rules.

Rule Prioritization

In general, the priority of Rules is dealt with automatically by the system. This is indicated by the arrangement of the rules view buttons in the interface, which are positioned by rule priority from left to right – Nets having the lowest priority.

  • Advanced (or Custom Created) rules take precedence over the sequence of Basic object rules and can be manually reordered within the Advanced view by dragging their entries up or down.
  • Conversely, Basic rules are automatically prioritized by the system based on the design object type as indicated by the object sections (Nets to Components) in the document interface.
  • Within each of the (Basic) object rule sections, the priority is ordered from All (lowest) to Object Class to Object (highest), and by inference, rules with an All scope that have been converted to Basic rules will have the lowest priority.
  • To set an explicit priority for a Basic rule, right-click on the rule, select the Move Basic Rule to Advanced option, then manually set its priority position in the Advanced view. This applies to rules other than those with an All scope, for example, in the Nets view, a rule with a Net Class or Net scope specified can be converted (moved) to an Advanced rule.

New Custom Constraint Rule

Creating a new rule in the editor's default Advanced mode (as indicated and selected using the button) is similar to constructing a rule in the PCB Rules and Constraints Editor dialog. Select Add Custom Rule from the right-click context menu (or the button), add a query-based matching scope if required () then enter the constraint parameters in the column grid or the lower graphical representation.

Create your own custom constraint rule
Create your own custom constraint rule

To simplify the repeated process of creating advanced/custom type rules, the Constraints Editor allows you to store query-based object matching scopes in the Scopes Library dialog (access using the menu). The library is presented in the Properties panel where custom scopes can be imported, managed and exported for reuse in other custom constraint rules. The use of a library-based scope in a rule is indicated by an icon in the rule's Object Match column entry.

Use the scopes library to simplify creating of custom rules.
Use the scopes library to simplify creating of custom rules.

  • Once a library-based scope has been applied to a rule, you can use the Object Match (scope) field's menu to remove the scope entry (Clear Scope) or revert the scope back to its query-based format (Detach Scope).
  • Also note that the Scopes Library itself can be exported as a custom scope XML file, which can then be used to populate the Scopes Library of another Altium NEXUS installation.
  • Drag and drop a rule to a different position in the listing to change its priority. Custom Rules adopt the highest priority. Note that the priority order of Basic (object) rule entries is automatically determined by their inherent hierarchy.
  • Select File » Save to PCB to save the constraints document file to the PCB project.

Design Object Constraint Modes

To take a simpler design-object orientation approach to constraint rule creation, select a suitable object mode button at the top of the rules grid to change from the default Advanced mode. Conceptually, these modes present a more integrated rule interface that focuses on constraining (limiting) how design objects can be applied rather than the creation of breakable design rules. The positional sequence of the design object buttons relates to increasing object complexity (and rule priority), from basic Nets (and classes) to unified Components up to the Advanced mode.

When in Advanced mode (), the rules are grouped by type, such as the basic Via and Width constraint rules shown in the below images. Further rule specificity can be created by adding a further rule and/or including a query language element.

In Advanced mode of the Constraint Editor, rules are grouped by type.
In Advanced mode of the Constraint Editor, rules are grouped by type.

Conversely, the object-orientated views (Nets to Components) organize the rules by design objects (e.g., Nets) or classes (e.g., Net Class) and as a result, provide a direct overview of how the rules apply to the design. To see an overview of rules that apply to an object type, select an object or class in the left column to see all associated rules, or select All to see all rules associated with the object type. The below example shows the overview of rules associated with Nets ().

In the object-oriented views of the Constraint Editor, rules are grouped by design objects.
In the object-oriented views of the Constraint Editor, rules are grouped by design objects.

When using the design object orientated approach, for example, with the Nets object type selected as shown below, the basic Via and Width rules are integrated into one composite entry. The grid layout also offers provision for more constraints to be added by (Net) object and class.

An object-oriented view displays constraints of the selected object type.
An object-oriented view displays constraints of the selected object type.

Adding further, more specific constraints in this example requires only that a Net or Net Class is selected and suitable values entered in the grid cells that correspond to the desired type of constraint rule. As shown below, a larger Via size has been permitted for Power nets (defined by its class), and an increased maximum track width is assigned to the 5V supply rail net. In effect, four rules are encompassed in one simple grid view, i.e. a width constraint for the 5V net, a width constraint for all other nets, a Via size constraint for the Power nets, and a Via size constraint for all other net classes.

Add more specific constraints for different objects and their groups (for example, nets and net classes).
Add more specific constraints for different objects and their groups (for example, nets and net classes).

Use the button to add a variation of the currently selected constraint rule, such as in the example shown below, where an additional 5V net rule sets a preferred width for the Bottom layer.

Variations of a selected constraint can be added.
Variations of a selected constraint can be added.

Note that the availability of rule types within the grid entries is set by the available columns, which is, in turn, specified by those enabled in the Properties panel Rule Visibility listing. For example, enabling the Clearance entry in the Rule Visibility list will add the Clearance column to the Nets object type, as shown below. Adding an applicable clearance rule then involves just entering a net or class scope and suitable distance parameters.

Select the rules to be displayed in an object-oriented view.
Select the rules to be displayed in an object-oriented view.

Rule Validation

The validity of all active rules can be checked in the Rules/Constraints Checks region of the Properties panel by clicking the button. This action detects rules for likely errors such as duplicated rules, rules of the same scope with different values, rules with overlapping class members (such as nets), and rules with unresolved scopes. Each violation type entry can be expanded to show its violating rule(s), which when selected, will open the specific rule entry.

Check the validity of rules currently defined in the Constraints Editor.
Check the validity of rules currently defined in the Constraints Editor.

Rule Violations

Enabled design constraint rules are applied to the current board design through a range of mechanisms, such as live Online Design Rule Checking, the batch Design Rule Checker or selectively run from the PCB Rules And Violations panel. Violations of those constraint Rules – where the specified and scoped limits are exceeded – are indicated through board graphics, panel entries and reports, as well as alert icons in the Constraints Editor. Additionally, as a bonus, violations can be inspected, analyzed and corrected while the Constraints Editor is open thanks to its design document (rather than dialog) format.

The Constraints Editor provides feedback on the rules under violation.
The Constraints Editor provides feedback on the rules under violation.

Properties Panel

When the Constraint Editor is currently active, the Properties panel presents the Document Options mode (or the Advanced constraints options mode in the editor's Advanced mode).

The following collapsible sections contain information about the options and controls available:

Checking Rule Application

The Constraints Editor includes a cross-probe feature that will show a constraint rule's object scope by visually highlighting the net and connections in the corresponding PCB layout. To cross probe to any rule in the editor's grid listing, right-click on its entry then choose the Cross Probe option from the context menu or select Cross Probe from an advanced rule's menu.

Set the Cross Probe View Settings (the Zoom and Select options) in the Properties panel and use the PCB editor Clear Filter option to reset cross probe highlighting.

Cross-probe to the object under the scope of a rule from the Constraint Editor.
Cross-probe to the object under the scope of a rule from the Constraint Editor.

If you find an issue, select the text/image and pressCtrl + Enterto send us your feedback.
Content