Defining, Scoping & Managing PCB Design Rules in CircuitMaker

 

The Home | Design Rules button in the PCB editor opens the PCB Rules and Constraints Editor dialog, which includes controls you can use to manage the defined design rules for the current PCB document.

Design rules collectively form an instruction set for the PCB editor to follow. Each rule represents a requirement of your design and many of the rules, e.g., clearance and width constraints, can be monitored as you work with the Design Rule Checker dialog. Certain rules are monitored when using additional features of the software, such as routing-based rules when using the Situs Autorouter to route a design.

Design rules target specific objects and are applied in a hierarchical fashion. Multiple rules of the same type can be set up. It may arise that a design object is covered by more than one rule with the same scope. In this instance, a contention exists, which is resolved by a priority setting. The system goes through the rules from highest to lowest priority and picks the first one whose scope(s) match the object(s) being checked.

With a well-defined set of design rules, you can successfully complete board designs with varying and often stringent design requirements. Since the PCB editor is rules-driven, taking the time to set up the rules at the onset of the design process will enable you to effectively get on with the job of designing with the knowledge that the rules system is working hard to ensure success.

Fundamentals of the PCB Rules System

The rules system built into the PCB editor has several fundamental features.

  • Rules are separate from the objects - a rule is not added as an attribute of an object, but is rather added to the overall rule set and then scoped to apply to that object. This allows rules to be applied to multiple objects and modified or applied to different objects, which would otherwise be painful to do if having to change rule attributes at the individual object level.
  • Rules are targeted (scoped) by writing a query - instead of using a set of fixed, predefined rule scopes, a flexible query system is used to define the objects to which a rule is applied. This gives precise control over the target of each and every design rule.
  • Rules for any design situation - multiple rules of the same type can be defined and targeted to different sets of objects, allowing complete control over the definition of board constraints. For example, different width rules can be defined to route nets at different widths on different layers.
  • Each rule has a priority - any design object can be targeted by multiple rules of the same type. To resolve any rule contention, the rule priority is used. The system goes through the rules from highest to lowest priority and picks the first one whose scope expression(s) match the object(s) being checked.
  • There are two types of rules - unary rules (rules that define the required behavior of an object) and binary rules (rules that define the interaction between two objects).

PCB Rules and Constraints Editor Dialog

This dialog allows you to browse and manage the design rules for the current PCB document.

In the folder-tree pane on the left, each of the supported design rule categories is listed under the Design Rules folder.

  • Click on the root folder to access a summary listing of all specific rules that have been defined for all design rule types across all categories.
  • Click on a category folder to access a summary listing of all specific rules that have been defined for all associated design rule types of that category.
  • Click on a rule type folder to access a summary listing of all specific rules that have been defined for that type.
  • Click on the entry for a specific rule or double-click on its entry in a summary list to access controls for managing its definition.

Right-click Menu

The following commands are available from the right-click menu of the left pane.

  • New Rule - use to create a new rule of the currently selected rule type. The new rule will be added to the folder tree and will also appear in the summary list for that rule type. The rule name will appear bold to distinguish it as being new and yet to be 'applied'.

To access the scope and constraint attributes for the new rule, either click on the entry for the rule in the folder-tree pane or double-click on its entry in a summary list. The main editing window of the dialog will change to give access to the controls for defining the scope and constraint attributes for that rule.

When a new rule is added, it will initially be given a default name based on the specific type of rule. For example, if you add a new Clearance rule, the default name will be Clearance. If this default naming is not changed, adding another new rule of the same type will result in the same rule name with an incremented numerical suffix (i.e. Clearance_1, Clearance_2, etc.).
When a new rule is created for a particular rule type, it is automatically given priority 1 (the highest priority). If any other rules of that type exist, their priorities will be shifted (lowered) by one accordingly. They are then considered to be modified even though they may not have been specifically modified at the scope/constraint level. All such existing rules of that type will, therefore, be displayed in the modified state (bold with an asterisk).
  • Duplicate Rule - use to quickly create an identical copy of the currently selected existing rule. The duplicate rule will be named the same as the original with the addition of a suffix (e.g., _1) to distinguish it. Its definition (scope, constraints, etc.,) will be identical to that of the original.
