Reuse Circuits in EAGLE
Introduction to Pizza Circuit Reuse
This manual describes the Pizza Circuits Reuse Program as it applies to the EAGLE CAD Layout Editor.
Most circuit designers already reuse circuits. It is the most common thing for a circuit designer to reuse copies of known working circuits when drawing up new circuits. You can, for example, open a schematic sheet and copy (using the group function) a portion of an existing design and then paste it into a different schematic. That is a simple example of circuit reuse.
But we would get far more mileage out of our existing circuits by reusing not only the schematic representation but the layout as well! To see how the Pizza Circuits Reuse system helps you do this it is necessary to understand what currently constrains us from easily reusing both schematic and layout together.
Eagle has excellent tools for moving circuit sections around within a sheet or layout. With the advent of Version 5 it is also now easy to move circuits between sheets as well. When copying however there is no supported mechanism to retain the layout associated with the circuit being copied.
Presently there is no built in method in EAGLE for a coordinated copy of both the schematic representation and the corresponding layout representation of a portion of circuitry. If you copy a section of circuitry in the schematic, the schematic representation will be duplicated exactly but the layout information will be lost in the new copy. The parts will be distributed, as if new, at the outskirts of the layout interconnected by airwires (unrouted nets). Attempting to copy from the layout editor will generate a warning to perform the copy function in the schematic instead.
While it is possible to create a circuit layout without having made a schematic (or a schematic without a layout) the general case is to have EAGLE create and maintain both schematic and layout files together. That way the schematic and layout are always consistent such that each symbol on the schematic corresponds to a package on the layout and each net on the schematic maps to a route (or trace) on the layout.
When run separately, however, the schematic editor and layout editor CAN each copy arbitrary sections of circuitry. But they do not, in this case, copy it in a coordinated manner. There is information in the schematic about power and ground connections which is not known to the layout editor. The schematic editor understands that a net connected to a power object (such as a ground) should retain the same name (GND) as all the nets connected to an identical power object. Thus each ground symbol represents, in the schematic, the same network and that is reflected when the circuit is copied in the schematic editor. A net attached to a ground symbol will have the name "GND" and so will its copy!
The layout editor, on the other hand, does not by itself have sufficient information to make the same determination. In the layout editor a route is just a piece of copper and in general the copied one should not connect to the one it was copied from (i.e. It must have a different name). So a route called "GND" for example will be copied as "GND1" (or perhaps GND2 if GND1 is taken already).
Thus any attempt to execute a copy by opening just the schematic by itself and then just the layout by itself will generally result in an inconsistent pair of files. Not only for the reason just given but because one cannot be sure of the order in which unnamed nets are labeled. So when you draw a net on the schematic which has no explicit name the schematic editor automatically generates a name (like N$22). It does this in the layout editor also but maybe not in the same order! So if you copy circuits in the schematic editor and separately in the layout editor there is no guarantee that the newly created unnamed nets will be labeled in the same order on both cases. The result is an inconsistent schematic/layout file pair. Even worse it is possible for the files to APPEAR to the software to be consistent but to have the labels on two nets simply refer to the wrong routes!.
The Pizza Circuit Reuse program solves this problem and at the same time makes reusing a circuit as simple adding a gate into your schematic!
How it Works
The idea is really quite simple. There are two programs, one to make a circuit "reusable" and the other to actually reuse it.
In the past the functions of Design, Schematic Capture, and Layout were distinct and sequential operations largely because they were performed by different people. The Electrical Engineer scribbled the design on paper and then gave them to a draftsperson to draw up. Once drawn and approved the schematic was given to a layout artist who would route the circuit (using red and blue tape on clear plastic if you are old enough to remember that!). These days of course those tasks have been melded together with computer aided design (CAD) tools such as the EAGLE Layout Editor. Using EAGLE, for example, the schematic capture and layout can be directly linked in such a manner that often design and layout proceed together.