X-Authentication-Warning: delorie.com: mail set sender to geda-user-bounces using -f X-Recipient: geda-user AT delorie DOT com X-TCPREMOTEIP: 207.224.51.38 X-Authenticated-UID: jpd AT noqsi DOT com From: John Doty Content-Type: multipart/alternative; boundary="Apple-Mail=_D674C390-366B-4287-9B53-1032EF15D158" Message-Id: Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Subject: Re: [geda-user] Unable to find definition of model... Date: Tue, 23 Dec 2014 08:43:51 -0700 References: <7CEB5321-E3F6-45F3-B37B-A81FFD214FA6 AT imb-cnm DOT csic DOT es> <1112363134 DOT 147765 DOT 1419343436582 DOT JavaMail DOT yahoo AT jws10721 DOT mail DOT gq1 DOT yahoo DOT com> To: geda-user AT delorie DOT com In-Reply-To: <1112363134.147765.1419343436582.JavaMail.yahoo@jws10721.mail.gq1.yahoo.com> X-Mailer: Apple Mail (2.1878.6) Reply-To: geda-user AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: geda-user AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk --Apple-Mail=_D674C390-366B-4287-9B53-1032EF15D158 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 The heuristics that spice-sdb uses to determine prefixes are = complicated, and sometimes unpredictable. In the past, I=E2=80=99ve seen = it decide that my D flip-flops needed the prefix =E2=80=9CD=E2=80=9D, = but SPICE had a hard time interpreting a flip-flop model as a diode ;-). = I avoid this with the =E2=80=94nomunge flag (gnetlist -g spice-sdb = =E2=80=94nomunge =E2=80=A6). The add-on netlist back end at https://github.com/noqsi/gnet-spice-noqsi = gives you much more control of prefixes and connections, but it=E2=80=99s = not so well documented. On Dec 23, 2014, at 7:03 AM, Johnny Cage wrote: > I tried that as well. Does not work. Perhaps my transistor model is = bad. I will try to follow the example shown on geda:ngspice: > geda:ngspice_and_gschem [gEDA Project Wiki] > and see whether it compiles. > =20 > =20 >=20 > =20 > =20 > =20 > =20 > =20 > geda:ngspice_and_gschem [gEDA Project Wiki] > Table of Contents Overview Setup Adding some SPICE stuff Simulation = Translations of this page are also available in the following languages: = =D0=A0=D1=83=D1=81=D1=81=D0=BA=D0=B8=D0=B9. Overview > View on wiki.geda-project.org > Preview by Yahoo > =20 >=20 >=20 > On Tuesday, December 23, 2014 2:19 PM, Francesc Vila = wrote: >=20 >=20 > Hello, >=20 > If you look at the generated netlist, the device still starts using = the letter =E2=80=98M=E2=80=99 not the X. So ngspice looks for a MOS = transistor instead of the subcircuit. >=20 > AFAIK, to really fix the problem you should check the value of the = attribute =E2=80=9Cdevice" on the symbol. It should be SUBCKT_PMOS or = SUBCKT_NMOS instead of PMOS_TRANSISTOR or NMOS_TRANSISTOR. Then, the = spice-sdb backend should generate the correct device line. >=20 > Best regards, > Francesc >=20 >=20 > On 23 Dec 2014, at 13:39, Johnny Cage wrote: >=20 >> Well, I changed it to the following: >>=20 >> * gnetlist -g spice-sdb -o spice.net TIC_based_CF739.sch >> ********************************************************* >> * Spice file generated by gnetlist * >> * spice-sdb version 4.28.2007 by SDB -- * >> * provides advanced spice netlisting capability. * >> * Documentation at http://www.brorson.com/gEDA/SPICE/ * >> ********************************************************* >> *vvvvvvvv Included SPICE model from = /home/af3/Dropbox/Wrachtrup/simulations/spice/NE3210S01.mod vvvvvvvv >> .subckt NE3210S01_v1 Gate Drain Source Ugw=3D160um Ngf=3D1 >> .param CGD=3D1.4e-15 >> .param CGS=3D60e-15 >> .param CSD=3D80e-15 >> .param LG=3D0.82e-9 >> .param LD=3D0.74e-9 >> .param LS=3D0.11e-9 >> L1 Drain D 'LD' >> L2 Gate G 'LG' >> L3 Source S 'LS' >> C1 Gate Drain 'CGD' >> C2 Gate Source 'CGS' >> C3 Drain Source 'CSD' >> J1 D G S NE3210S01 Ugw=3D160 N=3D1 M=3D1 >> .model NE3210S01 njf level=3D15=20 >> + VTO=3D-0.95 GAMMA=3D0.055 VGO=3D-0.323 VCH=3D1.03 GMMAX=3D0.08 = VDSO=3D2 VSAT=3D0.44 KAPA=3D0.009 PEFF=3D101 >> + VTSO=3D-10 VCO=3D-0.245 MU=3D0.001 VBA=3D1 VBC=3D0.5 DELTGM=3D0.17 = ALPHA=3D0.1 >> + RDB=3D1.0e9 CBS=3D160e-15 GDBM=3D60e-6 KDB=3D100 VDSM=3D100 = GMMAXAC=3D0.082 VTOAC=3D-0.92 >> + GAMMAAC=3D0.06 KAPAAC=3D0.002 PEFFAC=3D294 VTSOAC=3D-10 = DELTGMAC=3D0.17 >> + IS=3D26e-12 N=3D1.5 KBK=3D0 IDSOC=3D0.1 VBR=3D15 NBR=3D2 >> + RS=3D0.8 RG=3D2.0 RD=3D1.0 Ugw=3D160 Ngf=3D1 >> + C11O=3D188e-15 C11TH=3D129e-15 VINFL=3D-0.706 DELTGS=3D0.527 = DELTDS=3D0.287 LAMBDA=3D0.03=20 >> + C12SAT=3D19e-15 CGDSAT=3D20e-15 RIS=3D4.8 RID=3D0.001 TAU=3D2.1e-12 = CDSO=3D124e-15 >> .ends NE3210S01_v1 >>=20 >>=20 >>=20 >> *^^^^^^^^ End of included SPICE model from = /home/af3/Dropbox/Wrachtrup/simulations/spice/NE3210S01.mod ^^^^^^^^ >> * >> *=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Begin SPICE netlist of = main design =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >> .options TEMP=3D25 >> .INCLUDE /home/af3/Dropbox/Wrachtrup/simulations/spice/simulation.cmd >> VDS1 1 0 DC 2V >> Vac1 Vin 0 DC 0 AC 10MV SIN(0 1MV 32KHZ) >> C1 0 1 47nF =20 >> R2 0 Vin 10MEG =20 >> R1 0 Vout 1.5K =20 >> MX1 1 Vin Vout Vout NE3210S01 >> .end >> Still does not work and with the same error message. Any ideas? >>=20 >>=20 >>=20 >> On Tuesday, December 23, 2014 1:24 PM, myken wrote: >>=20 >>=20 >> Hello John, >>=20 >> To my knowledge, if you use a SUBCKT the component in question should = have a X? as a refdes. >>=20 >> Don't know what will happen if the name of the SUBCKT is the same as = a MODEL name inside the SUBCKT, never tried it. >>=20 >> Merry Christmas, >> Robert Zeegers. >>=20 >>=20 >> On 23/12/14 12:56, Johnny Cage wrote: >>> I am trying to ngspice the following code: >>>=20 >>> * gnetlist -g spice-sdb -o spice.net TIC_based_CF739.sch >>> ********************************************************* >>> * Spice file generated by gnetlist * >>> * spice-sdb version 4.28.2007 by SDB -- * >>> * provides advanced spice netlisting capability. * >>> * Documentation at http://www.brorson.com/gEDA/SPICE/ * >>> ********************************************************* >>> *vvvvvvvv Included SPICE model from = /home/af3/Dropbox/Wrachtrup/simulations/spice/NE3210S01.mod vvvvvvvv >>> .SUBCKT NE3210S01 Gate Drain Source Ugw=3D160um Ngf=3D1 >>> .param CGD=3D1.4e-15 >>> .param CGS=3D60e-15 >>> .param CSD=3D80e-15 >>> .param LG=3D0.82e-9 >>> .param LD=3D0.74e-9 >>> .param LS=3D0.11e-9 >>> L1 Drain D 'LD' >>> L2 Gate G 'LG' >>> L3 Source S 'LS' >>> C1 Gate Drain 'CGD' >>> C2 Gate Source 'CGS' >>> C3 Drain Source 'CSD' >>> J1 D G S NE3210S01 Ugw=3D160 N=3D1 M=3D1 >>> .MODEL NE3210S01 njf level=3D15=20 >>> + VTO=3D-0.95 GAMMA=3D0.055 VGO=3D-0.323 VCH=3D1.03 GMMAX=3D0.08 = VDSO=3D2 VSAT=3D0.44 KAPA=3D0.009 PEFF=3D101 >>> + VTSO=3D-10 VCO=3D-0.245 MU=3D0.001 VBA=3D1 VBC=3D0.5 DELTGM=3D0.17 = ALPHA=3D0.1 >>> + RDB=3D1.0e9 CBS=3D160e-15 GDBM=3D60e-6 KDB=3D100 VDSM=3D100 = GMMAXAC=3D0.082 VTOAC=3D-0.92 >>> + GAMMAAC=3D0.06 KAPAAC=3D0.002 PEFFAC=3D294 VTSOAC=3D-10 = DELTGMAC=3D0.17 >>> + IS=3D26e-12 N=3D1.5 KBK=3D0 IDSOC=3D0.1 VBR=3D15 NBR=3D2 >>> + RS=3D0.8 RG=3D2.0 RD=3D1.0 Ugw=3D160 Ngf=3D1 >>> + C11O=3D188e-15 C11TH=3D129e-15 VINFL=3D-0.706 DELTGS=3D0.527 = DELTDS=3D0.287 LAMBDA=3D0.03=20 >>> + C12SAT=3D19e-15 CGDSAT=3D20e-15 RIS=3D4.8 RID=3D0.001 TAU=3D2.1e-12 = CDSO=3D124e-15 >>> .ENDS NE3210S01 >>>=20 >>>=20 >>>=20 >>> *^^^^^^^^ End of included SPICE model from = /home/af3/Dropbox/Wrachtrup/simulations/spice/NE3210S01.mod ^^^^^^^^ >>> * >>> *=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Begin SPICE netlist of = main design =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >>> .options TEMP=3D25 >>> .INCLUDE = /home/af3/Dropbox/Wrachtrup/simulations/spice/simulation.cmd >>> VDS1 1 0 DC 2V >>> Vac1 Vin 0 DC 0 AC 10MV SIN(0 1MV 32KHZ) >>> C1 0 1 47nF=20 >>> R2 0 Vin 10MEG=20 >>> R1 0 Vout 1.5K=20 >>> MQ1 1 Vin Vout Vout NE3210S01=20 >>> .end >>> However, on the results.txt file I get the following message: >>>=20 >>> Circuit: * gnetlist -g spice-sdb -o spice.net tic_based_cf739.sch >>>=20 >>> Error on line 46 : mq1 1 vin vout vout ne3210s01 >>> Unable to find definition of model ne3210s01 - default assumed=20 >>>=20 >>> Does anyone know what the problem is? >>>=20 >>> Merry Christmas, >>> John Hellbourne >>=20 >>=20 >>=20 >=20 >=20 >=20 John Doty Noqsi Aerospace, Ltd. http://www.noqsi.com/ jpd AT noqsi DOT com --Apple-Mail=_D674C390-366B-4287-9B53-1032EF15D158 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8 The = heuristics that spice-sdb uses to determine prefixes are complicated, = and sometimes unpredictable. In the past, I=E2=80=99ve seen it decide = that my D flip-flops needed the prefix =E2=80=9CD=E2=80=9D, but SPICE = had a hard time interpreting a flip-flop model as a diode ;-). I avoid = this with the =E2=80=94nomunge flag (gnetlist -g spice-sdb =E2=80=94nomung= e =E2=80=A6).

