next up previous contents index
Next: Node and Device Naming Up: Electrical Schematic Editing Previous: Adding Properties to Devices   Contents   Index


Creating Subcircuits

In order for a cell to be a valid subcircuit, i.e., electrically active when placed into another cell, one or more contact terminal locations must be defined. This is accomplished with the subct button in the side menu. When this button is pressed, the user may click on contact points within the circuit to define contact locations. Only valid contact points can be selected, i.e., the point must fall on a wire vertex, or a contact point of a device or subcircuit. When a valid point is clicked on, a boxed digit will appear at the location, and the user will be prompted for a name for the terminal. The user can press Enter to accept a default name, or can enter a short descriptive name for the contact, such as ``output''.

Clicking on an existing terminal will delete the terminal. Clicking on an existing terminal with the Shift key held will ``attach'' the terminal to the mouse pointer, and clicking on a new location will move the terminal. Double clicking on a terminal with the Shift key held down will repeat prompting for the terminal's name.

The terms button in the side menu, when on, will display the terminal locations, as well as the terminal locations of subcells in the drawing.

Once one or more terminals have been defined, the cell can ``officially'' be used as a subcell. Although cells without contact terminals can be placed, an error message will be generated, complaining that the subcell has no name property. It is possible, at this point, to use the Push command to push into the new cell, define the subcircuit contacts, and pop back to the parent cell.

In some cases, it is preferable that the subcell be displayed as a symbol, rather than a schematic, when expanded. For example, if the subcell represents an AND gate, and there are many instances of the subcell, the drawing of the parent cell will appear much neater if the AND gate cell is represented by an AND symbol rather than its full schematic. One can define such a representation with the symbl button in the side menu.

On pressing the symbl button for a cell without a previous symbolic representation defined, the schematic will disappear, and the screen will be blank. One is free to use the objects from the shapes menu, wires, and labels, on any of the layers, to construct a symbol which will be displayed for that cell. When the new drawing is complete, the subct button should be pressed again. This will make the contact point indicators visible, however they will be in arbitrary locations. The user should move the terminals to where they belong in the symbolic representation, by dragging them with the left mouse button. Unlike in the normal schematic representation, the terminals can be placed anywhere. The terminals will not disappear when clicked on. New terminals can only be added by returning to normal mode, and similarly the schematic can be edited only by returning to normal mode. The display status of the cell is set by the status of the symbl button when it was saved to disk, or last edited if it is still in memory.


next up previous contents index
Next: Node and Device Naming Up: Electrical Schematic Editing Previous: Adding Properties to Devices   Contents   Index
Stephen R. Whiteley 2006-10-23