delorie.com/archives/browse.cgi   search  
Mail Archives: geda-help/2021/07/09/11:43:20

X-Authentication-Warning: delorie.com: mail set sender to geda-help-bounces using -f
X-Recipient: geda-help AT delorie DOT com
X-TCPREMOTEIP: 108.49.234.33
X-Authenticated-UID: jpd AT noqsi DOT com
From: John Doty <jpd AT noqsi DOT com>
Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.7\))
Subject: Re: [geda-help] Can we specify a file/netlist-library path in the
gafrc file?
Date: Fri, 9 Jul 2021 11:42:12 -0400
References: <CACU7o4DPmtO7=YjwFntuiNVsL_WpYXVA27xKz4gaC-vST9aYCQ AT mail DOT gmail DOT com>
<19DBCEED-2164-4BD3-A240-6090BABF5580 AT noqsi DOT com>
<alpine DOT DEB DOT 2 DOT 21 DOT 2107091506440 DOT 2326 AT nimbus>
<CACU7o4DHROoMGEnEz3rRZV4ttnbo7TNTaO2RbX=3QK8=Zya4rQ AT mail DOT gmail DOT com>
To: "hyral.sacai (hyral DOT sacai AT gmail DOT com) [via geda-help AT delorie DOT com]" <geda-help AT delorie DOT com>
In-Reply-To: <CACU7o4DHROoMGEnEz3rRZV4ttnbo7TNTaO2RbX=3QK8=Zya4rQ@mail.gmail.com>
Message-Id: <89BBFD62-6537-41A8-8315-F241F6C12FC2@noqsi.com>
X-Mailer: Apple Mail (2.3608.120.23.2.7)
Reply-To: geda-help AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: geda-help AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

--Apple-Mail=_D882BF4E-F232-46D1-B95D-3B050A12DC5F
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
	charset=utf-8



> On Jul 9, 2021, at 11:03 AM, hyral.sacai (hyral DOT sacai AT gmail DOT com) [via =
geda-help AT delorie DOT com] <geda-help AT delorie DOT com> wrote:
>=20
>=20
> On Fri, Jul 9, 2021 at 9:07 PM John Doty <jpd AT noqsi DOT com =
<mailto:jpd AT noqsi DOT com>> wrote:
>> On Jul 9, 2021, at 7:32 AM, hyral.sacai (hyral DOT sacai AT gmail DOT com =
<mailto:hyral DOT sacai AT gmail DOT com>) [via geda-help AT delorie DOT com =
<mailto:geda-help AT delorie DOT com>] <geda-help AT delorie DOT com =
<mailto:geda-help AT delorie DOT com>> wrote:
>>=20
>> Unfortunately, I'm using a special circuit simulator that does not =
like the gnetlist result where symbols are associated with =
sub-schematics via the source attribute.=20
>=20
> What, exactly, is the trouble?
>=20
> Have you tried the spice-noqsi back end? It can handle this sort of =
organization. See =
https://github.com/noqsi/gnet-spice-noqsi/wiki/Broadband-amplifier-board =
<https://github.com/noqsi/gnet-spice-noqsi/wiki/Broadband-amplifier-board>=
. Unfortunately, I am no longer maintaining it for gEDA, but it works =
fine in Lepton, I just used it yesterday.
>=20
> When using the source attribute, the gnetlist (spice-sdb) result is a =
flattened netlist using syntax like "X2/X0/R1" "X1/X3/R1" and the =
circuit simulator does not support this,

If the problem is the =E2=80=9C/=E2=80=9C, you can change that using the =
(hierarchy-uref-separator) function. See =
http://wiki.geda-project.org/geda:gnetlist_ug:config =
<http://wiki.geda-project.org/geda:gnetlist_ug:config>.

In Lepton, you may do this using the new configuration system: =
https://github.com/lepton-eda/lepton-eda/wiki/Configuration-Settings#user-=
content-2-lepton-netlist =
<https://github.com/lepton-eda/lepton-eda/wiki/Configuration-Settings#user=
-content-2-lepton-netlist>.