The add-on netlist back end at https://github.com/noqs= i/gnet-spice-noqsi gives you much more control of prefixes and = connections, but it=E2=80=99s not so well = documented.

On Dec 23, 2014, at 7:03 AM, Johnny = Cage <hellbourne AT yahoo DOT com> = wrote:

I tried that as = well. Does not work. Perhaps my transistor model is bad. I will try to = follow the example shown on geda:ngspice:
and see = whether it compiles.


On Tuesday, December 23, = 2014 2:19 PM, Francesc Vila <francesc DOT vila AT imb-cnm DOT csic DOT e= s> wrote:


Hello,

If = you look at the generated netlist, the device still starts using the = letter =E2=80=98M=E2=80=99 not the X. So ngspice looks for a MOS = transistor instead of the subcircuit.

AFAIK, to really fix the problem you should = check the value of the attribute =E2=80=9Cdevice" on the symbol. It = should be SUBCKT_PMOS or SUBCKT_NMOS instead of PMOS_TRANSISTOR or = NMOS_TRANSISTOR. Then, the spice-sdb backend should generate the correct = device line.

Best = regards,
Francesc

On 23 Dec = 2014, at 13:39, Johnny Cage <hellbourne AT yahoo DOT com> = wrote:

Well, I changed it = to the following:

