X-Authentication-Warning: delorie.com: mail set sender to geda-help-bounces using -f X-Recipient: geda-help AT delorie DOT com X-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=q5NZzuNhQBzP21qUzldTp2UoEoZdVpfY9otMnpUEa9g=; b=pnjaPLkexAFfSvmtJAOrGxK12OaInAS4jNrbXD8X9AqMW/h/Iuot0wuMhZuOdZPWj7 8nnihMaWHtWmKNCZl2dqKjmze5a/3ZqJmpZf6PXYbShqP2/mKgsbZWubQN7mtl5nB0HQ 8cacQDLvw6p258cVu6TozbMJYRQCWNDdMEGFKJ7llzwOifjb2vUHoiD8KR36voJ4lyrh gtMRAE5/s+v+G5gajQ/95KlobGA9GdcBn+tVQ0Uj6bquGegXhOd7kjckEfQlJQAm/AIt sVB87We/ABInEo4ZIAPY2FIzUPAB5lz0YfJAjsByXcUmM7WbC9FT5MPSXVeVEv3Pyx6e 1HCA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=q5NZzuNhQBzP21qUzldTp2UoEoZdVpfY9otMnpUEa9g=; b=Bb0arApjOzkt0/whQ5yivCQ8j+M9QBms49OCZ0YdxJgO5A2Gsdt/dPo1ZuqtqZiidC SdM2k+JDNzQ3vkOeT/9N7wmYE03ZGVf8AHgdtvINx36T530l2RW5HmPIhMIAWbxqZWsR /FCIhBcfAPKY9+SdJeALHY3QmucFEpgtMwqg+h4XgeNKZ798RXl1ES7s1L6kFCeyw+bQ 9aznZZZildCNQOOBBzSgpbWmpAd3qHPqci1KO8FMpoFRLjg2s3fUcjk5aqzrHG2rQue4 noZODY0HQQRejnv7rBTzByae+zOVZj7lgtOvIAEk2zGuoQ4d8V13fi2vuPkEQ+fUz/NB +Xeg== X-Gm-Message-State: AOAM532LdBZJaD19Sa+OATLBvn6pbDmfuWugGyEj7c5wa2XYz/mt1urD vxvrAuVPqqacDpPNB51qb0XkLLOR28qQHNIww4Il1Fl7rfA= X-Google-Smtp-Source: ABdhPJzZ67nBUw13MFxQCaNn7NbPnmpjYYOJQJ/ERlX4GoR494oq0DTIOqXtdsFD1V/guDWXWp/fOuqcQ9zyIwOwF8k= X-Received: by 2002:a2e:5457:: with SMTP id y23mr13263676ljd.279.1625843044412; Fri, 09 Jul 2021 08:04:04 -0700 (PDT) MIME-Version: 1.0 References: <19DBCEED-2164-4BD3-A240-6090BABF5580 AT noqsi DOT com> In-Reply-To: From: "hyral.sacai (hyral DOT sacai AT gmail DOT com) [via geda-help AT delorie DOT com]" Date: Sat, 10 Jul 2021 00:03:45 +0900 Message-ID: Subject: Re: [geda-help] Can we specify a file/netlist-library path in the gafrc file? To: geda-help AT delorie DOT com Content-Type: multipart/alternative; boundary="0000000000001f6fdf05c6b21582" Reply-To: geda-help AT delorie DOT com --0000000000001f6fdf05c6b21582 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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: > > 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-amplifier-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, 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 i= n 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-proto= type=3DX? %down BBamp" attribute in the symbol itself. The SPICE code gener= ated 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. 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...)? From the above description, it sounds like it does. On Fri, Jul 9, 2021 at 10:14 PM Roland Lutz 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 --0000000000001f6fdf05c6b21582 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

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=C2=A0geda-h= elp AT delorie DOT com] <geda-help AT delorie DOT com> wrote:

Unfortunately, I'm using a specia= l circuit simulator that does not like the gnetlist result where symbols ar= e associated with sub-schematics via the source attribute.=C2=A0

What, exactly, is the trouble?

<= div>Have you tried the spice-noqsi back end? It can handle this sort of org= anization. See=C2=A0https://github.com/noqsi/gn= et-spice-noqsi/wiki/Broadband-amplifier-board. Unfortunately, I am no l= onger 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 u= sing syntax like "X2/X0/R1" "X1/X3/R1" and the circuit = simulator does not support this, but it does support the .SUBCKT hierarchic= al 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 sp= ecify 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.=C2=A0

I took a look at the BBamp ex= ample 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 attrib=
ute. A toplevel "spice-prolog=3D.subckt BBamp %up" attribute crea=
tes the .subckt "card" using the %up function. It is mirrored by =
a "spice-prototype=3DX? %down BBamp" attribute in the symbol itse=
lf. The SPICE code generated by this pair of attributes mimics the semantic=
s of hierarchy traversal in gnetlist. The symbol also contains "file=
=3DBBamp.cir". This generates ".INCLUDE BBamp.cir" in the hi=
gher level SPICE netlist.

I couldn= 9;t get it to work right away, probably missed something, will look at it m= ore earnestly later.
But if I do use the source attribute a= pproach with the spice-noqsi backend, will it generate a netlist that uses = .SUBCKT definitions instead of the forward slash syntax (X1/X2/X3...)? From= the above description, it sounds like it does.

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

The spice-noqsi backend works fine in gEDA/gaf.=C2=A0 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.

<= /div>
Hyral=C2=A0
--0000000000001f6fdf05c6b21582--