Commit Graph

357 Commits

Author SHA1 Message Date
rlar 41c0ee45a2 introduce GENinstanceFree() and GENmodelFree()
To abstract away the business of releasing the memory
  of a struct GENmodel or struct GENinstance.
2018-02-17 11:53:07 +01:00
rlar 8c7d7051ae GENmodel, GENinstance, change layout, #4/4, complete the change
currently each and every device specific instance and model structure
  duplicates the memory layout of a struct GENmodel / GENinstance

further the first structure elements behind a GENinstance header
  are reinterpreted as a sort of a generic "node" array.

This business is very error prone, and makes it difficult to
  extend struct GENmodel / struct GENinstance.

This patch makes this business much more bearable.
2018-02-17 11:53:06 +01:00
rlar 2dcb79d09c GENmodel, GENinstance, change layout, #1/4, coccinelle semantic patch 2018-02-17 11:53:01 +01:00
rlar 4748c92de9 DEVdestroy(), change API, #2/2, complete the change, inclusive CKTdestroy()
loop over DEVmodDelete() and DEVdelete() in CKTdestroy()
  instead of doing this business in the DEVdestroy() functions.

As a consequence, most DEVdestroy() functions
  collapse completely.
2018-02-17 11:52:59 +01:00
rlar 668123ae44 analysis/cktpname.c, #4/4, cleanup 2018-02-03 13:17:17 +01:00
rlar 30550370fb analysis/cktpname.c, #3/4, cleanup obfuscated loop termination 2018-02-03 13:16:40 +01:00
rlar d85ceb85cb analysis/cktpname.c, #2/4, cleanup, use a local `IFparm *' 2018-02-03 13:16:12 +01:00
rlar 1d60387617 analysis/cktpname.c, #1/4, cleanup, use a local `IFdevice *' 2018-02-03 13:16:01 +01:00
rlar e311096429 gendef.h, get rid of awkward counted GENnode macros 2018-02-03 11:46:24 +01:00
rlar c892b2d460 analysis/acan.c, check for valid startfreq
an 'ac dec' or 'ac oct' can not have a startfreq <= 0
2018-01-20 10:55:26 +01:00
rlar c5d8ad792e analysis/acsetp.c, ac analysis, allow frequency=0 2018-01-15 19:04:52 +01: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 0a48e6f2a7 devices/res, introduce RESupdate_conduct()
which will be usefull later
2017-10-21 19:05:27 +02:00
h_vogt c82ee9d949 introduce option "epsmin"
To define a minimum argument for some log() function invocations.
(most notably for the diode saturation current 'is')
2017-04-19 18:56:00 +02:00
rlar 7afb798a6f check for illegal DEVsetup() DEVunsetup() patterns.
Consider the following silent contracts:
1)
 CKTsetup() invocations must be separated by a CKTunsetup() invocation
 But CKTsetup() has an internal flag,
   which will prevent re-invocation of DEVsetup()
 But DEVsetup() will be called during sensitivity analysis,
   bypassing this precaution. It is fatal if this will
   cause another node allocation (CKTmk..()).
   This commit tries to detect such cases.
   (Note: many DEVsetup routines (all ?) have their CKTmk..() invocations
      guarded to avoid reallocation of local nodes,
      see commit f7f454c0a1
        bug fix, fix the guard for device generated internal nodes (via CKTmkVolt())
   )
   FIXME:
     DEVsetup() is seriously obfuscated by these guards.
     If would be far better, if the sensitivity analysis
       wouldn't sidestep into DEVsetup()
     consider a device local variant of the CKTisSetup flag
2)
 DEVunsetup() must delete all, each and every,
   local allocated node in DEVsetup()
 Otherwise CKTmk..() invocations in a following CKTsetup() will
   return duplicate node numbers, effectively shorting device nodes.
 This commit tries to detect incomplete CKTdltNNum() invocations.
3)
  DEVunsetup() must not delete a netlist node.
  This can easily happen in those devices which have optional ports,
    which have code in DEVsetup() which copies node numbers to
    local node variables.
  This commit tries to detect such errors.
2017-04-12 21:32:51 +02:00
rlar 2c35eebb0b invoke in_parse_temper_trees() and inp_evaluate_temper() unconditionally 2017-04-09 14:06:02 +02:00
rlar f2f2b3b09a inp_evaluate_temper(), add struct circ argument 2017-04-09 13:49:43 +02:00
h_vogt 648de2a001 cktdojob.c, add missing evaluation of TEMPER after new temperature is set
This is relevant for model and device parameters containing TEMPER.
2017-04-09 13:48:55 +02:00
rlar 33788f7052 remove excessive inp_evaluate_temper() prototypes 2017-03-22 21:47:43 +01:00
rlar dc6e1cb064 use strchr() instead of strstr() 2017-03-19 20:24:49 +01:00
Francesco Lannutti 43f24d6f22 rewrite cktsens.c in terms of the 'SMP' matrix interface 2017-03-17 18:22:36 +01:00
rlar c3275241a5 ckti2nod.c, cktbindnode.c, minor cleanup 2017-03-04 16:05:08 +01:00
rlar 239780ebef cleanup, use an array for struct GENinstance.GENnode 2017-03-04 16:04:32 +01:00
rlar b5ccfca24b implement option 'indverbosity' to control check of inductive systems
default is 2, maximum verbosity

option indverbosity=1
  can be used to prevent check for
    "incomplete set of couplings"

option indverbosity=0
  can be used to avoid the check altogether

set indverbosity=INTEGER
  or
.option indverbosity=INTEGER
  works as well
2017-01-02 20:03:25 +01:00
rlar e89a5dd5b4 cktop.c, #14/14, cleanup 2016-10-15 15:06:20 +02:00
rlar b3a0f15c09 cktop.c, #13/14, cleanup 2016-10-15 15:06:20 +02:00
rlar 65596ce76c cktop.c, #12/14, cleanup 2016-10-15 15:06:20 +02:00
rlar 8d843ecec5 cktop.c, #11/14, cleanup 2016-10-15 15:06:19 +02:00
rlar 64fadb90cc cktop.c, #10/14, whitespace 2016-10-15 15:06:19 +02:00
rlar 3041936663 cktop.c, #9/14, shortcut 2016-10-15 15:06:19 +02:00
rlar a446d1e145 cktop.c, #8/14, early leave 2016-10-15 15:06:19 +02:00
rlar 0482f57bb7 cktop.c, #7/14, invert a trailing "if" 2016-10-15 15:06:19 +02:00
rlar 761e556ac2 cktop.c, #6/14, simplify loop termination 2016-10-15 15:06:19 +02:00
rlar eea4d016ec cktop.c, #5/14, simplify loop termination 2016-10-15 15:06:19 +02:00
rlar e2f4c2ec9f cktop.c, #4/14, shrink scope of some locals 2016-10-15 15:06:19 +02:00
rlar eb1c8e92bc cktop.c, #3/14, combine two `if' bodies 2016-10-15 15:06:19 +02:00
rlar ec1e1114e8 cktop.c, #2/14, remove a redundant assignment 2016-10-15 15:06:18 +02:00
rlar f0e3bc0025 cktop.c, #1/14, cleanup 2016-10-15 15:06:18 +02:00
rlar 034188cb43 dctrcurv.c, simplify 2016-10-15 15:06:18 +02:00
rlar 4c2e4d0c2f drop SIGN(), SIGN(1.0,x) --> SGN(x) 2016-10-15 15:06:18 +02:00
rlar 30be67b960 analysis/sensaskq.c, fix ancient bug, setting instead of asking 'deftol'
This is of no consequence,
  neither 'deftol' nor 'SENS_DEFTOL' is actually used somewhere.
2016-10-15 15:06:16 +02:00
rlar 78efbcbff8 dctran.c, remove unused variable 'del_before' 2016-08-15 11:27:00 +02:00
rlar 3715947529 dctrcurv.c, #7/7, cleanup 2016-07-30 21:02:35 +02:00
rlar 1cdd68f787 dctrcurv.c, #6/7, use the fact 'i' being 0 2016-07-30 21:02:31 +02:00
rlar 9b75fcb9ce dctrcurv.c, #5/7, cleanup while loop 2016-07-30 21:02:26 +02:00
rlar 437bc36a8f dctrcurv.c, #4/7, polish comments 2016-07-30 21:02:21 +02:00
rlar f77485b081 dctrcurv.c, #3/7, express the value of 'i' more verbosely 2016-07-30 21:02:17 +02:00
rlar b43a98e0c9 dctrcurv.c, #2/7, use 'j' here for simplicity 2016-07-30 21:02:12 +02:00
rlar 8baf4f435f dctrcurv.c, #1/7, whitespace cleanup 2016-07-30 21:02:07 +02:00
rlar 5b42d09618 unify, use memcpy for CKTstate copy operations 2016-07-30 21:00:29 +02:00