Commit Graph

5368 Commits

Author SHA1 Message Date
rlar bc84b06b24 make struct GENinstance truly generic
drop the GENnode struct member, which is actually part of
  the derived instance structs
2018-01-09 20:12:02 +01:00
rlar 315990688c gendef.h, get rid of the awkward counted GENnode macros 2018-01-09 20:12:02 +01:00
rlar 566520cef5 unify, add missing GENstate struct member
for all instance structs, even when actually unused.
2018-01-09 20:11:59 +01:00
rlar 39800df3fb rename ancient misspelled struct members 2018-01-09 19:45:06 +01:00
rlar b511a9179a extend commit: spicelib/devcies/*dest.c, rewrite DEVdestroy() functions 2018-01-09 19:42:57 +01:00
rlar dcd96634f7 devices/**/*defs*.h, fix adms too 2018-01-09 19:42:55 +01:00
rlar 9b45dbbbba devices/**/*defs*.h, use a struct GENmodule slot 2018-01-09 19:42:53 +01:00
rlar 8c4ae60189 nbjtdefs.h, fix /* --- end of generic struct GENmodel --- */ 2018-01-09 18:41:51 +01:00
rlar 8ba1999d15 devices/**/XXXmdel.c, fix adms too 2018-01-07 22:09:43 +01:00
rlar 982ba45bab devices/**/XXXmdel.c, drop goto 2018-01-07 22:07:45 +01:00
rlar ae45e5cac9 devices/**/XXXmdel.c, cleanup model loop 2018-01-07 22:07:22 +01:00
rlar 07fa2411ea devices/**/XXXmdel.c, cleanup instance loop 2018-01-07 22:01:22 +01:00
rlar 12dfa082ce devices/**/XXXmdel.c, use GENmodel and GENinstance 2018-01-07 21:42:01 +01:00
rlar a0e8c91d89 devices/**/XXXmdel.c, unify variable and argument names 2018-01-07 21:39:49 +01:00
rlar 58f745f57f devices/**/XXXmdel.c, cleanup linewrap 2018-01-07 21:39:01 +01:00
rlar 3095330565 devices/**/XXXmdel.c, cleanup whitespace 2018-01-07 21:37:41 +01:00
rlar bee207ccd9 devices/**/XXXmdel.c, cleanup braces 2018-01-07 21:28:02 +01:00
rlar eaa1fb7521 devices/**/XXXdel.c, fix adms too 2018-01-07 20:32:25 +01:00
rlar 5ecf02796b devices/**/XXXdel.c, use GENmodel and GENinstance 2018-01-07 20:04:28 +01:00
rlar b7c2cf709a devices/**/XXXdel.c, unify, rename variables
rename  model, modPtr, instPtr --> inModel, model, fast
  rename  inst --> here
2018-01-07 20:04:28 +01:00
rlar ad3486e93e devices/**/XXXdel.c, unify, rename third argument --> `kill' 2018-01-07 20:04:28 +01:00
rlar 5362d8be46 devices/**/XXXdel.c, unify, function arguments 2018-01-07 20:04:28 +01:00
rlar 16ee02ba35 devices/**/XXXdel.c, cleanup whitespace 2018-01-07 20:04:28 +01:00
rlar 4171996094 devices/**/XXXdel.c, remove a redundant `return' 2018-01-07 20:04:28 +01:00
rlar 5d19be9030 devices/**/XXXdel.c, cleanup braces 2018-01-07 20:04:28 +01:00
rlar e2175232a9 mif/mifmdelete.c, cleanup
rewrite in terms of GENmodule and GENinstance
2018-01-07 19:54:44 +01:00
rlar 703cbf8bd8 mif/mifdelete.c, introduce MIFdelete_instance()
which is responsible for the generic part of the business.
(in terms of GENmodel, GENinstance)
2018-01-07 19:39:43 +01:00
rlar 9282dbdb8c mif/mifdelete.c, fix commit: xspice, implement "CALLBACK"
MIFdelete() might be called with third arg being NULL,
  searching for the instance to be deleted by name only.
need to invoke the callback in this case too.
2018-01-07 19:38:39 +01:00
rlar 57a0a5dec0 devices/bjt/bjttemp.c, bug fix, capacity temperature dependency
Fix a very old bug in the implementation of the
  gummel-poon model formulas for the junction capacities.
  (already in spice3f4)
For unknown reasons, the same formulas in the
  diode mos1 mos2 mos6 jfet models
have been implemented correctly right from the beginning,
the typo was bjt specific.

Many Thanks for the concise and precise Bug Report
  provided by Schabo Rumanus on the ngspice-users mailing list
> To: ngspice-users@lists.sourceforge.net
> Subject: [Ngspice-users] Temperatursimulation von Sperrschichtkapazitäten

Many Thanks to Dietmar Warning for his thorough verification
  of this commit.
2017-12-20 18:02:13 +01:00
rlar f0159cbd0b numparam/spicenum.c, stripbraces(), bug fix
overwriting SPICE_DSTRING `dstr_p' may invalidate `s'

This bug was injected with the introduction of SPICE_DSTRING in :
> commit 76feebbbfa
> Date:   Thu Feb 25 21:43:03 2010 +0000
>     various bug fixes
2017-11-13 20:36:49 +01:00
rlar 84761c125f fix erfc() usage in cider
cider relied on our broken ngspice variant of erfc() which behaved as
  erfc_ngspice(x) = erfc(fabs(x))

