4.1.4.2 Add attributes
For more information on the attributes presented here, please see the
Master attribute list.
- A device=DEVICENAME attribute should be placed somewhere in the
symbol and made invisible. Typically the devicename is in all
caps (capital letters). This attribute should not be used as a label.
Use a separate text object for the label. If the object is a graphic
then device= should be set to none (device=none).
- A graphical=1 attribute should exist somewhere in a symbol
which is purely graphical (such as a title block or decon
symbol). Symbols which have this attribute have no electrical or
circuit significance. Don’t forget to set device=none per the
previous requirement.
- A description=TEXT attribute should exist somewhere in the
symbol. The TEXT value should provide a one line description
of the symbol.
- A footprint=PACKAGENAME attribute should exist somewhere in the
symbol which might be used with a pcb netlister. PACKAGENAME
is a pcb footprint or package type like DIP14 or DIP40. Please see
the footprint naming
conventions page for further detail. If you are using gEDA / PCB,
also see the PCB
documentation and gnetlist/docs/README.pcb for more info on this
attribute and how it is used.
- A refdes=U? attribute should be placed inside all non-graphical
symbols. Make only the value visible and it will be promoted
(attached to the outside of the symbol, so it can be edited) when the
symbol is placed in a schematic.
- The label= and name= attributes should not exist
anywhere in the symbol. They are obsolete.
- The netname= attribute should not be attached anywhere in the
symbol. It is only used in schematics.
4.1.4.3 Slotting
- If a component has multiple slots in a package (such as a 7400 (NAND)
which has 4 NANDs per package) then you need a numslots=#
attribute. The # is the number of slots the device has.
numslots= should be exist somewhere in the symbol and made
invisible. Additional slot related required attributes are described
below.
- If a component has multiple slots in a physical package then you also
need to include a slotdef=#:#,#,#... for every slot. The first
# corresponds to the slot number. If a device has 4 slots then
there should be slotdef=1:..., slotdef=2:...,
slotdef=3:..., and slotdef=4:..., attributes existing
somewhere in the symbol and made invisible. The subsequent #
have a one-to-one correspondence to pinseq=# attributes and
specify what corresponding pinnumber=# should be when that slot
is set. See the attached 7400-1.sym as an
example of how this should all work.
- It is recommended that all symbols which have slots have a
slot=1 attribute inside the symbol.
4.1.5 Checking a Symbol
Running gsymcheck will check that all of these requirements are met.
gsymcheck will output fatal errors which are quite serious and must be
corrected. gsymcheck will also output warnings on things which should
be fixed but are not fatal.
4.1.6 Style
This section describes the style which is used in the standard
gEDA/gaf symbol library.
4.1.6.1 Text
- All text labels should all be 10 pt in size.
- Text (labels not attributes) should be color number 9 (text | green).
- Use the special overbar encoding (e.g. pinlabel=\_Reset\_) to
express inverse logic levels.
4.1.6.2 Attributes
- pinnumber attributes should be displayed as pin numbers for
pins (not pinseq) and should be 8 pt in size.
- Attached attributes should be color number 5 (attributes | yellow).
The color is set automatically to yellow if the text item is attached.
- The only exception to this is pinlabel= attributes, those
should be color number 9 (text | green). If every text item within a
symbol is yellow, the symbol looks too yellow.
- Attributes can be attached to some part of the symbol. Toplevel
attributes (like the device= or net= attributes) used to
be required to be attached to something to be attributes, but now they
just have to exist in the symbol file as name=value.
- Expanding a bit on the last sentence, as long as the text item has
the format name=value, it is considered an attribute.
Attributes inside a symbol do not have to be attached to anything.
In order to see hidden attributes in
lepton-schematic
select
Edit → Show/Hide Inv Text.
- There is a symbol content versioning system in libgeda which is based
on the symversion= attribute. Please see the symversion attribute for more information on using this versioning scheme.
4.1.6.3 Graphics
- Lines, boxes, arcs, and any other graphics should be color number 3
(graphic | green).
- Polarity bubbles should be color number 6 (logic bubble | cyan).
- If you are unsure on how to make a new symbol look or how big to make
a new symbol, look at the existing symbols to get a feel for the
appropriate appearance and size.
4.1.6.4 Pins
- Pins should all be 300 mils (3 grid spaces) long.
- For pins which are next to a logic bubble, make the pins 200 mils (2
grid spaces) long and then make the logic bubble 100 mils in diameter.
In order to draw a 100 mil diameter circle, you will need to change
the snap spacing to 50.
- A pin has two ends: one end has a red endpoint and one end that does
not. The red endpoint is where nets can be connected. You can either
rotate the pin so that this active end is in the right place or
manually edit the symbol file changing the “whichend” parameter on
the pin object. See pin for more info.
- Be that all endpoints of pins which are meant to be connected to are
on the 100 mil grid. The endpoint which is not active can be off the
grid if necessary.
- Pins should be color number 1 (pins | white).
- Leave 400 mils (4 grid spaces) between (vertically) pins, unless you
are drawing a special symbol, then just try to make it look good.
- Pin number attributes should be 50 mils above (or below; which ever
makes the most sense) the pin which they are attached to.
- Input pins belong on the left and output pins belong on the right of
the symbol.
- Please do not mix inputs and outputs on the same side of the symbol,
unless absolutely necessary.
- You can have pins on the top or bottom of a symbol.
- The order for rows of pins (buses) should be LSB (least significant
bit) to MSB (most significant bit). When drawing pins which are part
of a bus, make sure the LSB of the bus is at the top (or for pins on
top/bottom of a symbol, left of the rest of the other pins). Look at
74/74181-1.sym for a correct example of this order (
A0
on top through A3
and B0
on top through B3
).
Violating this rule will make connecting buses much more difficult.
- When placing pins on logic gates, be sure to place the smallest pin
numbers toward the top (or left) and then increment going down (or
across).
4.1.6.5 Electrical
- Do not draw power and ground pins. That information will be conveyed
using attributes (see the net= attribute mini-HOWTO).
- The above rule can be broken if necessary, but keep in mind most of
the standard library does not have power pins showing.
- Keep in mind, symbols are supposed to be symbolic, they do not
represent the physical package that the device comes in.
- There is some disagreement on above, so this is okay too: arrange the
pins on a symbol logically so that they promote an uncluttered
schematic. Note that this is frequently not the same pin arrangement
as the physical device.
4.1.7 Hints and Tips
This section describes some hints and tips which will make your symbol
creation experience easier.
- Pins MUST be snapped on the 100-spaced grid.
- Avoid drawing things off of the grid. If you do, you cannot move the
object(s) using the move command (if the grid is on) since the object
will be snapped to the grid. [This was an old bug, which I think has
been fixed, but avoid doing this anyway]. Use the symbol translate
command instead (or move the object with grid snap off).
- It is okay to set the grid finer than 100 (say 10 or 25) when creating
symbols, just remember to set this back to 100 once you are ready to
translate the symbol to the origin.
- If you want to translate a symbol from the origin to elsewhere, then
use the Edit → Symbol Translate... command and
enter a non zero number. Make sure this number is a multiple of 100
(i.e. 1000, or 1100).
- Remember that pins are special objects; if you want to add a pin, make
sure it is a pin and not a line or net. Use the Add
→ Pin command to place a pin.
- Don’t include nets or buses inside symbols. That is not supported and
doesn’t make much sense anyway.
- pinnumber should be the visible attribute for pins, along with
pinlabel if any.