Mail Archives: geda-user/2020/02/19/14:39:51
--Apple-Mail=_52870944-FB84-4A74-8D2B-70B02582815F
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
charset=utf-8
The thing that this proposal doesn=E2=80=99t address is that neither =
external library symbols nor embedded symbols are ideal for an evolving =
project.
External library symbols are good starting points, but need =
customization (mostly attribute additions and changes, but sometimes =
more) to be usable.
Embedded symbols are inflexible.
What works for me is to copy a library symbol, give it a name like =
=E2=80=9Cbypass_cap=E2=80=9D or =E2=80=9Clow_speed_opamp=E2=80=9D that =
reflects its role in the project, and place it in the project=E2=80=99s =
symbol directory. Then, instead of adding attributes to each instance, I =
put them in the symbol file. This makes it easy to control BOM =
complexity: if I want to change my bypass caps from 0603 to 0805, I do =
it in one place. I isolates the project from library changes without the =
inflexibility of embedded symbols. It solves the =E2=80=9Clight vs. =
heavy=E2=80=9D symbol dilemma: you don=E2=80=99t need a library =
containing a billion heavy symbols, but your project reaps the benefits =
of the heavy symbols it needs.
This approach, however, starts out clumsily with gschem as it is (lots =
of manual copying). The benefits come later. It would be nice if gschem =
supported this approach fluently.
> On Feb 19, 2020, at 10:06 AM, Roland Lutz <rlutz AT hedmen DOT org> wrote:
>=20
> Hi,
>=20
> I have some ideas about improving library handling in gEDA/gaf which =
I'd like to put up for discussion here.
>=20
>=20
>=20
> Proposal 1: Named libraries
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
>=20
> A symbol is currently referenced by its basename, e.g. =
"resistor-1.sym". When gEDA looks for a symbol, it searches all library =
directories for a file with that name, and uses the first one it finds.
>=20
> I suggest referencing symbols by two strings: the basename, and a =
library identifier. Using the basename (instead of e.g. a full path) =
allows library authors to revise the internal organization of the =
library. Using a library identifier (instead of e.g. a library path) =
allows the user to reorganize the libraries on their machine and =
facilitates sharing schematic files between users.
>=20
> When a library is added, a library identifier would be specified, =
e.g.:
>=20
> (add-library "kmk-essentials" "~/geda/kmk-essentials")
>=20
> Some library identifiers are reserved for special purposes:
>=20
> unknown
> This is the internal identifier used whenever a symbol is =
referenced
> by an old file which doesn't specify a library identifier. This =
means
> the old symbol lookup logic is to be used.
>=20
> default
> This is the identifier for the historic default library.
>=20
> local
> This identifier is reserved for project-local libraries specified =
in
> the project's configuration file. The user interface may offer
> dedicated controls to manipulate project-local libraries.
>=20
>=20
>=20
> Proposal 2: Library section
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
>=20
> Currently, symbols are referenced from the schematic file like this:
>=20
> C 5000 2000 1 0 0 resistor-1.sym
>=20
> For embedded symbols, a section containing the symbol contents =
follows:
>=20
> C 5000 2000 1 0 0 EMBEDDEDresistor-1.sym
> [
> L 5600 2200 5500 2000 3 0 0 0 -1 -1
> L 5500 2000 5400 2200 3 0 0 0 -1 -1
> ...and so on...
> ]
>=20
> This is repeated every time the embedded symbol is used.
>=20
> I propose adding special syntax to the file format which allows =
embedding a symbol once and then referencing it, e.g.:
>=20
> s resistor-1 1 default resistor-1.sym
> [
> L 600 200 500 0 3 0 0 0 -1 -1
> L 500 0 400 200 3 0 0 0 -1 -1
> ...and so on...
> ]
>=20
> =46rom there on, whenever the symbol "resistor-1" is referenced, this =
means the symbol file "resistor-1.sym" from the default library, whose =
contents are included for convenience. The distinction between basename =
and symbol identifier is made so multiple symbols with the same basename =
can be used; in that case, gEDA would assign a different identifier to =
each symbol, e.g. "resistor-1<1>".
>=20
> There are three modes of embedding a symbol:
>=20
> omit (0)
> The symbol's contents are omitted, i.e., it isn't embedded at all.
> This is useful for minimizing changes when using an SCM.
>=20
> reference (1)
> The symbol's contents are included, but the file in the library is
> authoritative. This is useful for distributing schematic files to =
other
> users, and for detecting symbol changes. The UI would display a
> warning if the library is missing or the symbol in the library =
differs
> from the one included in the schematic but require a user =
interaction
> before updating the symbol in the schematic.
>=20
> embed (2)
> The symbol embedded in the schematic is authoritative; its basename =
is
> included for reference but otherwise ignored. This is useful for
> including custom one-off symbols without having to bother with
> external files.
>=20
>=20
>=20
> Any thoughts or comments?
>=20
> Roland
>=20
>=20
John Doty Noqsi Aerospace, Ltd.
jpd AT noqsi DOT com
--Apple-Mail=_52870944-FB84-4A74-8D2B-70B02582815F
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html;
charset=utf-8
<html><head><meta http-equiv=3D"Content-Type" content=3D"text/html =
charset=3Dutf-8"></head><body style=3D"word-wrap: break-word; =
-webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" =
class=3D"">The thing that this proposal doesn=E2=80=99t address is that =
neither external library symbols nor embedded symbols are ideal for an =
evolving project.<div class=3D""><br class=3D""></div><div =
class=3D"">External library symbols are good starting points, but need =
customization (mostly attribute additions and changes, but sometimes =
more) to be usable.</div><div class=3D""><br class=3D""></div><div =
class=3D"">Embedded symbols are inflexible.</div><div class=3D""><br =
class=3D""></div><div class=3D"">What works for me is to copy a library =
symbol, give it a name like =E2=80=9Cbypass_cap=E2=80=9D or =
=E2=80=9Clow_speed_opamp=E2=80=9D that reflects its role in the project, =
and place it in the project=E2=80=99s symbol directory. Then, instead of =
adding attributes to each instance, I put them in the symbol file. This =
makes it easy to control BOM complexity: if I want to change my bypass =
caps from 0603 to 0805, I do it in one place. I isolates the project =
from library changes without the inflexibility of embedded symbols. It =
solves the =E2=80=9Clight vs. heavy=E2=80=9D symbol dilemma: you don=E2=80=
=99t need a library containing a billion heavy symbols, but your project =
reaps the benefits of the heavy symbols it needs.</div><div class=3D""><br=
class=3D""></div><div class=3D"">This approach, however, starts out =
clumsily with gschem as it is (lots of manual copying). The benefits =
come later. It would be nice if gschem supported this approach =
fluently.</div><div class=3D""><br class=3D""><div><blockquote =
type=3D"cite" class=3D""><div class=3D"">On Feb 19, 2020, at 10:06 AM, =
Roland Lutz <<a href=3D"mailto:rlutz AT hedmen DOT org" =
class=3D"">rlutz AT hedmen DOT org</a>> wrote:</div><br =
class=3D"Apple-interchange-newline"><div class=3D""><div class=3D"">Hi,<br=
class=3D""><br class=3D"">I have some ideas about improving library =
handling in gEDA/gaf which I'd like to put up for discussion here.<br =
class=3D""><br class=3D""><br class=3D""><br class=3D"">Proposal 1: =
Named libraries<br class=3D"">=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D<br class=3D""><br class=3D"">A =
symbol is currently referenced by its basename, e.g. "resistor-1.sym". =
When gEDA looks for a symbol, it searches all library directories for a =
file with that name, and uses the first one it finds.<br class=3D""><br =
class=3D"">I suggest referencing symbols by two strings: the basename, =
and a library identifier. Using the basename (instead of e.g. a =
full path) allows library authors to revise the internal organization of =
the library. Using a library identifier (instead of e.g. a library path) =
allows the user to reorganize the libraries on their machine and =
facilitates sharing schematic files between users.<br class=3D""><br =
class=3D"">When a library is added, a library identifier would be =
specified, e.g.:<br class=3D""><br class=3D""> (add-library =
"kmk-essentials" "~/geda/kmk-essentials")<br class=3D""><br =
class=3D"">Some library identifiers are reserved for special =
purposes:<br class=3D""><br class=3D""> unknown<br class=3D""> =
This is the internal identifier used whenever a symbol =
is referenced<br class=3D""> by an old file which =
doesn't specify a library identifier. This means<br class=3D""> =
the old symbol lookup logic is to be used.<br =
class=3D""><br class=3D""> default<br class=3D""> =
This is the identifier for the historic default =
library.<br class=3D""><br class=3D""> local<br class=3D""> =
This identifier is reserved for project-local =
libraries specified in<br class=3D""> the project's =
configuration file. The user interface may offer<br class=3D""> =
dedicated controls to manipulate project-local =
libraries.<br class=3D""><br class=3D""><br class=3D""><br =
class=3D"">Proposal 2: Library section<br =
class=3D"">=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D<br class=3D""><br class=3D"">Currently, symbols are =
referenced from the schematic file like this:<br class=3D""><br =
class=3D"">C 5000 2000 1 0 0 resistor-1.sym<br class=3D""><br =
class=3D"">For embedded symbols, a section containing the symbol =
contents follows:<br class=3D""><br class=3D"">C 5000 2000 1 0 0 =
EMBEDDEDresistor-1.sym<br class=3D"">[<br class=3D"">L 5600 2200 5500 =
2000 3 0 0 0 -1 -1<br class=3D"">L 5500 2000 5400 2200 3 0 0 0 -1 -1<br =
class=3D"">...and so on...<br class=3D"">]<br class=3D""><br =
class=3D"">This is repeated every time the embedded symbol is used.<br =
class=3D""><br class=3D"">I propose adding special syntax to the file =
format which allows embedding a symbol once and then referencing it, =
e.g.:<br class=3D""><br class=3D"">s resistor-1 1 default =
resistor-1.sym<br class=3D"">[<br class=3D"">L 600 200 500 0 3 0 0 0 -1 =
-1<br class=3D"">L 500 0 400 200 3 0 0 0 -1 -1<br class=3D"">...and so =
on...<br class=3D"">]<br class=3D""><br class=3D"">=46rom there on, =
whenever the symbol "resistor-1" is referenced, this means the symbol =
file "resistor-1.sym" from the default library, whose contents are =
included for convenience. The distinction between basename and =
symbol identifier is made so multiple symbols with the same basename can =
be used; in that case, gEDA would assign a different identifier to each =
symbol, e.g. "resistor-1<1>".<br class=3D""><br class=3D"">There =
are three modes of embedding a symbol:<br class=3D""><br class=3D""> =
omit (0)<br class=3D""> The symbol's contents =
are omitted, i.e., it isn't embedded at all.<br class=3D""> =
This is useful for minimizing changes when using an =
SCM.<br class=3D""><br class=3D""> reference (1)<br class=3D""> =
The symbol's contents are included, but the file in =
the library is<br class=3D""> authoritative. =
This is useful for distributing schematic files to other<br =
class=3D""> users, and for detecting symbol changes. =
The UI would display a<br class=3D""> warning if =
the library is missing or the symbol in the library differs<br class=3D"">=
from the one included in the schematic but require a =
user interaction<br class=3D""> before updating the =
symbol in the schematic.<br class=3D""><br class=3D""> embed =
(2)<br class=3D""> The symbol embedded in the =
schematic is authoritative; its basename is<br class=3D""> =
included for reference but otherwise ignored. =
This is useful for<br class=3D""> including =
custom one-off symbols without having to bother with<br class=3D""> =
external files.<br class=3D""><br class=3D""><br =
class=3D""><br class=3D"">Any thoughts or comments?<br class=3D""><br =
class=3D"">Roland<br class=3D""><br class=3D""><br =
class=3D""></div></div></blockquote></div><br class=3D""><div class=3D"">
<span class=3D"Apple-style-span" style=3D"border-collapse: separate; =
border-spacing: 0px; color: rgb(0, 0, 0); font-family: Helvetica; =
font-size: 12px; font-style: normal; font-variant-ligatures: normal; =
font-variant-caps: normal; font-variant-east-asian: normal; =
font-variant-position: normal; font-weight: normal; letter-spacing: =
normal; line-height: normal; text-indent: 0px; text-transform: none; =
orphans: 2; white-space: normal; widows: 2; word-spacing: 0px;"><div =
style=3D"word-wrap: break-word;" class=3D""><span =
class=3D"Apple-style-span" style=3D"border-collapse: separate; =
border-spacing: 0px; color: rgb(0, 0, 0); font-family: Helvetica; =
font-size: 12px; font-style: normal; font-variant-ligatures: normal; =
font-variant-caps: normal; font-variant-east-asian: normal; =
font-variant-position: normal; font-weight: normal; letter-spacing: =
normal; line-height: normal; text-indent: 0px; text-transform: none; =
orphans: 2; white-space: normal; widows: 2; word-spacing: 0px;"><p =
style=3D"margin: 0px;" class=3D""><font face=3D"Helvetica" size=3D"3" =
style=3D"font-style: normal; font-variant-caps: normal; font-weight: =
normal; font-size: 12px; line-height: normal; font-family: Helvetica;" =
class=3D"">John Doty<span class=3D"Apple-converted-space"> =
<span =
class=3D"Apple-converted-space"> </span><span =
class=3D"Apple-converted-tab"> <span =
class=3D"Apple-converted-space"> </span></span></span>Noqsi =
Aerospace, Ltd.</font></p><p style=3D"margin: 0px;" class=3D""><a =
href=3D"mailto:jpd AT noqsi DOT com" class=3D"">jpd AT noqsi DOT com</a></p><br =
class=3D"Apple-interchange-newline"></span></div></span><br =
class=3D"Apple-interchange-newline">
</div>
<br class=3D""></div></body></html>=
--Apple-Mail=_52870944-FB84-4A74-8D2B-70B02582815F--
- Raw text -