[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

gEDA-user: "Inherited" attributes view in gschem



Hi guys,

I've just dropped in some code changes which give the multi-attrib
editor in gschem the ability to view attributes from inside symbols.

Screenshot here:
http://www2.eng.cam.ac.uk/~pcjc2/geda/screenshots/inherited_attributes_view.png

Numerous people have spotted that we lacked such a view, and I think its
presence goes some way to demystify what goes on to hook up power pins
etc..

I've added a toggle button to turn the view off, in case it clutters the
list too much. "Inherited" attributes are always below attached
attributes in the list, and are drawn in a desensitised style. As shown
in the screen-shot, the popup context menu gives you the option to
"promote" a given attribute.


For now, _all_ attributes inside the symbol are shown, including those
which are overridden by attached attributes. I have some patches which
form an aggregate list - where certain inherited attributes are
discarded from the list if they are overridden, however the correct
behaviour isn't entirely obvious.

Since gEDA allows (and uses) multiple attributes with the same name
(net=, source=, slotdef= are some examples which spring to mind), it
isn't obvious what the rules for overriding or combining these
attributes should be.

The code which handles these attributes each has a specific search order
and rules for how they are processed, so it seems that we can't produce
a simple "effective attributes list" for the component instance - as has
been suggested in the past.

It is tempting to try and figure out a rule-set though. As in the
screenshot, it is nice not to see the "refdes=U?", "slot=1" etc..
attributes from inside the symbol when you already have a promoted
version.

My present rule-set (which is still broken for net= attributes), is to
skip over any inherited / in-symbol attributes where there is exactly
one attribute with that name inside the symbol, and one with that name
attached.

(If you had multiple attributes inside the symbol, it wouldn't be clear
which overrode which - you would either have to include, or skip _all_
in-symbol attributes with that name).


Comments welcome.

Best wishes,

-- 
Peter Clifton

Electrical Engineering Division,
Engineering Department,
University of Cambridge,
9, JJ Thomson Avenue,
Cambridge
CB3 0FA

Tel: +44 (0)7729 980173 - (No signal in the lab!)



_______________________________________________
geda-user mailing list
geda-user@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user