Index: trunk/doc/design/04_attrib.html =================================================================== --- trunk/doc/design/04_attrib.html (revision 3940) +++ trunk/doc/design/04_attrib.html (revision 3941) @@ -28,7 +28,10 @@ root omitted. Cschem itself and most plugins will ignore such pseudo-hierarchy, and will handle slash without side effects. Nevertheless GUI implementations may present attributes as a tree and attribute conventions will use the -pseudo-hierarchy to group attributes. +pseudo-hierarchy to group attributes. If the first character of the +key is with - or +, that alters attribute merging +during compilation.. This is called attribute prefixing (the prefix +is part of the key, e.g. when string comparing the key).

4.2. Attribute values

@@ -156,6 +159,17 @@

4.5. Attribute compilation process

+

{des4:51} +First, all attributes of all concrete objects are copied into attributes +of the abstract objects they contribute to. There are three ways the copy +may happen depending on the first character of the concrete object attribute +key: +

+

4.5.1. Plugin invocation

{des4:20} @@ -186,7 +200,10 @@ There are only two ways attribute collision may happen:

Index: trunk/doc/design/04_attrib_imp.html =================================================================== --- trunk/doc/design/04_attrib_imp.html (revision 3940) +++ trunk/doc/design/04_attrib_imp.html (revision 3941) @@ -225,3 +225,18 @@ the symlink dereference, thus will end up as dip8. +

4.4.3. example on attribute key prefixes

+

{imp4:26} +In slotting, multiple (concrete) symbols have the same name and will be merged +into the same (abstract) component. Most attributes, like footprint, are +either specified only once, or if they are specified in multiple symbols +they have same value so there's no collision. + +

{imp4:27} +However, when using devmap, the user also needs to specify the slot +number, per symbol. Normally this would be slot=1, slot=2, slot=3, ... +attributes, but these would collide during merge. The solution is to +prefix keys with a minus sign, so symbol attributes are -slot=1, -slot=2, +-slot=3. Minus prefixed conrete attributes are ignored during compilation, +the resulting component does not have a slot attribute and there's no collision. +