In terms of priority, the duplicate rule will be given the next priority below that of the original rule. For example, if the original rule has priority 1, the duplicate will be given priority 2.
  • Delete Rule - use to delete the rule that is currently selected in the folder tree. The rule name will appear bold with strike-through highlighting to distinguish it as being a deletion that is yet to be 'applied'.
Many rule types have default rules created when a new PCB document is created. In a similar fashion, if all specific rules for one of those rule types are deleted, the default rule will be re-added automatically.
  • Report - use to generate a report of currently defined design rules. The report can be for all rule categories, a specific rule category, or a specific rule type depending on the selected entry in the folder tree. The Report Preview dialog will open with the appropriate report already loaded. Use this dialog to inspect the report using various page/zoom controls before ultimately exporting it to file or printing it.
  • Export Rules - use to export your favorite rule definitions to file. The Choose Design Rule Type dialog (described below) will open. 
  • Import Rules - use to import rule definitions from a previously save PCB rule file. The Choose Design Rule Type dialog (described below) will open. 
When importing, if rules of a chosen type already exist, the option will be given to clear the existing rules prior to import. Clicking Yes results in all existing rules of that type being deleted and subsequently replaced with those in the .rul file. Clicking No will keep the existing rules. However, if existing rules and imported rules have the same name, the imported rules will overwrite the existing ones.

Main Editing Region

This region changes in accordance with what is currently selected in the left pane. It presents two different views.

  • Summary Listing - if the Design Rules folder or any of the child rule categories or type folders are selected in the left-hand pane, this region presents a summary listing of all defined rules or all rules of the selected category or type. The summary listings also provide the following buttons.

  • New Rule - click to create a new rule of the type currently selected in the folder-tree pane of the dialog.
  • Delete Rule(s) - click to delete the specific rule or rules currently selected in the list. A deleted rule's name will appear bold with strike-through highlighting to distinguish it as being a deletion that is yet to be applied.
Multiple rules can be selected in a list using standard multi-select techniques (Ctrl+click, Shift+click).
  • Duplicate Rule - click to quickly create an identical copy of the currently selected existing rule in the list.
  • Report - click to generate a report containing all design rules in the currently displayed list. The Report Preview dialog will open with the report already loaded. Use this dialog to inspect the report using various page/zoom controls before ultimately exporting it to file or printing it.
A command to generate a report is also available from the right-click context menu for the region.
  • Rule Definition - when a specific rule is selected in the left-hand pane, this region presents controls for defining the rule.

  • Rule Scoping Controls - provides controls for determining the scope of the rule in terms of the objects to which it applies or between. See the Rule Scoping Controls section for details on using the controls in this region.
  • Constraints - presents the constraints applicable to the type of rule being edited. Use the various controls to configure these constraints as required.
If a constraint for the rule is invalid, the rule's name will appear in red in both the folder-tree and summary listings. A warning message will also appear if you attempt to close this dialog.
Changes made to existing rule definitions are highlighted in both the folder-tree pane and the applicable summary lists. Such entries are distinguished by the rule name becoming bold and an asterisk displayed to the right of the name.

Rule Scoping Controls

When defining the scope of a design rule, you are essentially defining the member objects that are governed by the rule. Use the options available to set the scope as required. Depending on whether the rule is unary or binary, you will need to define one or two scopes.

For a unary design rule, controls will be provided to define a single rule scope. Use the options available in the Where The First Object Matches region. For a binary design rule, controls will also be provided to define a second rule scope. Use the options available in the Where The Second Object Matches region.

Controls are identical whether defining one or two rule scopes and are detailed in the following sections.

  • Where The Object Matches - choose the desired scoping option.
  • Top drop-down field - when using the Net (or Net and Layer) or Layer options, this field's drop-down will populate with all defined nets in the design or all currently enabled layers in the design. Choose the required target accordingly.
  • Bottom drop-down field - when using the Net and Layer option, this field's drop-down will populate with all currently enabled layers in the design. Choose the required layer accordingly.
  • Priorities - click to open the Edit Rule Priorities dialog (described below) in which you can manage the priorities of multiple rules of the same rule type.
