Sorry, it was (and is) too late and my brain conked out. Let me see if I can get it right.

I'd not realized that this was an ongoing debate, obviously the gEDA community has thought long and hard about the 'heavy' vs 'light' symbols debate.

As someone who is very recently trying to make the switch from closed-source to open-source EDA packages but has a lot of experience with open-source software in general, I should point out that a narrow well-defined user operation flow is acceptable and preferrable in day-to-day work. Keeping the package open-ended and not making any assumptions about what the end-user wants are admirable goals, but open-source software too often falls into the black hole of "lets keep our options as open as possible" and avoids settling on a single way of doing a given task. This usually makes the package a pain to wrestle with.

Most of the closed-source big-business EDA software packages I've used (and I haven't seen them all, I'm sure) have a library that contains a 'light' version of most of the major components (for example, an "ideal NPN transistor") to allow open-ended schematic design and 'ball-park' simulations, and then an exhaustive list of 'heavy' device-specific symbols and associated SPICE models to fascilitate quick design building, accurate simulation, and convenient PCB layout. I think having a symbol file that contains all the information about its schematic representation, which simulation model it is associated with, and what physical package it is manufactured in goes a long way toward nailing down a single well-defined but still versatile and powerful design flow from schematic capture to simulation to PCB layout. Having to call separate programs in between these steps to fill in missing information slows down the design loop and makes the package feel cumbersome.

I should say at this point - PLEASE don't be offended by any criticism I offer up here. I full respect the work that has gone into gEDA and am mighty thankful that it's actively being developed. Most of my job is software development, so I know what it's like to try to wrangle a large product like this. But I also know that the best input is often a fresh take by someone that's seeing your project for the first time. I hope any comments I make are useful, even if only to give a feel for how the uninitiated initially respond.

Ok, enough philosophy, let me lay out that problem i was having.

My first crack at building a .sym file for a 2N5551 transistor looks like this. I know there's some pintype definitions left empty, I'm still working on that.

v 20050820 1
L 300 900 600 700 3 0 0 0 -1 -1
L 600 400 600 800 3 0 0 0 -1 -1
L 470 410 500 370 3 0 0 0 -1 -1
L 440 450 470 410 3 0 0 0 -1 -1
L 440 450 421 381 3 0 0 0 -1 -1
L 500 370 421 381 3 0 0 0 -1 -1
L 600 500 469 412 3 0 0 0 -1 -1
L 421 381 300 300 3 0 0 0 -1 -1
P 300 1200 300 900 1 0 0
{
T 400 1000 5 10 0 1 0 0 1
pinseq=1
T 400 1000 5 10 0 1 0 0 1
pinnumber=1
T 400 1200 5 10 0 1 0 0 1
pinlabel=B
T 400 1400 5 10 0 1 0 0 1
pintype=
}
P 800 600 600 600 1 0 0
{
T 700 700 5 10 0 1 0 0 1
pinseq=2
T 700 700 5 10 0 1 0 0 1
pinnumber=2
T 900 700 5 10 0 1 0 0 1
pinlabel=A
T 900 900 5 10 0 1 0 0 1
pintype=
}
P 300 0 300 300 1 0 0
{
T 400 100 5 10 0 1 0 0 1
pinseq=3
T 400 100 5 10 0 1 0 0 1
pinnumber=3
T 0 0 5 10 0 1 0 0 1
pinlabel=C
T -700 200 5 10 0 1 0 0 1
pintype=
}
T 700 0 8 10 0 1 0 0 1
footprint=TO92
T 700 200 8 10 1 1 0 0 1
device=2N5551
T 700 400 8 10 0 1 0 0 1
description=Small signal transistor
T 0 600 8 10 1 1 0 0 1
refdes=Q?

Note at the bottom that there's text attributes for footprint, device, description, and refdes. Also note that field 6 of the 'T' line for footprint and description is set to 0 (invisible), while its set to 1 (visible) for device and refdes.

If I open gschem up and inset this symbol into a blank file, and then save and open that .sch file in a text editor, it looks like this:

v 20050820 1
C 72300 52600 1 0 0 2N5551-1.sym
{
T 73000 52800 5 10 1 1 0 0 1
device=2N5551
T 72300 53200 5 10 1 1 0 0 1
refdes=Q?
}

Note that the device and refdes attributes where preserved, but the description and footprint attributes have been 'cleaned off'. I can make an attribute survive or fail this importing process by simply flagging it as visible or invisible in the .sym file. Also, opening up the device's properties inside gschem only shows the device and refdes attributes.

What I wanted to do was define attributes in the .sym file that I did not necessarily want to be visible on the schematic, but that were still preserved and associated with the symbol so that it could be passed on to PCB. For instance, I wanted 'footprint' to be invisible but still there so that PCB could use that information.

