[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: gEDA: Saving out pin attributes from gattrib
Hi Stuart,
[snip]
>The problem is architectural. Pin attribs like pinseq and pinlabel
>are attached to the sym file, not to the sch file. This means that
>when I call s_page_save_all, no pin changes get saved out because they
>don't live in the sch file.
>
>There are two ways to fix this:
>
>1. I can alter gattrib so that it also writes out changes to the sym
> files. This strikes me as dangerous, because you might screw up your
> entire symbol library by just changing pinseq attribs willy-nilly.
> Therefore, I am against it.
However, what if you made a copy of the symbol you were going to
change (say copy it into the current directory), modified the copy, and
then informed the user to setup their component-library appropriately.
I like this because it is 1) simple to implement and 2) completely
transparent as to what is going on, 3) changes to implement this are
inside of gattrib and 4) doesn't mess up the entire symbol library. :)
The other idea that Bert had, about embedding the symbols inside
the schematic is also good. Simple to implement and mostly transparent.
Although, I need to improve the Unembed functionality within gschem to
be more intelligent.
>2. We can implement some kind of "shadow attribs" for pins. This
> means that basic pin attribs exist at sym level for the components, but
> you can overwrite them at sch level, and the overwritten attribs get
> written out in the netlist. Refdes already works like this,
> why not make pinseq and pinlabel work the same way?
This is quite a bit of work, since 1) pins are not exposed at the
schematic level 2) pins are not exposed inside the schematic files and 3)
not nearly as transparent to the user, and 4) a new mechanism will need
to be created to support attaching attributes to pins inside symbols
from the schematic level. The whole idea of symbol attribute promotion
is great, but can be a little confusing at first. I don't want to add
another implicit mechanism like that. However, I am always open to
being convinced of my stupidity. :)
[snip]
> To make shadow attribs work, however, we need to make pins editable in
> the schematic. Right now, they are only editable in the symbol
> editor. This is a gschem change. I could look into doing it, but
> you are the gschem owner, and I would want to ask for your permission
> and guidance.
[snip]
Changing this is, yes, a gschem change as well as a file format
change. It's a lot of work and I would prefer some variation of
Option #1. Maybe you can convince me over a few beers. :)
-Ales