Detecting Differences in your Design

Old Content - visit altium.com/documentation

The very heart of the synchronization feature is the Comparator, without which detection of differences that exist between design documents would not be possible. The Comparator can compare the component and connective information between almost all kinds of documents. The following are just some of the document-type comparisons that can be made:

  • Design hierarchy of a project to a PCB
  • Schematic to Schematic
  • PCB to PCB
  • Netlist to PCB
  • Netlist to Netlist.

The Comparator is invoked whenever a comparison-based command is run, such as the Show Differences or Show Physical Differences commands, available from the Project menu. When updating directly from a schematic project to PCB (and vice-versa) comparison is made when using the dedicated Update/Import commands from the Design menus (see Direct Schematic PCB Synchronization).

Supported netlists formats for comparison are Protel and Tango.

Setting Up the Comparator

As a user, you have complete control over the kinds of differences that the Comparator will detect. Controls for the Comparator are accessed from the Comparator tab of the Options for Project dialog (Project » Project Options), with all settings stored as part of the project.
Comparison types fall into four categories:

  • Differences associated with Components - comparisons made at the component level (e.g. detection of components that exist on schematic and PCB documents, but possessing different designators)
  • Differences associated with Nets - comparisons made at the net (connective) level (e.g. detection of extra nets existing on either schematic or PCB)
  • Differences associated with Parameters - comparisons made at the parameter level (e.g. detection of an object that exists on both the schematic and PCB, with the same parameter, but different values)
  • Differences associated with Physical - comparisons made at the physical level, when comparing two versions of the same schematic or PCB document (e.g. detection of extra PCB objects in one version of the compared document).

Use the controls available to configure the Comparator as required. For each comparison type, you can determine whether any detected differences will be added to the final list of differences built by the Comparator (Find Differences) or skipped and therefore not included in the list (Ignore Differences). One example of when you might set certain comparison types to be 'ignored' is for a design that is not multi-channel in nature. In this case you can simply set the channel-related comparison types (Changed Channel Class Name, Channel Classes with Extra Members, Extra Channel Classes) to be ignored.
Controls are also available that allow you to determine the criteria used by the Comparator when matching objects between compared documents. Applicable at the Net, Net Class and Component Class levels, these essentially allow you to fine tune the comparison process for these object types.

Running the Comparator

For full control over the synchronization process, you need to be able to view the list of differences detected and built by the Comparator. This is especially true if you wish to control which, and in what direction, any updates (changes) are made, in order to (re)attain synchronicity. To view the list of differences, the Comparator should be invoked using the Show Differences command, which is available from the Project menu.

Choosing the Documents

Running the Show Differences command gives access to the Choose Documents To Compare dialog, which is used to select the documents for comparison. By default, the dialog opens in simple (non-advanced) mode, allowing you to quickly select the target PCB document to compare against the project's source document hierarchy.
Enable the Advanced option to be able to select different document combinations to compare as required. For example, you might need to build a PCB using a netlist generated from a third party's Schematic Editor. This could quite easily be done in Altium Designer, by comparing the netlist against the target (blank) PCB document.
When comparing a project's source document hierarchy against the target PCB, the source documents will be recompiled before the comparison is made.

Component Linking through Unique IDs

When a component is placed on a schematic sheet, it is automatically given a unique ID. As a precursor to comparison, Altium Designer scans the source schematic and target PCB documents for linked components. These are components that have been previously synchronized with one another and share a unique ID. If components have not yet been synchronized between documents, a dialog will appear alerting you to this fact and allowing you to match components either automatically - by designator - or by hand. The latter can only be performed from the PCB document, using the Edit Component Links dialog (Project » Component Links) (Figure 1).

When component information is transferred for the first time between schematic source documents and a blank PCB design document, using the Synchronizer, all components will automatically be linked by unique ID - the ID information from each schematic component being assigned to the corresponding component footprint.

