Компиляция и верификация проекта

Вы просматриваете версию 17.1. Для самой новой информации, перейдите на страницу Компиляция и верификация проекта для версии 25

Parent page: More about Schematics

Compiling the Design

What does it mean, to compile the design? And why does the design need to be compiled, why can't the software just keep track of the connectivity as you create it on your schematic?

The software manages the connective data across the schematic and the PCB.
The software manages the connective data across the schematic and the PCB.

Ultimately, the software needs to build a connective model of the entire design, for both the schematic and the PCB. To do this with persistence - where the software is keeping track of the connectivity at all times - the component and connective data for the entire design would need to be available when the design is opened, which would require all the data to be stored in a single file. Storing all of the data, for all of the sheets in your large multi-sheet schematic, in a single file is possible, but, for a number of reasons, is not the best approach.

To draw an analogy to software development, it would be like storing all of the source code for your entire application in a single file, and coding in a development environment that recompiles every time you you make a change. Neither of these are something that any coder would want. Software development tools allow the source to be spread across multiple files, and they separate the creation process from the analysis and compilation process. Doing this allows the developer to freely create, edit and modify their source code, using a file structure they choose. They compile the source to generate the working code only when they think it is ready for compilation. 

Using this same approach, the schematic designer can freely place, wire, re-arrange, re-name, and add and delete content from their schematic design. When the designer thinks it is ready they compile it - verifying it and building the internal connective model. This approach also supports a one-file-per-schematic-sheet model. Using a separate file for each schematic means you can easily bring in content from a previous project, and it also means that multiple designers can work on the same project, at the same time.

Then when you are ready you compile the design, choosing either the Compile PCB Project or the Recompile PCB Project command from the Project menu.

The software then:

  • builds a netlist for each schematic sheet, then
  • creates the sheet-to-sheet connectivity, then
  • builds the Unified Data Model, then
  • analyzes the complete design to check for drafting and electrical errors.

Using this approach, the schematic editor is actually an intelligent drafting tool, rather than a wiring tool. When you connect two pins with a wire you are drafting your design intentions, not creating an actual net. That net is not created until you compile the project, and that process is managed by code outside of the schematic editor. As mentioned, there are a number of advantages to this approach, with the biggest being that the compiled model of the design sits outside of the individual schematic and PCB editors. This compiled model is referred to as the Unified Data Model (UDM). The UDM includes detailed descriptions of every component in the design, and how they connect to each other.

To learn more about how you create connectivity, refer to the Creating Connectivity article.

The Unified Data Model

A fundamental element of the software is the Unified Data Model (UDM). When the project is compiled, a single, cohesive model is created, which sits central to the design process. Data within the model can then be accessed and manipulated by the various editors and services within the software. Rather than using a separate data store for each of the various design domains, the UDM is structured to accommodate all information from all aspects of the design, including the components and their connectivity.

The Unified Data Model makes all of the design data available to all of the editors, and helps deliver sophisticated design features, like multi-channel design and variants.
The Unified Data Model makes all of the design data available to all of the editors, and helps deliver sophisticated design features, like multi-channel design and variants.

So how do you interact with the unified data model, for example to trace a net through the design? You do that through the Navigator panel.

Examining the Connectivity in the Navigator Panel

Reference article: Navigator panel

If the design is large and spread over many sheets, it can become difficult to follow a net and verify the connectivity in the design by simply looking at the schematics. To help with this process, the Navigator panel is used. The panel gives a view of the entire, compiled design, so will be blank until the project is compiled (Project » Compile PCB Project). The Navigator panel can be opened by clicking the  button down the bottom right of the application.

To use the panel:

  • Set the browsing behavior by clicking the  button at the top of the panel to open the Preferences dialog, where you enable your preferred Highlight Methods. Alternatively, right-click on the object of interest in the panel, and use the context menu options to configure the navigation behavior.
  • Set the scope of your browsing in the first section of the panel, to browse the entire design select Flattened Hierarchy.
  • Click on a component in the Instance section of the list to jump to that component, expand the component to locate and jump to a pin.
  • Click on a net or bus in the Net / Bus section to jump to that net or bus, expand the component to locate and jump to a pin.