* gnetlist -g = spice-sdb -o spice.net TIC_based_CF739.sch
********************************************************** Spice file = generated by = gnetlist           =            *
* spice-sdb version = 4.28.2007 by SDB = --            =      *
* provides advanced spice netlisting = capability.        *
* Documentation at http://www.brorson.com/gEDA/SP= ICE/   *
**********************************************************vvvvvvvv  = Included SPICE model from = /home/af3/Dropbox/Wrachtrup/simulations/spice/NE3210S01.mod vvvvvvvv
.subckt NE3210S01_v1 = Gate Drain Source Ugw=3D160um Ngf=3D1
.param CGD=3D1.4e-15
.param CGS=3D60e-15
.param CSD=3D80e-15
.param LG=3D0.82e-9
.param LD=3D0.74e-9
.param LS=3D0.11e-9
L1 Drain D 'LD'
L2 Gate G 'LG'
L3 Source S 'LS'
C1 Gate Drain 'CGD'
C2 Gate Source 'CGS'
C3 Drain Source 'CSD'
J1 D G S NE3210S01 Ugw=3D160 N=3D1 M=3D1
.model NE3210S01 njf = level=3D15
+ = VTO=3D-0.95 GAMMA=3D0.055 VGO=3D-0.323 VCH=3D1.03 GMMAX=3D0.08 VDSO=3D2 = VSAT=3D0.44 KAPA=3D0.009 PEFF=3D101
+ VTSO=3D-10 VCO=3D-0.245 MU=3D0.001 VBA=3D1 VBC=3D0.5 = DELTGM=3D0.17 ALPHA=3D0.1
+ RDB=3D1.0e9 CBS=3D160e-15 GDBM=3D60e-6 KDB=3D100 = VDSM=3D100 GMMAXAC=3D0.082 VTOAC=3D-0.92
+ GAMMAAC=3D0.06 KAPAAC=3D0.002 PEFFAC=3D294 = VTSOAC=3D-10 DELTGMAC=3D0.17
+ IS=3D26e-12 N=3D1.5 KBK=3D0 IDSOC=3D0.1 VBR=3D15 = NBR=3D2
+ RS=3D0.8 = RG=3D2.0 RD=3D1.0 Ugw=3D160 Ngf=3D1
+ C11O=3D188e-15 C11TH=3D129e-15 VINFL=3D-0.706 = DELTGS=3D0.527 DELTDS=3D0.287 LAMBDA=3D0.03
+ C12SAT=3D19e-15 CGDSAT=3D20e-15 RIS=3D4.8 = RID=3D0.001 TAU=3D2.1e-12 CDSO=3D124e-15
.ends NE3210S01_v1



