gnucap-devel
[Top][All Lists]
Advanced

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

Re: gnucap-models


From: al davis
Subject: Re: gnucap-models
Date: Mon, 4 Apr 2022 12:36:49 -0400

On Sat,  2 Apr 2022 20:44:24 +0200 (CEST)
karl@aspodata.se wrote:
> https://git.savannah.gnu.org/cgit/gnucap/gnucap-models.git
> gives a few compiler warnings.

You do realize that those models were not written for gnucap?

Those models are considered to be archival, so bugs need to be
preserved, not fixed, unless they cause problems that prevent their
use.  The intent here is to be able to use models written for Spice
without any modification, noting that there are many versions of
Spice, all incompatible with each other.  As I recall, there are 4
versions of Spice that are explicitly supported here.  In the BSIM
collection, models were written for two incompatible versions of Spice.
The older models are for 3e, the later ones for 3f.  The older ones
were not updated to fit the newer version of Spice.  They do not work
with any current version of Spice, but do work with Gnucap.

Then there is the mapping to Gnucap, which interfaces to models in a
way very different from Spice, even though both are based on the same
math.  In Spice, data structures such as the matrix and voltage and
current vectors are accessed directly through pointers.  In Gnucap, you
can do read access that way but write access is done indirectly to
support incremental update.  Spice rebuilds the matrix every
iteration.  Gnucap does not, but when appropriate gives the illusion
that it does.  Spice time stepping is global and based on dt with time
derived from dt, Gnucap time stepping is local to each device, and based
on time with dt derived from time. The wrapper needs to account for
these differences.

"Correct" here is for the model to do the same as it does in Spice, the
particular version of Spice that it was written for, bug-for-bug.

Still, some of them are known to  not work correctly, and this is
documented in README.  The models are what they are.  The wrapper
(spice-wrapper.cc) is incomplete and needs to be completed.

The BSIM models are straight from Berkeley, used without any
modification.  The only additions are Makefile and wrapper.h, to
configure the interface, and the generic spice-wrapper.cc, which maps
models written for Spice to the Gnucap interface.

Regarding the bugs you mentioned, the first bug, the missing argument
to fprintf, was finally fixed in BSIM480.  Apparently there are lots of
those, in error or warning messages, warning about errors that rarely
happened, so they were never tested.

Because of this thread, I looked at upstream, noticed that there are
updates which I have added and will push soon.



reply via email to

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