Click on a component or net in the Navigator panel to locate that component or net, and trace the connectivity through the design. Right-click to access display options.
Click on a component or net in the Navigator panel to locate that component or net, and trace the connectivity through the design. Right-click to access display options.

Configuring the Verification Options

Main article: Options for Project dialog

There are a large number of drafting and electrical checks that can be performed on the compiled design. These are configured as part of the project options, select Project » Project Options to open the Options for PCB Project dialog (shortcut: C, O). The default settings will not suit every design, so it is important to become familiar with the options, and how to configure them to suit your design.

Drafting Checks

When you compile, common drafting and editing errors are checked for, in accordance with the settings in the Error Reporting tab of the Options for PCB Project dialog.

Configure the required error checks.
Configure the required error checks.

The error checks are organized in groups, for example Violations Associated with Buses, Violations Associated with Code Symbols, Violations Associated with Components, and so on, these groups are listed alphabetically in the dialog.

The Report Mode of each violation can be changed to one of four values by clicking on it and selecting the desired value in the drop-down: Fatal Error, Error, Warning, No Report.

Generally it is better to first compile the design and examine the warnings with the default settings. For those warnings that are not an issue for the current design, the reporting level can be changed.

There are a number of checks that often catch the new designer, these include:

  • Nets with no driving source (Violations associated with Nets section) - if the net does not include a pin with the Electrical Type of Output or I/O, then this error will occur. There are many valid situations that can cause this, for example a net from a connector pin to an input pin.
  • Nets with multiple names (Violations associated with Nets section) - if you change the name of a net, for example you connect a named net to a sheet entry with a different name (which is permitted), because that sheet entry name better reflects the net's function on the lower-level child sheet, then this error will occur. It also occurs in a multi-channel design, where the software must assign a unique name to each repeated net.
  • Inapplicable revision state (Violations associated with Components section) - This check results in the message Can't perform revision state validation. It occurs when there is a component that has been placed from a component Vault, and that Vault does not support revision state validation (the Altium Content Vault, for example).

One option of interest is Nets with only one pin. This can be used to detect single node nets, where a pin has been connected to a Port or Net Label, but does not connect to another pin. This is set to No Report by default and can be changed to Warning to help detect broken nets.

Connectivity Checks

The electrical connectivity is checked in accordance with the settings in the Connection Matrix tab of the Options for Project dialog.

The Connection Matrix defines which each electrical conditions are allowed, and which are not allowed.
The Connection Matrix defines which each electrical conditions are allowed, and which are not allowed.

The matrix provides a mechanism to establish connectivity rules between component pins and net identifiers, such as Ports and Sheet Entries. It defines the logical or electrical conditions that are to be reported as warnings or errors. For example, an output pin connected to another output pin would normally be regarded as an error condition, but two connected passive pins would not.

Click on the small square in the matrix to change a particular rule.  Each rule determines the reporting level for a given pin/net identifier combination. There are four possible values for each rule: Fatal Error, Error, Warning, and No Report.

The Error Reporting and Connection Matrix settings must be examined and set to suit the requirements of the current project.

Interpreting Messages and Locating Errors

Main article: Messages panel

When the project is compiled, every condition which generate a warning or error is listed in the Messages panel. Note that the Messages panel will only open automatically if there is an error condition, to check for warnings you will need to open it yourself. If the Messages panel is not displayed, click the  button down the bottom right of the application to display the Messages panel, as shown in the image to the right. 

Once the project has been compiled, the panel will list any warnings and errors that have been detected.

The Messages panel displays the detected warnings and errors detected in the Spiritlevel example project, after the Error Reporting and Connection Matrix settings were set to defaults.
The Messages panel displays the detected warnings and errors detected in the Spiritlevel example project, after the Error Reporting and Connection Matrix settings were set to defaults.

