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 a pop-up window will appear allowing the user to set the name and other properties of the terminal. If no name is given, Xic will use a default name.

Clicking on an existing terminal will start a move operation on the terminal, attaching its outline to the mouse pointer. Pressing the Delete key at this point will delete the terminal. Clicking on a terminal with the Shift key held, or double-clicking, will bring up the terminal editing window for the terminal, allowing modification of its properties.

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.

Subcells will most often have terminals defined, which are the connections points to the cell. It is possible, though, that a subcell will have no terminals, if connection is made via global nets. Imagine a subcell containing only a capacitor, which is connected to global nets vdd! and ground. Adding an instance of the cell is equivalent to adding a decoupling capacitor.

It is possible, after an instance of a cell has been placed, to use the Push command to push into the new cell, and define additional 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. It is possible to copy terminals by holding Shift during the ``move'', so that the symbol may have multiple connection points for the same terminal.

New terminals can be added, or terminals deleted, only by returning to schematic mode, and similarly the schematic can be edited only by returning to schematic 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 2022-05-28