Multiple rules of the same type can be set up. It may arise that a design object is covered by more than one rule with the same scope. In this instance, a contention exists, which is resolved by the priority setting. The system goes through the rules from highest to lowest priority and picks the first one whose scope(s) match the object(s) being checked.

Choose Design Rule Type Dialog

This dialog is used to specify one or more rule types to be imported into or exported from a .Rul file from the currently defined set of design rules for the board.

Select the required rule type (or multiple types when exporting/importing) then click OK.

When exporting selected rule types, clicking OK will open the Export Rules to File dialog in which you can define where, and under what name, the resulting rule file (*.Rul) is to be saved. When importing selected rule types, clicking OK will access the Import File dialog from which you can browse to and open the required rule file (*.Rul).

Edit Rule Priorities Dialog

This dialog provides controls to manage the priority of rules within a chosen rule category. It is the rule priority that defines the order in which multiple rules of the same type are applied when, for example, performing a Design Rule Check. Rule priority simplifies the process of defining and managing rules, the idea being to define general rules that cover broad requirements and then override these with specific rules in specific situations. The dialog is accessed from the PCB Editor by clicking the Priorities button at the bottom of the PCB Rules and Constraints Editor dialog.

It may arise that a design object is covered by more than one rule with the same scope. In this instance, a contention exists. All contentions are resolved by the priority setting. The system goes through the rules from highest to lowest priority and picks the first one whose scope expression(s) match the object(s) being checked.

Options/Controls

  • Rule Type - use the drop-down to choose the specific rule type for whose defined rules you want to manage the priorities. Note that all rule types are listed regardless of whether or not rules of a particular type actually exist.
Initially, the dialog will list all rule instances for the rule type that is currently selected in the PCB Rules and Constraints Editor dialog.
  • Priority Listing - this region presents a list of all currently defined rules of the chosen type. Rules are listed in order of priority with the highest priority (1) at the top of the list. For each rule, read-only information is listed. 
  • Increase/Decrease Priority - click to increase/decrease the priority of the selected design rule (where applicable).

Applicable Unary/Binary Rules Dialogs

These dialogs include controls to quickly access information about which unary/binary design rules apply to the chosen object(s) in the design space. Unary rules apply to one object. Binary rules apply to two objects, or between an object in one set to any object in a second set. Therefore, binary design rules have two rule scopes.

Right-click over any placed design object in the design space then click Applicable Unary Rules or Applicable Binary Rules from the context menu. If Applicable Binary Rules is chosen, you will be prompted to select two objects in the design. Position the cursor over each object in turn then click or press Enter.

If the two chosen objects do not have any binary rules applied to them, the dialog will not open.

Options/Controls

  • Unary/Binary Rules List - this region confirms the chosen design object(s) being 'interrogated' and lists all defined design rules, by rule type, that could be applied to the object(s)s. The specific constraints for each rule are also displayed. Each rule will have either a green check or a red X next to it. A check indicates that this is the rule with the highest priority out of all applicable rules of the same type and is the rule currently applied. Lower priority rules of the same type are listed with an X next to them, indicating that they are applicable but, since they are not the highest priority rule, they are not currently applied. Any rules that would apply to the objects but are currently disabled also have an X next to them and are shown using strike-through highlighting.
  • Design Rules - this button becomes available when a rule entry is selected in the main list. Click it to open the PCB Rules and Constraints Editor dialog (described above).
If rather than seeing which rules apply between two objects you would prefer to pick a rule and see to which objects that rule applies, use the PCB Rules And Violations panel. As you click on a specific rule in the Rules region of the panel, filtering will be applied using the rule as the scope of the filter. Only those design objects that fall under the scope of the rule will be filtered, the visual result of which (in the main design space) is determined by the highlighting options enabled (Mask/Dim/Normal, Select, Zoom).

Design Rules Categories

Electrical Rules

Routing Rules

Mask Rules

Plane Rules

Placement Rules

Content
Content