delorie.com/archives/browse.cgi   search  
Mail Archives: geda-user/2015/07/18/18:11:46

X-Authentication-Warning: delorie.com: mail set sender to geda-user-bounces using -f
X-Recipient: geda-user AT delorie DOT com
Date: Sun, 19 Jul 2015 00:09:52 +0200 (CEST)
From: Roland Lutz <rlutz AT hedmen DOT org>
To: "Girvin R. Herr (gherr375 AT sbcglobal DOT net) [via geda-user AT delorie DOT com]" <geda-user AT delorie DOT com>
Subject: Re: [geda-user] Difference between attached and detached
attributes
In-Reply-To: <55A813B5.4040609@sbcglobal.net>
Message-ID: <alpine.DEB.2.11.1507190000470.2893@nimbus>
References: <55A813B5 DOT 4040609 AT sbcglobal DOT net>
User-Agent: Alpine 2.11 (DEB 23 2013-08-11)
MIME-Version: 1.0
Reply-To: geda-user AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: geda-user AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

On Thu, 16 Jul 2015, Girvin R. Herr (gherr375 AT sbcglobal DOT net) [via geda-user AT delorie DOT com] wrote:
> I have been doing some symbol work in gschem and I got confused again 
> about attached attributes vs detached attributes.  The manuals do not go 
> into detail about usage.  Hint, hint.  Can someone tell me what is the 
> difference between them and where I should apply one vs the other?

An attribute is a specially formatted text object which can be attached to 
a component, net, bus, or pin, or not be attached at all.

An attribute which is not attached to an object is called a "floating" or
"toplevel" attribute.  Floating attributes are used for two purposes: in a
symbol, they contain default attribute values.  In a schematic, they
contain information global to that schematic page; for example, the VHDL
backend searches for a toplevel "module-name" attribute in the schematic,
and John Doty's spice-noqsi backend searches for "spice-prolog" and
"spice-epilog".

An attribute which is attached to a component overrides the value from the
symbol's floating attribute.  (There are some exceptions to this like the
"graphical=1" attribute which can't be properly unset by attaching an
attribute to the component.)  You can delete an inherited attribute by
attaching an attribute with the value "unknown" to the component.

You can't attach an attribute to a specific pin of a component's symbol, 
so you can't override pin attributes when you instantiate a symbol in a 
schematic.  There is a special slotting mechanism, though, which allows 
you to select one of a set of pre-defined pin numbering schemes.

It is important to understand that the attributes inherited from the
symbol (both floating and attached to a pin) live in the symbol file,
whereas the attributes attached to the component live in the instantiating
schematic file.  You don't have a way to change the symbol from the
instantiating schematic; the way to change inherited attributes is to
attach an attribute with the same name and another value to the component.
(You could obviously change the symbol by embedding it and hacking the
schematic file, but AFAIK, there is no way to do this in gschem.)

When creating a component, some floating attributes from the symbol are
usually copied to the schematic and automatically attached to the symbol,
hiding the inherited attributes.  This is called "attribute promotion".
The default set of promoted attributes is: footprint, device, value,
model-name, and symversion.

The menu items "Attributes/Attach" and "Attributes/Detach" are used to 
attach floating attributes to components, nets, buses, and pins, and to 
convert attached attributes back to floating attributes.  You don't need 
these for normal gschem usage.  (If you still want to try them, take extra 
care not to accidentally lose invisible attributes.  You can type "e n" to 
make invisible text temporarily visible.)

Roland

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019