[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gnucap-devel] Commercial BSIM4 model crashes gnucap

From: al davis
Subject: Re: [Gnucap-devel] Commercial BSIM4 model crashes gnucap
Date: Tue, 13 Nov 2018 21:35:02 -0500

On Sat, 10 Nov 2018 10:27:34 +0100
Ruben Undheim <address@hidden> wrote:

> Hi,
> I've been playing around a bit with CMOS transistor models. Using some
> commercial BSIM4 models for NMOS and PMOS, I was surprisingly able to
> get it to load in ngspice without much trouble at all. It even
> simulated with reasonable results! When loading it in gnucap, I get a
> number of warnings and then gnucap crashes.
> Using the bsim465 model from gnucap-models [1], it seems like gnucap
> understands all the model parameters in the model, but it still gets
> some problems..
> I get thousands of messages like this:
>   parameter # not specified, using default
>   parameter # not specified, using default

Is # supposed to introduce a comment? 
Your file may have some tail-comments ..

.model noo nmos  fffr=3344 fgt=94 # tail comment
+ more=3e4 

Try editing the file to remove them.

Whole line comments introduced by # should work, but sometimes the
mid-line # doesn't.

There are a lot of variants of spice syntax.  Keeping track of them all
can be crazy.

Gnucap uses a single pass that sometimes misses the
# as a comment in the middle of a line.

> and some like this:
>   parameter ad not specified, using default
>   parameter ad value is "NOT_INPUT"

This could also be related to the single pass parsing.  Look for a #
somewhere that might have turned the parameter ad into a comment.

> and then thousands of these:
>   parameter # recursion too deep
>   parameter # recursion too deep

Parameter recursion is supported, but with a limit to block infinite
self-recursion.  You might try setting option recursion higher.   The
default value is 20.  But really, I think something happened in parsing
that turned something into infinite recursion.

> At last, it crashes with:
>   gnucap: /usr/include/gnucap/ virtual void
> DEV_SPICE::precalc_last(): Assertion `_maxEqNum == ckt()->CKTmaxEqNum'
> failed.

Something went wrong between the line : 
        _maxEqNum == ckt()->CKTmaxEqNum;
and the line 
        assert(_maxEqNum == ckt()->CKTmaxEqNum);

If you send a file that demonstrates the problem I can look at it.  All
that stuff is probably due to one detail in file parsing.

The optional plugins are not tested to the same high standard used for
gnucap core.  I can't keep up with them all.

"" was really quite a challenge, mapping the
incompatible interfaces, so gnucap can use the spice models from
Berkeley, and 4 different variants of Spice that are incompatible with
each other, without changes other than two small config files.  It's
time to add a fifth spice variant (a new NGspice), but working with
spice code is not a pleasant experience.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]