Chapter 9: TOOLS


9-6: Network Consistency Checking (NCC, or LVS)


Network Comparison

Electric is able to compare two different cells and determine whether their networks have the same topology. This operation is sometimes called Layout vs. Schematic (LVS), but because Electric can compare any two circuits (including two layouts or two schematics) the term Network Consistency Checking (NCC) is used. Electric's NCC system is based on the Gemini work of Carl Ebeling (see Ebeling, Carl, "GeminiII: A Second Generation Layout Validation Program", Proceedings of ICCAD 1988, p322-325.)

To compare two cells, use the NCC Control and Options... subcommand of the Network command of the Tools menu.

Figure 9.22

The top part of the dialog lists the two cells that are to be compared. If two different cells are currently being displayed on the screen, they are loaded into the dialog. Otherwise, you can select the cells with the "Set" buttons. If there are many cells being displayed, the "Next" buttons will cycle through them. After the first use of this dialog, it remembers the last two cells that were compared.

The bottom of the dialog has buttons for running NCC ("Do NCC") and for doing a "Preanalysis" (a quick comparison of the cells that can discover comparison problems without doing the full analysis). The preanalysis shows networks and components in the two cells and lets you examine those that are different. The "Save" button saves the changes made in the dialog without doing any analysis.

For an example of network consistency checking, open the library "samples.txt" and compare the cells "tool-NCC{lay}" and "tool-NCC{sch}" (you can read the library with the Readable Dump subcommand of the Import command of the File menu). These two cells are equivalent and the checker will find them to be so.

When you request comparison, the system displays the number of components, networks, and other information in each cell. Inconsistencies in these numbers generally lead to failure of comparison. If inconsistencies are found, you will be asked if you want to stop, do a Preanalysis, or continue with the full NCC.

When comparison fails, you can review the errors by typing ">" and "<" to step to the next and previous error that was found. This list is also available in the Cell Explorer (see Section 3-7).

Once compared successfully, nodes and arcs in one cell can be matched to those in the other simply by selecting one and using the Show Network subcommand.


To control the network consistency checker, use the center portion of the NCC Control and Options... dialog. The options on the left are defaults for all cells. Some of these options can be overridden for individual cells by selecting that cell and choosing the "Yes" or "No" override buttons on the right. Note that overrides apply to schematics and not their icons (icon cells are not shown in the list). To see a list of all overrides that exist, use the "List all overrides" button.

For an initial comparison of two cells, it is best to leave all options off. The system can automatically detect some of the options, and you can choose to select others as needed.

When checking a particular cell, the NCC can ignore or examine the contents of instances. If "Expand hierarchy" is checked, then all circuitry below the current cell is extracted and considered with the cell. Otherwise, cell instances are only compared by their connections without regard to their contents. To help align two hierarchies that are structured differently, this option can be applied selectively to different cells.

The "Merge parallel components" checkbox instructs the NCC to consider multiple components wired in parallel to be a single component. When this option is selected, two or more parallel components will correctly match a single, larger component in the other cell.

The "Merge series transistors" checkbox instructs the NCC to consider multiple transistors wired in series to be a single, complex component. When this option is selected, the order of wiring gates to these transistors will not be ignored.

The NCC remembers the time at which a successful NCC was done and marks the matched cells so that they are not checked again (if they haven't changed). The "Clear NCC dates this library" button removes this information from the current library, forcing the NCC to run again. The "Clear NCC dates all libraries" button does the same thing for every library. Note that these buttons also remove "NCCmatch" tags that are created by the matching process.

These forced matches are created automatically during NCC and may also be placed by the user, using the Create NCC Forced Association subcommand of the Network command of the Tools menu. The command places an NCC-match tag on the currently select object. By changing the tag's name, and setting that name on objects in different cells, those objects are forced to match during NCC. To review these forced-matches, use the "List all forced matches" button; to clear them without clearing valid NCC dates, use the "Remove all forced matches" button.

"Ignore power and ground" instructs the NCC to ignore all power and ground networks. This is useful when the layout has power and ground but the schematic doesn't.

The "Check export names" check instructs the NCC to check export names for consistency after a match is found. If exports are named differently in the two circuits, warnings will be issued.

"Check component sizes" instructs the NCC to compare component sizes after a match is found. Unless this is checked, component will be equated only according to their connectivity, and not their size. The size tolerance fields allow slop in the percentage and absolute difference between two components.

The system will warn about networks that do not connect to any components unless "Allow no-component nets" is checked.

The network consistency checker can work on the current cell, or it can recursively check each cell from the current point on downward. To recursive check individual levels of the hierarchy, uncheck the "Expand hierarchy" box and check the "Recurse through hierarchy" box.

There is a popup that allows you to control how resistors will be treated. Resistors can be included or excluded from circuit analysis (see XXX). NCC typically wants to exclude resistors. The popup lets you choose 3 actions that can occur: (1) "No resistor adjustment" causes the current state of resistor inclusion/exclusion to remains for an NCC run; (2) "Include Resistors" forces resistors to be included before an NCC run; and (3) "Exclude Resistors" forces resistors to be ignored before an NCC run.

The "NCC Debugging options..." button brings up a dialog for helping to debug this system. It is not intended for users and is not discussed further.


During comparison, there are often situations where a group of networks or components from one cell are equivalent to a group in the other cell. Because they are structurally ambiguous, the NCC tries to disambiguate them and achieve a complete match. The first thing that is checked is names (export names, network names, or node names).

Other techniques for disambiguation include node sizes, and random guessing. When a random guess is made, tags are placed in the circuit to show what was presumed. These labels have names like "NCCMatch3" and are placed on nodes or arcs to indicate presumed association. The "Show 'NCCMatch' Tags" requests that these automatically-generated equivalence markers be displayed in the circuit.

Prev Previous     Contents Table of Contents     Next Next