Translations of this page are also available in the following languages: Русский.

# gEDA/gaf Master Attribute Document

by: Ales Hvezda, ahvezda@geda.seul.org

This document is released under GFDL

July 10th, 2007

## Overview

This document describes all the attributes used in in gEDA/gaf (GPL'd Electronic Design Automation / Gschem And Friends). This document is broken down into several section: this overview, symbol only attributes, schematic only attributes, attributes which can appear in both symbols and schematics, and attributes which are obsolete or deprecated.
In this document, attribute names are in bold and examples are in the `typewriter` font.

## What are Attributes?

Attributes in the gEDA/gaf system are nothing more than text items which take on the form: name=value. Name can be anything just as long as it doesn't contain a equals sign. Value can also be anything just as long as it is something (vs nothing). name= (without a value part) is not a valid attribute. Also, there cannot be any spaces immediately before or after the equals sign.
Attributes can be attached to some part of the symbol. If the attribute conveys information specific to an object, then the attribute should be attached directly to the object, otherwise the attribute should be free standing or floating. Free standing attributes just exist in the symbol file as text items which take on the form name=value.

## Symbol only Attributes

### device

device= is the device name of the symbol
device= should be placed somewhere in the symbol and made invisible. This is a free standing or floating attribute. If the object is a graphic then device= should be set to none (device=none) and attach a graphical= attribute. Do not confuse this attribute with just having a text label which the device name. Do not put spaces into the device name; there are some programs which dislike spaces in the device specifier. Generally the device name is in all caps.
Examples:
`device=7400`
`device=CONNECTOR_10`
`device=NPN_TRANSISTOR`

### graphical

Symbols which have no electrical or circuit significance need a graphical=1 attribute. Symbols like titleboxes are purely graphical symbols. Any symbol which has graphical=1 is ignored by gnetlist.
graphical=1 should exist somewhere in the symbol and made invisible. This is a free standing or floating attribute. Don't forget to set device=none.
Example:
`graphical=1`

### description

The description attribute provides a simple one line description of what the symbol is supposed to represent.
Example:
`description=4 NAND gates with 2 inputs`

### author

The author attribute identifies the name of the author of this symbol and their e-mail address. This attribute is optional, but it is nice to know who created which symbols. It also serves the purpose of known who to contact if there are questions about the intent(s) of the symbol. This attribute is free form and it can also include people's names who modified the symbol as well as multiple e-mail addresses. It is probably also a good idea to obfuscate the e-mail address so it is not harvested for spam purposes.
Example:
`author=Ales Hvezda ahvezdaATgeda.seul.org`

### comment

The comment attribute can contain anything. This attribute can convey any additional information which might not fit into any other attribute. There can be multiple instances of this attribute.
Example:
`comment=This is a comment inside a symbol`

### pinseq

This attribute is used to give each pin a unique number or sequence. All pins must have a pinseq=# attribute attached to the pin object. This attribute should be hidden. This attribute is used extensively by gschem and gnetlist.
In some backends (especially the SPICE backend), gnetlist will output pins in the order of increasing pin sequence. The sequence numbers start at 1 and should increase without skipping any numbers. This attribute is not the pin number (i.e. device pin numbers, like GND is 7 on TTL). For pin numbers see the pinnumber attribute.
Examples:
`pinseq=1`
`pinseq=2`
`pinseq=3`

This attribute replaces the obsolete pin#=# attribute.

### pinnumber

This attribute is the pin number (i.e. like GND is 7 on 74 TTL). All pins must have a pinnumber=# attribute attached to the pin object.
You can have numbers or letters for the value. This attribute should be visible with the value only visible. You also need a pinseq attribute.
Examples:
`pinnumber=1`
`pinnumber=13`
`pinnumber=A0`

This attribute replaces the obsolete pin#=# attribute.

### pintype

Each pin must have a pintype=value attribute attached to it and should be made hidden. Table 1 shows valid values for this attribute.
This attribute is not used extensively in the symbol library, but it will be used for DRC and netlisting. Use "Passive" if no other type matches.
Examples:
`pintype=clk`
`pintype=in`
`pintype=pas`

in | Input
out | Output
io | Input/Output
oc | Open collector
oe | Open emitter
pas | Passive
tp | Totem pole
tri | Tristate (high impedance)
clk | Clock
pwr | Power/Ground
Table 1: pintype values

### pinlabel

This attribute labels a pin object. This attribute is primarily used by gnetlist to support hierarchical designs.
This attribute must be attached to the pin and be left visible. Please make this attribute green (instead of the default attribute yellow).
Examples:
`pinlabel=A0`
`pinlabel=DATA1`
`pinlabel=CLK`

### numslots

If a component has multiple slots in a physical package (such as a 7400 (NAND) which has 4 NANDs per package) then you need a numslots=# attribute. The # is the number of slots that are in a physical device. numslots=# should exist somewhere in the symbol and be made invisible. This is a free standing or floating attribute. If the symbol does not need slotting, then put numslots=0 into the symbol file.
Example:
`numslots=4`

### slotdef

If a component has multiple slots in a physical package then you must attach a slotdef=slotnumber:#,#,#... for every device inside the physical package.
The slotnumber corresponds to the slot number. The colon after the slot number is required. For example, if a device has 4 slots then there would be slotdef=1:..., slotdef=2:..., slotdef=3:..., and slotdef=4:... attributes somewhere in the symbol and be made invisible. This is a free standing or floating attribute.
The #'s have a one-to-one correspondence to the pinseq attributes and specify which pinnumber=# is used during display (gschem) or netlisting (gnetlist).
It is recommended that all symbols which have slots have a slot=1 attribute attached in the same fashion as the device= attribute.
See 7400-1.sym as a concrete example.
Examples:
`slotdef=1:1,2,3`
`slotdef=2:4,5,6`
`slotdef=3:7,8,9`

This attribute replaces the obsolete slot#=# attribute.

### footprint

footprint=package_name should exist somewhere in the symbol and be made invisible. This attribute is used by gnetlist and primarily for the PCB package.
Attach this attribute just like the device= attribute. This is a free standing or floating attribute.
package_name is the pcb footprint or package type like DIP14 or DIP40. Although this attribute in principle is pcb package dependent, gEDA/gaf conventions exist to make this attribute as portable as possible, allowing for easy collaboration and sharing between users. See the Footprint naming conventions.
If the symbol does not have a footprint, then the value of footprint= should be set to none. If the footprint must be overridden in a schematic, then the value of footprint= should be set to none. If the footprint is not known, then the value of footprint= should be set to unknown.

### documentation

documentation=documentation_locator may exist somewhere in the symbol and be made invisible. This attribute is used by gschemdoc to find relevant documentation for the symbol, or rather, the device or component associated with the symbol.
Attach this attribute just like the device= attribute. This is a freestanding or floating attribute.
documentation_locator is either the base filename of the documentation, or it is the complete Internet URL (Uniform Resource Locator). If it is the filename, an attempt will be made to search for it in the local gEDA share directory named documentation.
Filename example:
`documentation=sn74ls00.pdf`
URL example:
`documentation=http://www-s.ti.com/sc/ds/sn74ls00.pdf`

## Schematic only Attributes

### netname

This attribute should be attached to a net object to give it a name. Multiple net names for connected net segments is discouraged. All nets which have the same value are considered electrically connected. This attribute is not valid inside symbols (as you cannot have nets inside of symbols).
Examples:
`netname=DATA0_H`
`netname=CLK_L`

### source

The source= attribute is used to specify that a symbol has underlying schematics. This attribute is attached directly to a component.
This attribute should only be attached to instantiated components in schematics. Attach the attribute to a component and specify the filename (not the path) of the underlying schematic (like block.sch) for the value. The specified schematic must be in a source-library path. This attribute can be attached multiple times with different values which basically means that there are multiple underlying schematics.
Examples:
`source=underlying.sch`
`source=memory.sch`

## Symbol and Schematic Attributes

### refdes

This attribute is used to specify the reference designator to a particular instantiated component. It must be on ALL components which have some sort of electrical significance. This attribute can also be on the inside of a symbol (it will be promoted, i.e. attached to the outside of the symbol, if it is visible) to provide a default refdes value (such as U?). Usually this attribute is composed by a prefix ('U' for example) and a number (different for each component).
Examples:
`refdes=U1`
`refdes=R10`
`refdes=CONN1`

#### refdes naming restrictions

Gschem will accept any string as a value for the refdes. However, some back-ends to gnetlist impose restrictions on the allowed syntax.

Specifically, gsch2pcb requires:

- No spaces
- No hyphens. This might upset the M4 macro language potentially used to generate footprints. "_" is ok.
- Any lower case suffix is ignored. This is so you can, place four discrete NAND gates on the schematic called U1a, U1b, U1c and U1d. They will netlist into a single footprint named U1.
- Non-ASCII characters like üöäß will not print in pcb

#### refdes naming conventions

There is a convention of the reference designator used for each kind of component. Here are some of them (substitute a cardinal value for <n>):

Prefix | Component type
--- | ---
R<n> | Resistor
RN<n> | Resistor Network
FB<n> | Ferrite Bead
L<n> | Inductor
C<n> | Capacitor
B<n> | Battery
F<n> | Fuse
J<n> | Connector
P<n> | Connector (usually plugs that mate with J<n>)
K<n> | Relay
S<n> | Switch
T<n> | Transformer
TP<n> | Testpoint
M<n> | Motor
D<n> | Diode
Q<n> | Transistor
U<n> | IC
X<n> | Crystal

### slot

This attribute is used to specify a slot for a slotted component. It should be attached to an instantiated component. This attribute can also be on the inside of a symbol (it will be promoted, i.e. attached to the outside of the symbol, if it is visible) to provide a default slot.

### net

The net= attribute is used to create power/ground and arbitrary nets. Please see the net= attribute mini-HOWTO for more info. When this attribute is inside a symbol, it is used to create nets. When this attribute is attached to an instantiated component (in a schematic), then the net= can also be used to create new nets and can be used to override existing nets.

### value

Used mainly in the spice backend netlister to specify the value of the various elements. No translation is done on this, and it is placed as is into the netlist.
Examples:
`value=1K`
`value=10V`

### symversion

The symversion= attribute is used to version the contents of symbols. Because symbols are, by default, referenced from the schematic and not embedded within it, problems can occur in a schematic using a particular symbol if that symbol file is modified. For instance, if pins are moved in the symbol, the schematic net lines will no longer connect to the correct pins. The symversion= attribute allows tracking such breaking changes to symbols and notifying the user of potential problems when a schematic is loaded.

This attribute is optional, but if present it must take the following form:
major.minor

where major and minor are integers. The major number is incremented when a change is made to a symbol that might break an existing schematic using the prior version of symbol when the new version is introduced. The minor number is only incremented when a minor change is made (a change that cannot break an existing schematic, such as cosmetic changes while retaining structure such as location of the pins).

If this attribute is inside a symbol and that symbol is placed onto a schematic, the symversion= attribute will be automatically “promoted”, causing a copy of the symversion=M.N attribute to be stored on the symbol instance in the schematic itself. When a symbol is loaded from disk, the value of the symversion= inside the symbol file (if any) and the symversion value attached to the symbol instance on the schematic are compared. If the values differ, then libgeda will output a warning message (for minor version changes) or an error message (for major version changes).

This attribute should normally be made invisible when placed inside a symbol file. This attribute is always promoted when it is found inside a symbol during component placement. Users should not attach this attribute manually to instantiated symbols in a schematic.
Examples:
`symversion=1.1`
`symversion=2.0`

### dist-license

The dist-license attribute is used to specify the redistribution license for the symbol or schematic. It should be the name of a known license. Some examples values are: GPL, GPL version 2 only, GPL version 3 only, public domain, Apache version 2, Modified BSD, X11, etc.
For a list of licenses see: FSF License List and OSI License List

### use-license

The use-license attribute is used to specify the license for how the symbol or schematic can be used by other people in their own circuits or boards. Some example values are: unlimited, personal use only, not for sale, etc.
FIXME put a better list of examples here.

## Obsolete Attributes

### uref

The uref= attribute is obsolete and cannot not be used. It was used to provide the same information as refdes.

### name

The name= attribute should not be attached or appear in any symbol. It is considered ambiguous. name= was never used by gEDA/gaf.

### label

The label= attribute is obsolete and cannot be used. It was used to give nets names/labels and to label pins. The replacement attributes for this are netname and pinlabel respectively.

### pin#

The pin#=# attribute is obsolete and cannot be used. It was used to provide sequence and number information to pins. The replacement attributes for this are pinseq and pinnumber.

### slot#

The slot#=# attribute is obsolete and cannot be used. It was used to provide slotting information to components. The replacement attribute for this is slotdef.

### type

The type= attribute is obsolete and cannot be used. It was used to provide type information on pins. The replacement attribute for this is pintype.

### email

The information in this attribute has been merged with author.

## Document Revision History

July 14th, 2002 | Created attributes.tex from attributes.txt.
July 14th, 2002 | Updated doc to be in sync with post-20020527.
August 25th, 2002 | Added obsolete type= attribute.
September 14, 2002 | Added description= attribute. Minor fixes
October 7, 2002 | Added doc= attribute; Egil Kvaleberg.
February 11, 2003 | Added reference to footprint conventions.
February 23, 2003 | Added author=, email=, and comment= attributes.
July 6th, 2004 | Added symversion= attribute.
July 10th, 2007 | Added dist-license= and use-license= attributes.