> but it does support the .SUBCKT hierarchical approach which I can =
achieve by using the file attribute to point to the appropriate subckt =
netlist file, it's just that it would be nice to specify a folder of =
subckt netlist files that gnetlist will search in so that users of my =
library don't have to specify the exact location of those netlists.=20
>=20
> I took a look at the BBamp example and tried to emulate the attributes =
pointed out in the following text:
> The BBamp.sch schematic is the amplifier itself. Its symbol is =
included in the drawing as a graphical comment for the reader, using a =
graphical=3D1 attribute. A toplevel "spice-prolog=3D.subckt BBamp %up" =
attribute creates the .subckt "card" using the %up function. It is =
mirrored by a "spice-prototype=3DX? %down BBamp" attribute in the symbol =
itself. The SPICE code generated by this pair of attributes mimics the =
semantics of hierarchy traversal in gnetlist. The symbol also contains =
"file=3DBBamp.cir". This generates ".INCLUDE BBamp.cir" in the higher =
level SPICE netlist.
>=20
> I couldn't get it to work right away, probably missed something, will =
look at it more earnestly later.

Did you have a configuration file suppressing hierarchy traversal?

> But if I do use the source attribute approach with the spice-noqsi =
backend, will it generate a netlist that uses .SUBCKT definitions =
instead of the forward slash syntax (X1/X2/X3...)? =46rom the above =
description, it sounds like it does.

You have to generate a separate netlist for each subcircuit. You then =
feed those to SPICE in whatever way is most convenient for you: using =
.include, or explicitly on the command line, or concatenating them into =
a subcircuit library, =E2=80=A6=20

This may be conveniently managed with a Makefile, just like software =
development with subprograms.

>=20
> On Fri, Jul 9, 2021 at 10:14 PM Roland Lutz <rlutz AT hedmen DOT org =
<mailto:rlutz AT hedmen DOT org>> wrote:
>=20
> The spice-noqsi backend works fine in gEDA/gaf.  Also, it shouldn't be=20=

> hard to adapt the Python version of the backend to your needs:
>=20
> =
https://github.com/rlutz/geda-gaf/blob/master/xorn/src/backend/gnet_spice_=
noqsi.py =
<https://github.com/rlutz/geda-gaf/blob/master/xorn/src/backend/gnet_spice=
_noqsi.py>
>=20
> Thanks, will take a look at that.
>=20
> Hyral=20

John Doty              Noqsi Aerospace, Ltd.
jpd AT noqsi DOT com




--Apple-Mail=_D882BF4E-F232-46D1-B95D-3B050A12DC5F
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; line-break: after-white-space;" class=3D""><br =
class=3D""><div><br class=3D""><blockquote type=3D"cite" class=3D""><div =
class=3D"">On Jul 9, 2021, at 11:03 AM, hyral.sacai (<a =
href=3D"mailto:hyral DOT sacai AT gmail DOT com" =
class=3D"">hyral DOT sacai AT gmail DOT com</a>) [via <a =
href=3D"mailto:geda-help AT delorie DOT com" =
class=3D"">geda-help AT delorie DOT com</a>] &lt;<a =
href=3D"mailto:geda-help AT delorie DOT com" =
class=3D"">geda-help AT delorie DOT com</a>&gt; wrote:</div><br =
class=3D"Apple-interchange-newline"><div class=3D""><div dir=3D"ltr" =
class=3D""><div dir=3D"ltr" class=3D""></div><div class=3D""><br =
class=3D""></div><div class=3D""><div dir=3D"ltr" class=3D"gmail_attr">On =
Fri, Jul 9, 2021 at 9:07 PM John Doty &lt;<a href=3D"mailto:jpd AT noqsi DOT com"=
 target=3D"_blank" class=3D"">jpd AT noqsi DOT com</a>&gt; wrote:<br =
