next up previous contents
Next: The point Stanza Up: Circuit File Format Previous: Circuit File Format

The component Stanza

There is one component stanza for each component in a circuit. Stanzas representing components have four attributes; namely, type, coords, orient and ports.

The type attribute, as in the component protocol transmitted to the simulator engine, represents the type of the component. Current acceptable values for this attribute include and, nand, or, nor, xor, xnor, buffer or not. The coords attribute stores the coordinates of the center of the component on the canvas as a pair of integer coordinates. These coordinates are obtained from the cmp_coord global array in the GUI implementation. The orient parameter stores the orientation of the component and may be set to one of 0, 90, 180, or 270, each of which represents the number of degrees of rotation. Finally, the ports attribute specifies to which wire points the ports of the component are connected. The value of this attribute is a Tcl-like list which consists of pairs of elements. The first element is a concatenation of the port type, either input (i) or output (o), and the sequence number of the port. The second element of each pair is the identifier of the wire point to which the port is attached. An example of a component stanza is presented in Figure B.1.

   figure3744
Figure B.1: Example of a component Stanza



Donald Craig
Mon Jul 8 12:05:35 NDT 1996