help-gnucap
[Top][All Lists]

## Re: [Help-gnucap] comment in e_node.cc

 From: Fernan Bolando Subject: Re: [Help-gnucap] comment in e_node.cc Date: Sun, 13 Jul 2003 12:38:19 +0800

```

Yes, what I meant was in my models cc_direct section I need to access the
voltage across the input nodes.

I hope you can understand the code below I am still learning the model
compiler.
basically if for example

trcond1 should equal the  voltage at n2 and n3 multiplied by  some other
parameter

trcond1 = volts_limited(_n[n_n2],_n[n_n3]) * some other parameter);

what is the best way to achieve this?
basically this is for the vacuum tube model I am trying to learn
from Norman Koren paper

Ip = (Eg + Ep/u)^1.5/Kg1

where Eg is the grid voltage and Ep is the plate voltage
and Kg is the one of the model parameters

am I taking the wrong approach here?

*** start sample

//snip
cpoly_g {n1,n2 n3,n4 n5,n6} state = cpolystate;
// snip

device{
calculated parameters{
cpolystate;
trcond1 "transconductance for node n2 and n3";
trcond2 "transconductance for node n4 and n5";
}
}
//snip again

cc_direct{
bool  DEV_myMODEL::do_tr{
m->tr_eval(this);
}
}

*** end sample

,Fernan

al davis
net>                                                       To
Sent by:                  Fernan Bolando
es+fernanbolando=                                          cc
nu.org                                                Subject
Re: [Help-gnucap] comment in
e_node.cc
07/13/2003 01:09
PM

On Sun, Jul 13, 2003 at 10:55:38AM +0800, Fernan Bolando wrote:
> what does this comment mean?
>
>
/*--------------------------------------------------------------------------*/

> /* volts_limited: transient voltage, best approximation, with limiting
>  */
>
> does this mean I can't use it to probe the voltage accross my models
nodes?

Strictly, that is correct.  In practice, when converged the error is
small enough that you probably won't notice.

It should be used only in the "gather" phase of model evaluation.  It
should never be used by anything called by a "probe" (print, plot,
alarm, ...) command.

You should use the model compiler if you can.  There, in the probe
section, if you just say something like "@n_base[V] - @n_sub[V]", it
should do the right thing.

al.

_______________________________________________
Help-gnucap mailing list