Note:
  apart from cider, erfc is used in
    devices/ltra/ltramisc.c
      always with positive argument
  and
    src/frontend/spec.c
      again always with positive argument
Thus, the difference in implementation
 never mathered anywhere except in cider
2017-10-28 12:38:36 +02:00
rlar c900cc8824 drop ngspice internal implementation of erfc()
which these days is guaranteed to be provided by <math.h>

note,
  our own implementation was incorrect anyway.
  it evaluated to
    erfc_ngspice(x) = erfc(fabs(x))
2017-10-28 12:38:32 +02:00
rlar ca57447f6c fix commit "devices/bsim3v32: apply Area Calculation Method (ACM) to the bsim3v3.2.4 model"
which moved processing of several parameters into a new function
  ACM_SourceDrainResistances()
but did so incompletely.

As a consequence the matrix footprint was not correctly modified
 when source or drainresistance is zero

Thanks for the bug report by "Sto" in message
>  bug: mosfet models with deliberate NRD=0 (ngspice-27)
https://sourceforge.net/p/ngspice/discussion/133842/thread/fa39228d
2017-10-21 20:22:43 +02:00
Holger Vogt f868418d13 ACM_SourceDrainResistances(), fix misleading signature
This function does return resistance, not conductance.
2017-10-21 20:21:34 +02:00
rlar 57f3d35ddc devices/res, #6/6, rename variables back to their original names
strip the X in RESconductX, REScurrentX, RESacConductX
2017-10-21 19:05:28 +02:00
rlar 93ab0fb0e0 devices/res, #5/6, RESconduct, include RESm
Henceforward RESconduct (renamed to RESconductX) shall include factor RESm.
That's a mere rewrite and doesn't change functionality.
2017-10-21 19:05:28 +02:00
rlar afd5147f98 devices/res, #4/6, RESacConduct, include RESm
Henceforward RESacConduct (renamed to RESacConductX) shall include factor RESm.
That's a mere rewrite and doesn't change functionality.
2017-10-21 19:05:28 +02:00
rlar 6941c43673 devices/res, #3/6, RESacConduct, collect RESm
Reshape the sourcecode to emphasize the RESm * RESacConduct affiliation.
That's a mere rewrite and doesn't change functionality.
2017-10-21 19:05:28 +02:00
rlar 7edd241e96 devices/res, #2/6, RESconduct, collect RESm
Reshape the sourcecode to emphasize the RESm * RESconduct affiliation.
That's a mere rewrite and doesn't change functionality.
2017-10-21 19:05:28 +02:00
rlar 5b23f0c684 devices/res, #1/6, REScurrent, include RESm
Henceforward REScurrent (renamed to REScurrentX) shall include factor RESm.
That's a mere rewrite and doesn't change functionality.
2017-10-21 19:05:28 +02:00
rlar f73a353d6b devices/res/resnoise.c, cleanup using pow() 2017-10-21 19:05:28 +02:00
rlar abb07c4306 devices/res/restemp.c, RESupdate_conduct(), avoid excess warnings
This function is invoked several times during initialisation,
  possibly with yet incomplete model and instance parameter settings.
And it might be invoked many times during dc sweep.
2017-10-21 19:05:28 +02:00
rlar cffab98882 devices/res/resparam.c, bug fix, alter resistance not honoured when resuming a transient simulation
When "alter" is invoked after a break-point stopped a transient simulation,
then it might be necessary to update RESconductance
before continuing the transient simulation.

Thanks for the bug report to An Zou
in message "alter resistor value" on the ngspice-users forum
https://sourceforge.net/p/ngspice/discussion/133842/thread/33ce6855/
2017-10-21 19:05:28 +02:00
rlar 480a3f6be1 tests/regression/misc/resume-1.cir, expose bug
alter "resistance" and "resistor coefficient"
  is not honoured when resuming a transient simulation.
2017-10-21 19:05:28 +02:00
rlar 0e1294b3b5 devices/res/resparam.c, whitespace and parenthesis 2017-10-21 19:05:27 +02:00
rlar 0a48e6f2a7 devices/res, introduce RESupdate_conduct()
which will be usefull later
2017-10-21 19:05:27 +02:00
rlar 0af576a7d8 devices/res/resask.c, bug fix, set and query of RESresist and RESacResist shall comute
Note:
  RESresist and RESacResist are device parameters
     they do not reflect effective resistance when "ask"'ed
     (don't reflect tc1, tc2, tce, m, scale, temp ...)
  RESconduct and RESacConduct are "query-only" parameters
     these report the effective conductance when "ask"'ed
     (including tc1, tc2, tce, m, scale, temp ...)
2017-10-21 19:05:27 +02:00
rlar 1c5e954b47 devices/res, bug fix, semantics of "short" and "narrow", aka "dlr" and "dw"
These need to be subtracted from both sides
2017-10-21 19:05:27 +02:00
rlar e0126a4947 tests/regression/misc, check resistor flicker noise 2017-10-21 19:05:27 +02:00
Fabio Rossi 4c503c1e47 src/tclspice.c, bug fix, broken trimming of the "spice::" namespace
Due to a missing break in the for(;;) loop,
  causing the loop to walk beyond end of string argv[0],
  causing random behaviour.
2017-10-19 17:58:02 +02:00