Embedding
When a symbol is embedded, the whole symbol, including all graphics and
metadata is copied into the sheet as a new instance. This means if there
are 10 embedded instances of a resistor symbol in a sheet, the sheet
contains 10 full copies of the symbol.
Examples:
- subcircuits (placed footprints) in pcb-rnd (at least up to 3.0.x)
- embedded symbols in gschem (not the default behavior)
- sch-rnd when loclib paste is disabled
Pros:
- easy to make absolutely any change to an instance
- saves some disk space and memory in case only single instance of many different symbols are placed
- schematics sheets are self-contained, portable, they never break due to missing symbols
- easy to implement, avoids a lot of code complexity
Cons:
- harder to keep standards (same looking symbols for the same purpose)
- cost disk space and memory in case many instances of the same symbol placed
- if symbol is upgrade in the (external) library, sheets still have old copies
External referencing
When a symbol is externally referenced, only the name of the symbol and a set
of "differences" are saved in the sheet. These differences are typically
new attribute values.
Examples:
- symbols in gschem (default behavior)
Pros:
- if a symbol is fixed/updated centrally in the (external) library, all sheets are automatically using the new version of the symbol
- with a centralized library, easy to standardize symbols of local projects
- saves more disk space and memory
- easy to implement, avoids a lot of code complexity
Cons:
- schematics sheets are not self-contained, portable: they break unless shipped with all symbols they reference, project configured in a way those symbols are found
- updating, fixing, changing any symbol in any library has a high risk of breaking existing schematics without any chance of warning
- unless there's some advanced library addressing mechanism (which gEDA doesn't have), simply using symbol name may pick the wrong symbol depending on library paths configuration, because symbol names are not globally unique
- in gschem it's especially easy to break the system by opening sheets from two different project in one gschem instance
Local lib
When a symbol is first placed on the sheet, a read-only master copy of the
symbol is embedded in the sheet in a special area called the local lib
or loclib for short. On the visible sheet only a reference is placed
to this loclib instance.
This method combines the most important benefits of embedding and symbol
referencing without the risks of external referencing.
Examples:
- various proprietary EDA tools
- sch-rnd when loclib paste is enabled
Pros:
- saves some disk space and memory because only one full copy is included in the sheet
- schematics sheets are self-contained, portable, they never break due to missing symbols
- if a symbol is fixed/updated centrally in the (external) library, local libs of sheets can be updated semi-automatically; this way an external lib change doesn't automatically affect (perhaps break) sheets, still it's easy and quick to update sheets when needed
- easy to standardize symbols within a sheet
Cons:
- only limited changes can be done to the reference
- tricky to implement, increased code complexity, more prone to bugs
- if a symbol is fixed/updated centrally in the (external) library, extra update step is needed in sheets
- harder to keep standards across sheets (e.g. within a multisheet project) as each sheet will have it's own master copy of the same symbol
Who implements what
sch-rnd symbols | sch-rnd devmap | pcb-rnd subcircuits | gEDA symbols
|
---|
embed | no1 | yes | yes
|
external ref | no1 | no2 | yes
|
loclib | yes | no3 | no
|
Notes: