This is an old revision of the document!
For basic netlisting (such as for relatively simple PCB designs or simulations), there are some simple requirements for the schematics and symbols that you use. These requirements are imposed by the gnetlist frontend, and apply no matter which netlist backend you use. Some backends might have additional requirements not listed on this page.
Schematics must contain only nets, buses, components and graphical elements. A component in a schematic is an instance of a symbol from a symbol library.
Every component that you want to appear in a netlist must have a “refdes” attribute attached to it. This should be an alphanumeric string beginning with a letter. The “refdes” is used to identify the component in parts lists, on PCB layouts, and in simulator output.
If two components in the same circuit have the same “refdes”, then gnetlist will merge them (i.e. it will treat them as being the same component). This behaviour enables slotting. It also allows you to split complicated components with very many pins across several pages, by using different symbols for different sections of the component.
Nets can be named by attaching a “netname” attribute to a net segment. All net segments attached to the segment with the attribute will then share the same name. If two nets in the same circuit have the same “netname”, then gnetlist will treat them as being connected. If two connected nets have different “netname” attributes, then gnetlist will merge all the nets with either of those names together.
Symbols must contain only pins, attributes and graphical elements. Symbols should include an unattached “device” attribute.
All pins must have “pinnumber” and “pinlabel” attributes attached. You should normally attach “pintype” and “pinseq” attributes as well.
Sometimes, you may want gnetlist to ignore a symbol entirely. For example, some people use symbols for non-electrical purposes such as title blocks, or for comment or note markers. To do this, you may use the “graphical” attribute.