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

Re: gEDA-user: multiple attributes (was: [Patches] GTK Recent-file-manager)



On Wednesday 05 January 2011 00:42:07 John Doty wrote:
> On Jan 4, 2011, at 5:22 PM, Matthew Wilkins wrote:
> > What are typical use cases for having multiple same-named attributes in a
> > symbol?
> 
> A slotted symbol generally needs multiple slotdef attributes.
> 
> A hierarchical symbol will have multiple source attributes if its
> underlying schematic has multiple pages.
> 
> And nobody knows what other use cases there are, or may be in the future.
> You should make as few assumptions about how people will use attributes as
> practical.

One of the problems we have at the moment is that sometimes attributes in the 
schematic override attributes in the symbol, and sometimes they don't.

Example 1.  Suppose I have a "refdes=A?" attribute in a symbol. I instantiate 
the symbol in a schematic, and attach a "refdes=A1" attribute to the 
instantiated symbol.  gnetlist (etc) will use "refdes=A1".  This is overriding 
behaviour.

Example 2.  Suppose I have a "net=Vcc:1" attribute in a symbol. I instantiate 
the symbol in a schematic, and attach a "net=Vdd:1" attribute to the 
instantiated symbol.  gnetlist will short Vcc to Vdd and connect pin 1 to the 
shorted net.  This is aggregation behaviour.

The problem with this is inconsistency.  IMHO it would be better to have 
overriding behaviour *only*, because in the longer term being able to reliably 
override attributes would particularly be helpful in doing things like 
hierarchical back-annotation and parameterised subcircuits (the latter would 
be awesome for ASIC design applications, for instance).  As far as I can tell, 
everything that can be achieved with aggregation behaviour can be achieved 
with overriding behaviour, but not the other way around.

Regards,

                            Peter

-- 
Peter Brett <peter@xxxxxxxxxxxxx>
Remote Sensing Research Group
Surrey Space Centre

Attachment: signature.asc
Description: This is a digitally signed message part.


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