The header of a component stanza consists of the word component. Each component stanza has three attributes. The type attribute determines the type of the component; acceptable values include one of and, nand, or, nor, xor, xnor, buffer or not. The id attribute is used to distinguish among several components of the same type. Its value is a sequential serial number assigned to the component by the GUI. The port attribute is used to express the connectivity of the circuit in the context of its adjacent netlists. The value of this attribute is a list of integers, each of which represents a netlist connected to each port of the component. Therefore the number of integers in this list will be the same as the number of ports. The ports of a component are sequentially ordered by the GUI, with the input ports usually numbered before output ports. The position of the netlist numbers determines to which port the netlist is connected.
For example, consider the NAND gate in Figure 5.4. The two input ports are numbered 1 and 2, and the output port is numbered 3. This numbering is done internally by the GUI and is usually of no consequence to the end user. Netlist number 32 is connected to port 1, netlist 13 is connected to port 2 and netlist 48 is connected to port 3. If this NAND gate was assigned the serial number 7 by the GUI, then the stanza representing this component would be as shown below the NAND gate in Figure 5.4.
Figure 5.4: A 2-input NAND Gate and its
Corresponding Protocol Stanza