class=3D""></div><blockquote class=3D"gmail_quote" style=3D"margin:0px =
0px 0px 0.8ex;border-left:1px solid =
rgb(204,204,204);padding-left:1ex"><div class=3D""><div =
class=3D""><blockquote type=3D"cite" class=3D""><div class=3D"">On Jul =
9, 2021, at 7:32 AM, hyral.sacai (<a href=3D"mailto:hyral DOT sacai AT gmail DOT com"=
 target=3D"_blank" class=3D"">hyral DOT sacai AT gmail DOT com</a>) [via&nbsp;<a =
href=3D"mailto:geda-help AT delorie DOT com" target=3D"_blank" =
class=3D"">geda-help AT delorie DOT com</a>] &lt;<a =
href=3D"mailto:geda-help AT delorie DOT com" target=3D"_blank" =
class=3D"">geda-help AT delorie DOT com</a>&gt; wrote:</div><br class=3D""><div =
class=3D""><span style=3D"font-family:Helvetica;font-size:12px" =
class=3D"">Unfortunately, I'm using a special circuit simulator that =
does not like the gnetlist result where symbols are associated with =
sub-schematics via the source =
attribute.&nbsp;</span></div></blockquote><div class=3D""><br =
class=3D""></div>What, exactly, is the trouble?<br class=3D""><br =
class=3D""></div><div class=3D"">Have you tried the spice-noqsi back =
end? It can handle this sort of organization. See&nbsp;<a =
href=3D"https://github.com/noqsi/gnet-spice-noqsi/wiki/Broadband-amplifier=
-board" target=3D"_blank" =
class=3D"">https://github.com/noqsi/gnet-spice-noqsi/wiki/Broadband-amplif=
ier-board</a>. Unfortunately, I am no longer maintaining it for gEDA, =
but it works fine in Lepton, I just used it =
yesterday.</div></div></blockquote><div class=3D""><br =
class=3D""></div></div><div class=3D"">When using the source attribute, =
the gnetlist (spice-sdb) result is a flattened netlist using syntax like =
"X2/X0/R1" "X1/X3/R1" and the circuit simulator does not support =
this,</div></div></div></blockquote><div><br class=3D""></div><div =
style=3D"orphans: 2; widows: 2;">If the problem is the =E2=80=9C/=E2=80=9C=
, you can change that using the (<span style=3D"color: rgb(51, 51, 51); =
font-family: Consolas, &quot;Andale Mono WT&quot;, &quot;Andale =
Mono&quot;, &quot;Bitstream Vera Sans Mono&quot;, &quot;Nimbus Mono =
L&quot;, Monaco, &quot;Courier New&quot;, monospace; font-size: 14px; =
orphans: 2; widows: 2; background-color: rgb(251, 250, 249);" =
class=3D"">hierarchy-uref-separator)</span><span style=3D"orphans: 2; =
widows: 2; background-color: rgb(251, 250, 249);" =
class=3D"">&nbsp;function. See&nbsp;</span><a =
href=3D"http://wiki.geda-project.org/geda:gnetlist_ug:config" =
class=3D"">http://wiki.geda-project.org/geda:gnetlist_ug:config</a>.</div>=
<div style=3D"orphans: 2; widows: 2;"><br class=3D""></div><div =
style=3D"orphans: 2; widows: 2;">In Lepton, you may do this using the =
new configuration system:&nbsp;<a =
href=3D"https://github.com/lepton-eda/lepton-eda/wiki/Configuration-Settin=
gs#user-content-2-lepton-netlist" =
class=3D"">https://github.com/lepton-eda/lepton-eda/wiki/Configuration-Set=
tings#user-content-2-lepton-netlist</a>.</div><br class=3D""><blockquote =
type=3D"cite" class=3D""><div class=3D""><div dir=3D"ltr" class=3D""><div =
class=3D""> but it does support the .SUBCKT hierarchical approach which =
I can achieve by using the file attribute to point to the appropriate =
subckt netlist file, it's just that it would be nice to specify a folder =
of subckt netlist files that gnetlist will search in so that users of my =
library don't have to specify the exact location of those =
netlists.&nbsp;</div><div class=3D""><br class=3D""></div><div =
class=3D""><div class=3D"">I took a look at the BBamp example and tried =
to emulate the attributes pointed out in the following =
text:</div><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px =
0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><pre =
style=3D"box-sizing:border-box;font-family:ui-monospace,SFMono-Regular,&qu=
ot;SF Mono&quot;,Consolas,&quot;Liberation =
Mono&quot;,Menlo,monospace;font-size:12px;margin-bottom:0px;margin-top:0px=
;color:rgb(36,41,47);white-space:pre-wrap" class=3D"">The BBamp.sch =
schematic is the amplifier itself. Its symbol is included in the drawing =
as a graphical comment for the reader, using a graphical=3D1 attribute. =
A toplevel "spice-prolog=3D.subckt BBamp %up" attribute creates the =
.subckt "card" using the %up function. It is mirrored by a =
"spice-prototype=3DX? %down BBamp" attribute in the symbol itself. The =
SPICE code generated by this pair of attributes mimics the semantics of =
hierarchy traversal in gnetlist. The symbol also contains =
"file=3DBBamp.cir". This generates ".INCLUDE BBamp.cir" in the higher =
level SPICE netlist.</pre></blockquote><div class=3D""><br =
class=3D""></div><div class=3D"">I couldn't get it to work right away, =
probably missed something, will look at it more earnestly =
later.</div></div></div></div></blockquote><div><br class=3D""></div>Did =
you have a configuration file suppressing hierarchy =
traversal?</div><div><br class=3D""><blockquote type=3D"cite" =
class=3D""><div class=3D""><div dir=3D"ltr" class=3D""><div class=3D"">But=
 if I do use the source attribute approach with the spice-noqsi backend, =
