[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: gEDA-user: Model problem?
>
> On Thu, 21 Jul 2005 22:17:13 -0400 (EDT)
> sdb@xxxxxxxxxx (Stuart Brorson) wrote:
>
> > > Is there some elegant way to know the node numbers on beforehand (i.e.
> > > without having to open the spice file and deduce them)? Maybe
> > > assigning numbers or labels to the nodes on the schematic?
> >
> > Just double click on the net, and assign the "netname" attrib to what
> > you want to use. Then, if you are netlisting with spice-sdb, the
> > netname you assign will appear as the node name in the SPICE netlist.
>
> Thanks Stuart!
>
> Of course that works - except if the line segment is short, and the line
> handles cover the entire line. Then you can't get to it.
>
> For some reason, the libraries that came with gEDA didn't include njfet
> symbols (nor nfet, pjfet, pfet etc). (looked in several of the libraries-
> analog, etc)
One commonly needs to create symbols for gschem. Perhaps you could
upload your JFET symbol to teh gEDA project symbol upload site once
everything is working?
> I edited a symbols, assigned D, S, G to the pins (as
> pinlabel, and pinnumber), added pinseq numbers, tried to include it and
> got:
>
> Invalid wanted_pin passed to get-nets [unknown]
Run gnetlist like this:
gnetlist -v -g spice-sdb -o circuit.cir circuit.sch
The -v flag will give you debug spew to help you figure out which
component is the problem.
>
> The spice net file includes:
>
> QJ1 Vout 3 5 BF256C (see? netnaming worked...)
>
> The refdes is J?, set to J1 (as per the HOWTO), but the Q is added by
> gnetlist. I suppose that's ok? Anyway, tried to run the circuit resulted
> in:
I don't know why that happened. Make sure that you set the hidden,
symbol-level attribute "DEVICE" to exactly the name of the JFETs
specified in the spice-sdb documentation. I believe the DEVICE name
you need is NFET_TRANSISTOR.
>
> Warning -- Level not specified on line "(beta=1.4m betatce=-.5 rd=1 rs=1
> lambda=4.6m vto=-3.1 vtotc=-2.5m is=33.57f isr=322.4f n=1 nr=2
> xti=3 alpha=311.7u vk=243.6 cgd=2.132p m=.3622 pb=1 fc=.5
> cgs=2.104p kf=23.06e-18 af=1)" Using level 1.
This is OK; it just says you are using the simplest JFET model by
default.
>
> Error on line 19 :
> .model bf256c njf(beta=1.4m betatce=-.5 rd=1
> rs=1 lambda=4.6m vto=-3.1 vtotc=-2.5m is=33.57f
> isr=322.4f n=1 nr=2 xti=3 alpha=311.7u vk=243.6 cgd=2.132p
> m=.3622 pb=1 fc=.5 cgs=2.104p kf=23.06e-18 af=1)
>
> unrecognized parameter (betatce) - ignored
> unrecognized parameter (-.5) - ignored
> unrecognized parameter (vtotc) - ignored
> unrecognized parameter (-2.5m) - ignored
> unrecognized parameter (vtotc) - ignored
> unrecognized parameter (-2.5m) - ignored
> unrecognized parameter (isr) - ignored
>
> etc...
>
> The model doesn't seem to work at all. All nodes show 0V ('xcept for the
> power supply)
It is possible that you need to use a higher-level model to use these
parameters. Try this (for example):
.model bf256c njf(level=3 beta=1.4m betatce=-.5 rd=1
Google around a little to see which level model for the njf is
required to get the above parameters.
Just a guess . . . .
>
> The only reference I foudn to the 'Level not specified on line' is about
> a problem with ngspice. Is the -rework-15 version not correct and should
> I download CVS?
>
rework-15 should work for what you want to do.
> Sorry for all the q's...
>
> John
>
> ---------
> This is the net (there are ^M's at the end of the lines in the included
> model, which are not in the model file - I suppose these are generated
> by some DOS-minded program?):
>
> * gnetlist -g spice-sdb pre_fet.sch
> *********************************************************
> * Spice file generated by gnetlist *
> * spice-sdb version 10.9.2004 by SDB -- *
> * provides advanced spice netlisting capability. *
> * Documentation at http://www.brorson.com/gEDA/SPICE/ *
> *********************************************************
> V2 1 0 DC 5V
> R4 0 5 330
> V1 4 0 dc 0 ac .01
> R3 3 2 50
> R2 0 3 330
> .ac dec 100 1e6 1e8
> R1 Vout 1 1k
> C1 0 5 100n
> QJ1 Vout 3 5 BF256C
> *vvvvvvvv Included SPICE model from /opt/gnome/share/gEDA/models/
> BF256C.mod vv .model BF256C NJF(Beta=1.4m Betatce=-.5 Rd=1 Rs=1
> Lambda=4.6m Vto=-3.1^M
> + Vtotc=-2.5m Is=33.57f Isr=322.4f N=1 Nr=2 Xti=3
> Alpha=311.7u^M
> + Vk=243.6 Cgd=2.132p M=.3622 Pb=1 Fc=.5 Cgs=2.104p
> Kf=23.06E-18^M
> + Af=1)^M
>
The included model is messed up. The last lines should read:
.model BF256C NJF(Beta=1.4m Betatce=-.5 Rd=1 Rs=1 . . . .
Or is this just a line-wrap problem? If the netlist is messed up,
then you need to go into your BF256c.mod file and fix it so the first
line is a comment. ALso, if you run dos2unix on your .mod file, the
^M cruft will go away.
Stuart