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 Content-Type: multipart/alternative; boundary="Apple-Mail=_D882BF4E-F232-46D1-B95D-3B050A12DC5F" 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: <19DBCEED-2164-4BD3-A240-6090BABF5580 AT noqsi DOT com> To: "hyral.sacai (hyral DOT sacai AT gmail DOT com) [via geda-help AT delorie DOT com]" In-Reply-To: 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 Precedence: bulk --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] wrote: >=20 >=20 > On Fri, Jul 9, 2021 at 9:07 PM John Doty > wrote: >> On Jul 9, 2021, at 7:32 AM, hyral.sacai (hyral DOT sacai AT gmail DOT com = ) [via 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 = = . 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 = . 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 = . > 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 > 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 = >=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

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:


On = Fri, Jul 9, 2021 at 9:07 PM John Doty <jpd AT noqsi DOT com> wrote:
On Jul = 9, 2021, at 7:32 AM, hyral.sacai (hyral DOT sacai AT gmail DOT com) [via geda-help AT delorie DOT com] <geda-help AT delorie DOT com> wrote:

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. 

What, exactly, is the trouble?

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-amplif= ier-board. Unfortunately, I am no longer maintaining it for gEDA, = but it works fine in Lepton, I just used it = yesterday.

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.
=

In Lepton, you may do this using the = new configuration system: https://github.com/lepton-eda/lepton-eda/wiki/Configuration-Set= tings#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. 

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.

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 

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


On Fri, Jul = 9, 2021 at 10:14 PM Roland Lutz <rlutz AT hedmen DOT org> wrote:

The spice-noqsi backend works fine in gEDA/gaf.  Also, it shouldn't = be
hard to adapt the Python version of the backend to your needs:

https://github.com/rlutz/geda-gaf/blob/master/xorn/src/backend/= gnet_spice_noqsi.py

Thanks, will take a look at = that.

Hyral 

John Doty    =           Noqsi = Aerospace, Ltd.

jpd AT noqsi DOT com




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