will it generate a netlist that uses .SUBCKT definitions instead of the =
forward slash syntax (X1/X2/X3...)? =46rom the above description, it =
sounds like it does.</div></div></div></blockquote><div><br =
class=3D""></div>You have to generate a separate netlist for each =
subcircuit. You then feed those to SPICE in whatever way is most =
convenient for you: using .include, or explicitly on the command line, =
or concatenating them into a subcircuit library, =E2=80=A6&nbsp;</div><div=
><br class=3D""></div><div>This may be conveniently managed with a =
Makefile, just like software development with subprograms.</div><div><br =
class=3D""><blockquote type=3D"cite" class=3D""><div class=3D""><div =
dir=3D"ltr" class=3D""><div class=3D""><br class=3D""></div><div =
class=3D"gmail_quote"><div dir=3D"ltr" class=3D"gmail_attr">On Fri, Jul =
9, 2021 at 10:14 PM Roland Lutz &lt;<a href=3D"mailto:rlutz AT hedmen DOT org" =
target=3D"_blank" class=3D"">rlutz AT hedmen DOT org</a>&gt; wrote:<br =
class=3D""></div><blockquote class=3D"gmail_quote" style=3D"margin:0px =
0px 0px 0.8ex;border-left:1px solid =
rgb(204,204,204);padding-left:1ex"><br class=3D"">
The spice-noqsi backend works fine in gEDA/gaf.&nbsp; Also, it shouldn't =
be <br class=3D"">
hard to adapt the Python version of the backend to your needs:<br =
class=3D"">
<br class=3D"">
<a =
href=3D"https://github.com/rlutz/geda-gaf/blob/master/xorn/src/backend/gne=
t_spice_noqsi.py" rel=3D"noreferrer" target=3D"_blank" =
class=3D"">https://github.com/rlutz/geda-gaf/blob/master/xorn/src/backend/=
gnet_spice_noqsi.py</a></blockquote><div class=3D""><br =
class=3D""></div><div class=3D"">Thanks, will take a look at =
that.</div><div class=3D""><br class=3D""></div><div =
class=3D"">Hyral&nbsp;</div></div></div>
</div></blockquote></div><br class=3D""><div class=3D"">
<span class=3D"Apple-style-span" style=3D"border-collapse: separate; =
border-spacing: 0px; font-variant-ligatures: normal; =
font-variant-east-asian: normal; font-variant-position: normal; =
line-height: normal;"><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">&nbsp; &nbsp; =
&nbsp; &nbsp; &nbsp;<span =
class=3D"Apple-converted-space">&nbsp;</span><span =
class=3D"Apple-converted-tab">&nbsp; &nbsp;<span =
class=3D"Apple-converted-space">&nbsp;</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""></body></html>=

--Apple-Mail=_D882BF4E-F232-46D1-B95D-3B050A12DC5F--

- Raw text -


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