It appears that gschem decides to keep any attribute that is marked as visible, and throws away any attributes that are marked as invisible in the .sym file. Is this how it was intended to work?

I can appreciate that the prevailing wisdom is that the library should be 'light', but that shouldn't prevent me from building a custom 'heavy' library of symbols if I want, should it? This behavior of gschem means I either can leave attributes out of my .sym file and add them to my symbols after I've inserted them into the schematic, or I can leave the attributes visible in my .sym file and then manually make them invisible after I've inserted them into the schematic. Either way, I have to open the properties of every symbol I import, which is what I was trying to avoid in the first place.

Thanks for reading this enormous post, and thanks for your patience, and above all thanks for your continued development of this package. Have a good one.
- Jonathan Hanson
  Louisiana State University
  Department of Physics and Astronomy


Stuart Brorson wrote:

I'm running into an issue with symbols and gschem.

I think gEDA and friends are a good idea, and I'm going to attempt to make the switch from closed-source packages. However, one big glaring issue I've noticed in gEDA is the state of the symbol library. The organization is pretty bad. Also, according to the tutorials I've read for capturing a schematic and then laying it out as a PCB, you have to hand edit attributes like 'footprint' in several of the symbols after dropping them into the schematic. This obviously isn't the best way to have things set up; it would be better if these symbols were already loaded with the useful information, even if that means a larger library to choose from.

This is a subject which comes up frequently on the geda-user list.  It
is called using "heavy" vs. "light" symbols.   You can read about it here:

http://archives.seul.org/geda/user/Jun-2005/msg00000.html

FWIW, the main gEDA developers tend to prefer light symbols since it
provides maximum flexibility and makes minimum assumptions about the
user's requirements.  OTOH, it makes the user do more work. . . .

[snip]

Anyway, I figured I would just build my own custom symbol library to my own spec, since all I use are basic passive parts, a few transistors and some diodes. It shouldn't be too hard to just build symbols as I need them. I read through the guide at http://www.geda.seul.org/docs/current/fileformats/index.html detailing how to build a symbol, and starting building a 2N5551 transistor model.

Now the problem I have is in the visibility of attributes. I intend to have all the useful attributes filled in (stuff like documentation and footprint), but these aren't values that need to be visible on the schematic once the device is inserted into the schematic. The problem is, a section of the .sym file like:

T 1400 0 8 10 0 1 0 0 1
footprint=TO92

gets ignored by gschem when the symbol is inserted. Checking the attributes of the symbol only shows attributes from the .sym file that were marked as visible. The sixth field being set to '0' is supposed to make the following attribute invisible, but instead, gschem just considers it something to be thrown away. Saving the file that the symbol was imported into and checking it with a text editor confirms that anything that wasn't marked 'visible' is stripped off a symbol.

I am not sure why your attribs are disappearing.  What do you mean
that gschem just throws the symbol away?  Here are some suggestions:

*  Maybe the attributes aren't thrown away, but you just can't see
them because they are invisible.  Do "edit" -> show/hide invisible
text" to toggle attribute visibility.

*  Are you attaching the attributes to the symbol itself?  If so,
gschem doesn't promote most attributes.  Most attributes should be
attached to teh symbol in the schematic.  That is, create teh symbol
with only a "DEVICE" and "refdes" attribute, place it in your
schematic, then attach teh remaining attributes there.
BTW, if it is
too painful to attach the attributes individually using gschem, use
the utility "gattrib" (from teh command line) to input & edit attribs
using a spreadsheet.  To use gattrib you must first place your
components, and then give them refdeses.  After that, you can input
any attributes you want using gattrib.

*  If the attributes really are disappearing from your symbols, please
make sure that you are using an up-to-date version of gEDA/gschem.
The file format has changed within the last year or two, and possibly
you are using older documentation for the file format (although your
line above looks fine to me & is the same as a recent schematic on my
machine).
*  Finally, a small point:  Make your symbol's Y coordinate something
positive, not zero.  This will place your symbol in a good place when
you open it with the symbol editor.  I tend to see values in teh 1000
range on good symbols.

There're lots of attributes that need to be kept associated with the symbol in the file, but not necessarily displayed on the schematic. Would it be possible to modify gschem so that attributes in the .sym file that are marked as invisible still get stored in the .sch file, but just stay marked invisible so as not to appear on the schematic?

You want to promote symbol attributes into the schematic, and then
leave them in the schematic?  Can you please elucidate?

On the previous note: I don't know what the protocol is for building new symbol sets, but once I'm done with the resistor and capacitor sets in standard values, I'd be happy to tar them up and submit them. Would there be any interest in them?

http://www.gedasymbols.org/ has been set up for this purpose.  It is
currently incomplete.  You can contact the guy who set it up and ask
him to put up some symbols.  He may ask you to help by
running/maintaining the site.

Stuart

Reply via email to