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

Re: gEDA-user: Using .global statements in GNUcap and mult transistors



On Tuesday 03 March 2009, Yamazaki R2 wrote:
> Why doesn't the .global statement work in gnucap?

There hasn't been much demand for it.  In other simulators that 
have it, it often leads to surprise results.

> Do you have 
> to add flags to compile it with that option similar to
> ngspice? If so how? 

Eventually, there are plans to have plugins that enable exact 
compatibility with various other simulators, but that is not 
done yet.


> Another question is when you probe 
> current of transitors with multiple legs, it splits up the
> current instead of giving you the total current. Is there
> anyway to prevent this? For example, if you have a diode
> connected transistor sinking an ideal current it will probe
> the full current (using the .PR statement), but if you for
> example put m=2 for the device, it will only probe half the
> current (which is technically correct since one of those
> transistors will be only sinking half the current). I would
> like it, for example, I put m=50 to report the full current
> instead of 1/50 of the current going into it.

The Gnucap behavior is consistent with Hspice and Spectre.  At 
least that is what I have been told.  I don't have access to 
them to check it out.

The behavior is an artifact of the implementation.  In 
Gnucap, "m" works for all devices, including plugin models and 
subcircuits, even when the models as supplied do not explicitly 
implement it.  

In NGspice, "m" only works on devices that specifically 
implement it.  This means that in NGspice, if you install a new 
model that you got somewhere, and it wasn't explicitly written 
for NGspice, you need to modify it.  You need to modify it to 
fit anyway.  If you want "m" to work, you need to add it, and 
change the model code in lots of places.

This leads to an inconsistency in Gnucap, when NGspice models 
are used as plugins.  Since most of the NGspice models have 
an "m" parameter, that overrides the inherited "m" parameter.

> Also, another question while I'm at it, is it possible to get
> level 7 mosfet models to work in ngspice? I wouldn't even be
> using gnucap if there was a way to get mos7 models to work in
> ngspice.

You need to ask them.





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