The panel has the following features:

  • The panel has two regions, the upper grid region summarizes the warnings/errors, the lower region gives details of the currently selected warning/error.
  • Double-click on a message to cross-probe to that warning/error, double-click on a detail to show that specific object.
  • You can click on any of the Messages panel column headings (e.g. Class, Document, Message) to assist in sorting the errors and warnings.
  • Right-click in the panel to Clear messages, or to Export them to a report.
  • The panel will include warnings and errors detected from settings in both the Error Reporting tab and the Connection Matrix tab.

Resolving a Warning or Error

It is important to address each warning or error that is detected. The default error check settings tend to be conservative, as it is better for the software to err on the side of being cautious and let you as the designer decide if the testing boundaries can be relaxed. For example, your design may require IO pins to be connected to Input ports, requiring you to adjust the appropriate cell in the Connection Matrix tab. Another common error check to be changed is the Net has no driving source, requiring you to disable that check in the Error Reporting tab.

There will be situations where you want to test the entire design for a certain condition, but you wish to ignore a warning/error at a specific point in the circuit. For example, you might want to allow a net to be renamed at a specific location, but only in that location. This can be done, by placing a No ERC directive at that location.

Using the No ERC Directive

Main article: No ERC object

When you need to allow a specific point in the circuit to not report an error, you place a No ERC directive on that point, meaning - "do not flag a warning/error at this location". ERC stands for Electrical Rules Check.

The No ERC directive can be used in two ways:

  1. As a generic directive, suppressing all error checks at the point that the directive is placed (Place » Directives » Generic No ERC).
  2. As a specific directive, only suppressing the specified error checks at the point that the directive is placed (Place » Directives » Specific No ERC).

Set the No ERC symbol style and color to suit its role in the circuit. Note that No ERC directives can be excluded from printouts, if required, by enabling the relevant option(s) in the Schematic Print Properties dialog.

Place No ERC directives to suppress warnings or errors at a specific location.
Place No ERC directives to suppress warnings or errors at a specific location.

To help with the process of placing and configuring specific No ERC directives, the software includes the following features:

  • An interactive Place Specific No ERC dialog that opens when the Place » Directives » Specific No ERC command is launched. The dialog presents a list of current compile warnings / errors, supports cross probing to an error, and placing a pre-configured specific No ERC directive on the chosen error. Press Tab to edit the properties of the directive prior to placement, if required.
  • The ability to right-click on a warning / error in the Messages panel, and select the Place Specific No ERC for this violation command, as shown in the left-hand image shown below. You will automatically cross probe to the error location, and a No ERC directive will appear on the cursor, ready to place on the error location. Press Tab to edit the properties of the directive prior to placement, if required.
  • As an alternative to right-clicking on the error message in the Messages panel, right-click on the violating object (not the wavy colored line) and select the Place NoERC to Suppress command, as shown in the right-hand image shown below. The No ERC directive will appear on the cursor, pre-configured to suppress this violation. Press Tab to edit the properties of the directive before placement, if required.
  • A NoERC Manager, use this to review the NoERC directives placed throughout the project.

The right-click command makes it easy to place a specific No ERC directive directly at the error location, either from the Messages panel (left image) or at the violation (right image).
The right-click command makes it easy to place a specific No ERC directive directly at the error location, either from the Messages panel (left image) or at the violation (right image).

Note that No ERC directives cannot be used to suppress all types of error checks. For example, they cannot be used to inhibit the  Inapplicable revision state check. When the No ERC dialog is in the specific violations mode it displays a list of the violation types that can be suppressed, use this as a guide to learn which error tests can be suppressed.

Learning more about Compiler Errors

Main article: Project Compiler Violations Reference

The software can test for a large number of potential error conditions. There is information available about each error check, in the Project Compiler Violations Reference

If you find an issue, select the text/image and pressCtrl + Enterto send us your feedback.
Примечание

Набор доступных функций зависит от вашего уровня доступа к продуктам Altium. Ознакомьтесь с функциями, включенными в различные уровни Подписки на ПО Altium, и функциональными возможностями приложений, предоставляемых платформой Altium 365.

Если вы не видите в своем ПО функцию, описанную здесь, свяжитесь с отделом продаж Altium, чтобы узнать больше.

Content