*^^^^^^^^  End of = included SPICE model from = /home/af3/Dropbox/Wrachtrup/simulations/spice/NE3210S01.mod ^^^^^^^^
*
*=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D  Begin SPICE netlist of main design = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
.options TEMP=3D25
.INCLUDE = /home/af3/Dropbox/Wrachtrup/simulations/spice/simulation.cmd
VDS1 1 0 DC 2V
Vac1 Vin 0 DC 0 AC = 10MV SIN(0 1MV 32KHZ)
C1 0 1 47nF 
R2 0 Vin 10MEG 
R1 0 Vout 1.5K 
MX1 1 Vin Vout Vout NE3210S01
.end
Still does = not work and with the same error message. Any ideas?



On Tuesday, December 23, 2014 1:24 PM, myken <myken AT iae DOT nl> = wrote:


Hello John,

To my knowledge, if you use a SUBCKT the component in question should have a X? as a refdes.

Don't know what will happen if the name of the SUBCKT is the same as a MODEL name inside the SUBCKT, never tried it.

Merry Christmas,
Robert Zeegers.


On 23/12/14 12:56, Johnny Cage wrote:
I am trying to ngspice the following code:

* = gnetlist -g spice-sdb -o spice.net = TIC_based_CF739.sch
*********************************************************
* Spice file generated by gnetlist *
* spice-sdb version 4.28.2007 by SDB -- *
* provides advanced spice netlisting capability. *
* Documentation at http://www.brorson.com/gEDA/SP= ICE/ *
*********************************************************
*vvvvvvvv Included SPICE model from /home/af3/Dropbox/Wrachtrup/simulations/spice/NE3210S01.mod vvvvvvvv
.SUBCKT NE3210S01 Gate Drain Source Ugw=3D160um Ngf=3D1
.param CGD=3D1.4e-15
.param CGS=3D60e-15
.param CSD=3D80e-15
.param LG=3D0.82e-9
.param LD=3D0.74e-9
.param LS=3D0.11e-9
L1 Drain D 'LD'
L2 Gate G 'LG'
L3 Source S 'LS'
C1 Gate Drain 'CGD'
C2 Gate Source 'CGS'
C3 Drain Source 'CSD'
J1 D G S NE3210S01 Ugw=3D160 N=3D1 M=3D1
.MODEL NE3210S01 njf level=3D15
+ VTO=3D-0.95 GAMMA=3D0.055 VGO=3D-0.323 VCH=3D1.03 = GMMAX=3D0.08 VDSO=3D2 VSAT=3D0.44 KAPA=3D0.009 PEFF=3D101
+ VTSO=3D-10 VCO=3D-0.245 MU=3D0.001 VBA=3D1 VBC=3D0.5 = DELTGM=3D0.17 ALPHA=3D0.1
+ RDB=3D1.0e9 CBS=3D160e-15 GDBM=3D60e-6 KDB=3D100 VDSM=3D100 GMMAXAC=3D0.082 VTOAC=3D-0.92
+ GAMMAAC=3D0.06 KAPAAC=3D0.002 PEFFAC=3D294 VTSOAC=3D-10 DELTGMAC=3D0.17
+ IS=3D26e-12 N=3D1.5 KBK=3D0 IDSOC=3D0.1 VBR=3D15 NBR=3D2
+ RS=3D0.8 RG=3D2.0 RD=3D1.0 Ugw=3D160 Ngf=3D1
+ C11O=3D188e-15 C11TH=3D129e-15 VINFL=3D-0.706 DELTGS=3D0.527= DELTDS=3D0.287 LAMBDA=3D0.03
+ C12SAT=3D19e-15 CGDSAT=3D20e-15 RIS=3D4.8 RID=3D0.001 = TAU=3D2.1e-12 CDSO=3D124e-15
.ENDS NE3210S01



*^^^^^^^^ End of included SPICE model from /home/af3/Dropbox/Wrachtrup/simulations/spice/NE3210S01.mod ^^^^^^^^
*
*=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Begin SPICE = netlist of main design =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
.options TEMP=3D25
.INCLUDE = /home/af3/Dropbox/Wrachtrup/simulations/spice/simulation.cmd
VDS1 1 0 DC 2V
Vac1 Vin 0 DC 0 AC 10MV SIN(0 1MV 32KHZ)
C1 0 1 47nF
R2 0 Vin 10MEG
R1 0 Vout 1.5K
MQ1 1 Vin Vout Vout NE3210S01
.end
However, on the results.txt file I get the following message:

Circuit: = * gnetlist -g spice-sdb -o spice.net = tic_based_cf739.sch

Error on line 46 : mq1 1 vin vout vout ne3210s01
Unable to find definition of model ne3210s01 - default assumed

Does anyone know what the problem is?

Merry Christmas,
John Hellbourne



=



=

John = Doty        =       Noqsi = Aerospace, Ltd.

http://www.noqsi.com/

jpd AT noqsi DOT com



= --Apple-Mail=_D674C390-366B-4287-9B53-1032EF15D158--