The reason that manual linking of components is only carried out from within the PCB document, is that only the PCB component footprints need to be updated with the unique ID information - it is already present on the schematic side. Use the dialog at any stage during the design to view the linking between components and to reassure yourself that the components on the schematic source documents are indeed correctly matched to the corresponding component footprints in the PCB design.
Unique IDs can be removed at any time by moving the linked components back to the unmatched regions of the Edit Component Links dialog. Removing a component link will remove the unique ID from the corresponding PCB footprint only. The schematic component retains the unique ID, unless a new one is generated (using a reset unique ID-related command at either the schematic or component level).
It is a good idea to have all components matched using unique IDs, so that annotation of designators in either schematic or PCB document can be carried out, with the safe knowledge that the documents can still be resynchronized at any stage. The documents can still be synchron-ized even if components aren't matched by unique IDs, but in this case, you will be prompted to match the components by designators only - comment and footprint is not taken into account and therefore it is possible that matching of some components is carried out incorrectly.
In a similar vein, a unique ID is automatically assigned to each parameter definition on a source schematic document. This is used for those parameters that have been added as design rule directives. When transferring the design to the PCB document, any defined rule parameters will be used to generate the relevant design rules in the PCB. These generated rules will be given the same unique IDs, allowing you to change rule constraints in either schematic or PCB and push the changes across when performing a synchronization.

Directing the Update Traffic

With all components linked between the source project documents and the target PCB, the comparison will proceed. The Comparator will adhere to the setup defined for it in the project options and, if any differences are detected whose associated comparison types are not set to be ignored, those differences will appear listed in the Differences dialog (Figure 2) and are also flagged as entries in the Messages panel. Differences are grouped by comparison type.

Figure 2. Viewing differences and setting update actions using the Differences dialog

The Synchronizer is bi-directional. This means you can specify updates to both documents in the same ECO. In order to synchronize the designs the aim now is to determine, for each difference, whether or not to take action and in which direction the change is made - specifying which document should be updated in order to remedy the difference.

Even if differences are detected, you are under no obligation to take action on them. When the Differences dialog is generated, the default update decision of No Change is assigned to each entry. Altium Designer will only synchronize the elements you specify. If you wish to sweep all changes one way or another, simply right-click anywhere in the dialog and choose from a range of commands that act on all difference entries, all selected entries or all entries of a particular comparison type. Alternatively, click in the Update column to make decisions on an individual basis.

The Change Order area of the dialog simply lists, for each difference that you decide to act upon, the action to be taken, the object affected by the action and the document upon which the action will be carried out. It is this information that is used to compile the subsequent ECO that will be used to effect the updates. Common actions that will be listed in this area are:

  • Remove - where the update is in the direction of the document that contains the object causing the difference; the object will be removed
  • Add - where the update is in the direction of the document that does not contain the object causing the difference; the object will be added
  • Update - where both documents contain the same object that differs in some way; the object changed depends on the direction chosen.
    Figure 3 shows an example of the Differences dialog after update decisions have been made.

Figure 3. Example of update decisions made to resolve detected differences.

Click the Report Differences button to set up and print/export a report for the differences found by the Comparator, the update decisions you have decided to make and the actions that will be included in the generated ECO.

Exploring Differences

If you want to investigate further the differences found by the Comparator, prior to generating an ECO, then click the Explore Differences button. The Differences dialog will close and you will be returned to the main workspace, with the Differences panel made visible.

Figure 4. Exploring differences using the Differences panel

The panel displays the differences found between documents in a tree-like structure. The top-level folder displays the total number of differences detected. Sub-folders are then created for each specific comparison type that appears in the Differences dialog. In each sub-folder are listed the specific differences that have been found, which in turn are broken down further into objects on the compared documents that are responsible for the differences arising. Use the panel to cross probe to an object responsible for a difference, on its parent document.

Exploring differences in this way will cause any update decisions you have made in the Differences dialog to be lost you will need to open the dialog again and define updates once more as required. Alternatively, you can cross probe to an object directly from within the Differences dialog. Double-click the object's entry in the Differences region of the dialog. As the Differences dialog remains open, it is a good idea to have the source and target documents open and the dialog placed such that your view is not obscured.

You are reporting an issue with the following selected text and/or image within the active document: