[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: gEDA-user: passing parameters to a subckt




    Thank you Al. Just for the record: ngspice worked; gnucap didn't.
    Details follow.

    The directions from the subckt section of the NGSPICE User Manual
    (http://ngspice.cvs.sourceforge.net/viewvc/*checkout*/ngspice/ngspice/n
    g-spice-manuals/manual.pdf?) did their job exactly as described.

    The directions from the GNUCAP's page:
    http://www.gnucap.org/dokuwiki/doku.php?id=gnucap:manual:compatibility:
    subcircuit_with_parameters

    didn't work for me. Here's the error message followed by the test code
    ran on gnucap-0.35

    -----------------------------------------------

    gnucap> get X2Y_test.cir

    * X2Y capacitor the GNUCAP way
    .subckt CX2Y 11 12 13 14 (CAP=22nF ESR=0.052 ESL=0.75nH)
    ^ ? subckt default parameters not supported yet

    ------------------------------------------------

    * X2Y capacitor the GNUCAP way Â(Change accordingly for NGSPICE)
    *
    * Â Â Â Â Â Â Â Â Â Â A B G1 G2
    .subckt CX2Y 11 12 13 14 (CAP=22nF ESR=0.052 ESL=0.75nH)
    L1 2 4 {ESL}
    C1 4 3 {CAP}
    R1 3 11 {ESR}
    K1 L1 L2 0.9999
    L2 2 6 {ESL}
    C2 6 5 {CAP}
    R2 5 12 {ESR}
    R3 2 1 {ESR}
    L3 1 13 {ESL}
    R4 7 2 {ESR}
    L4 7 14 {ESL}
    .ends CX2Y
    *** MAIN ***
    V1 1 0 dc 0 ac 1
    R2 2 3 500K
    R3 3 0 50
    X1 2 3 0 0 CX2Y CAP=22nF ESR=0.052 ESL=0.75nH
    R1 2 1 50
    .end

    ---------------------------------------------------------

    D.T.
    --- On Fri, 4/23/10, al davis <ad252@xxxxxxxxxxxxxxxx> wrote:

      From: al davis <ad252@xxxxxxxxxxxxxxxx>
      Subject: Re: gEDA-user: passing parameters to a subckt
      To: "gEDA user mailing list" <geda-user@xxxxxxxxxxxxxx>
      Date: Friday, April 23, 2010, 1:26 PM

    On Friday 23 April 2010, D T wrote:
    > Hi,I have the feeling this has been a topic here already.
    >Â Nevertheless, is there a way to pass parameters to Ð subckt
    >Â for spice3f5/ngspice/gnucap in linux similar to what PSpice
    >Â and LTSpice have?
    >
    Of course there is.
    Well .. not spice 3f5 but gnucap does, and I believe ngspice
    does, in the latest version.
    _______________________________________________
    geda-user mailing list
    [1]geda-user@xxxxxxxxxxxxxx
    [2]http://www.seul.org/cgi-bin/mailman/listinfo/geda-user

References

   1. file://localhost/mc/compose?to=geda-user@xxxxxxxxxxxxxx
   2. http://www.seul.org/cgi-bin/mailman/listinfo/geda-user

_______________________________________________
geda-user mailing list
geda-user@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user