Commit Graph

1485 Commits

Author SHA1 Message Date
rlar a86f2068c8 skip-ws, #3/6, use TEMPORARY macros, obj-invariant 2016-03-22 15:26:06 +01:00
rlar 6d1171ad6f skip-ws, #2/6, introduce "ngspice/stringskip.h"
with some temporary macros to skip whitespace
2016-03-22 15:26:05 +01:00
rlar bd0bc3038b use `SWAP' macro 2016-03-22 13:04:13 +01:00
rlar d0897fd0c4 src/spicelib/parser/inpptree.c, bug fix, B expression of kind `max(0,expr)'
identified and reported by Marcel Hendrix,
expressions of this kind could trigger a segmentation violation.

PTdifferentiate() roughly evaluates to
  ternary_fcn(ge0(0-expr), 0, PTdifferentate(expr))
and mkb() optimizes
  0 - expr --> unary_minus(expr)

IFeval() invokes PTeval() for the derivative too,
PTeval() looks at the incorrect tree->funcnum
  and tries to PTeval for a second argument which is not there,
     (unary_minus does not have a second argument)
  causing a segmentation fault.
2016-03-09 20:24:37 +01:00
rlar 726d0be34c use char variants of the <ctype.h> toxxxx() family 2016-03-09 20:24:36 +01:00
rlar 71a7c3459b use char variants of the <ctype.h> isxxxx() family 2016-03-09 20:24:36 +01:00
rlar da5f86c50b spicelib/analysis/transetp.c, fix typo, `TST0P' -> `TSTOP' 2016-01-22 22:41:32 +01:00
rlar 9546b178fb drop macro `NEW', use TMALLOC instead 2015-12-19 19:38:55 +01:00
rlar 9fde8e374a txl/txlsetup.c, avoid warning, drop static `GdC' and `RdL' 2015-12-17 21:59:37 +01:00
rlar d47f073550 txl/txlsetup.c, cpl/cplsetup.c, avoid warning, rename nested local `x1' 2015-12-17 20:48:59 +01:00
rlar 36aa107c0e src/spicelib/parser/inpptree.c, avoid warning, drop nested local `arg1' ... 2015-12-17 20:40:31 +01:00
rlar 0e0c2785a4 src/spicelib/analysis/dcpss.c, avoid warning, drop a nested local `i' 2015-12-17 20:35:11 +01:00
rlar 1aab57d17e src/spicelib/analysis/cktdisto.c, avoid warning, drop a nested local `size' 2015-12-17 20:31:53 +01:00
rlar 9e237d700e txl/txlsetup.c, cpl/cplsetup.c, rename static variable `ndn' --> `ndn_btree' 2015-12-15 20:19:12 +01:00
rlar f826ff82f8 introduce `ATTRIBUTE_NORETURN' for `controlled_exit()' and `sp_shutdown()' 2015-12-15 18:10:18 +01:00
h_vogt 806fdfb029 vsrc/vsrcask.c, bug #299, add "nop" handler for VSRC_EXTERNAL in SHARED_MODULE
Avoid NAN error when executing "show all"

Thanks to Sergii Baitala, who reported this in
  #299 Shared ngspice: missed VSRC_EXTERNAL handler in VSRCask
  http://sourceforge.net/p/ngspice/bugs/299/
2015-12-13 11:46:09 +01:00
dwarning 7fb8368133 favor exponential temperatur equation if all parameters tc1, tc2 and tce are given 2015-11-22 10:43:42 +01:00
rlar 5706fbd890 parser/inpptree-parser.y, bug fix, allow unary `+'
reported by Andy Fierman on the ngspice-users mailing list in message
  "Help to identify 'parameter value out of range or the wrong type' error please?"
2015-11-07 21:02:21 +01:00
rlar 28c0c96bbc devices/res, introduce TCE, exponential temperature coefficient 2015-11-02 19:25:43 +01:00
rlar 45117c94fd drop yyparse() prototypes, require bison >= 2.7 which emits them 2015-10-18 00:46:13 +02:00
rlar 0178dcd5f3 remove bison generated files from the repository
Their presence breaks automake rules when running
  in a separate build directory.
And when regenerated cause unwanted "changed files"
  in the repository.

As a consequence visual C compilation will fail.
It will still work with a "make dist" generated tar ball.
We need to upgrade the visual C project files
  to invoke bison and flex on windows,
or we have to provide these generated files
  in a visual C specific directory. (very annoying of course)
2015-10-10 20:14:50 +02:00
rlar 2f061b441e Makefile.am, fix dependency rules for bison generated files
which have been lost in commit
> Date:   Sun Jul 5 19:34:25 2015 +0200
>
>     polish bison/flex makefile rules
2015-10-10 20:04:27 +02:00
rlar a0a5e0f9c2 inpptree-parser.y, fix type of function `PTparse()' 2015-10-10 10:40:42 +02:00
dwarning 1b4aa22d0d Update some level and version entries for MOS models 2015-10-08 18:20:16 +02:00
rlar 192eeadb0b remove crufty comments which where used to support broken text editors 2015-09-24 18:23:54 +02:00
rlar dffcbddbba swallow `deprecated directive' warning emitted by newer bisons 2015-08-16 19:54:35 +02:00
rlar 61724121aa res/restemp.c, bug fix, need to update `RESresist' in `REStemp()'
instead of `RESsetup()'
  to be effective when altering a resistor model parameter or when
  sweeping a resistor model parameter in a dc analysis.

see tests/regression/temper/temper-3.cir
2015-08-10 17:52:57 +02:00
rlar 5940bf9294 analysis/dctrcurv.c, bug fix, sweeping `temper' in a dc analysis
incorrect update of model parameters,
  need to `invoke CKTtemp()' *after* `inp_evaluate_temper()'

see tests/regression/temper/temper-2.cir
2015-08-10 17:52:54 +02:00
rlar 794df1066a update bison generated files 2015-07-05 20:26:59 +02:00
rlar 1c6efd9481 polish bison/flex makefile rules 2015-07-05 20:25:23 +02:00
rlar f4472f788e spicelib/parser/inpptree.c, bug fix, "#287 Shared library crashes on using non existing functions "
"remcirc" has the potential to invoke INPfreeTree() with a NULL IFparseTree

Thanks to Craggan, who reported this in:
  http://sourceforge.net/p/ngspice/bugs/287/
2015-05-04 20:17:28 +02:00
rlar 7bc6374138 cleanup, use '\0' instead of 0 in char context 2015-05-02 10:24:54 +02:00
rlar 19e427e3a5 cleanup, use NULL instead of 0 in pointer context 2015-05-02 10:24:49 +02:00
rlar 6513aa5173 spicelib/devices, cleanup, 0 versus NULL in SPICEdev initialization 2015-05-02 10:24:45 +02:00
rlar c3f851750c fix commit "devices/asrc, introduce `ASRCvars' with the indices of the controlling nodes/branches" 2015-04-24 21:45:54 +02:00
rlar 83a5c31e6f fix commit "devices/asrc, allocate `ASRCacValues' in ASRCsetup()" 2015-04-24 21:45:29 +02:00
rlar 0b4bcf31f4 devices/res, bug fix, extend ac-resistance to the pz analysis 2015-04-15 19:52:36 +02:00
rlar b6b76ad035 devices/asrc, introduce `ASRCvars' with the indices of the controlling nodes/branches 2015-04-12 21:36:22 +02:00
rlar b4f1c1dda3 devices/asrc, allocate `ASRCacValues' in ASRCsetup() 2015-04-12 21:34:16 +02:00
rlar 232debc6ec drop `NEWN', use `TMALLOC' 2015-04-12 20:10:07 +02:00
rlar ad869c6d2d devices/asrc, rewrite #10/10, emphasise matrix for the two cases VSRC vs ISRC 2015-04-12 18:23:22 +02:00
rlar 66a0da8ab9 devices/asrc, rewrite #9/10, combine common code 2015-04-12 18:22:06 +02:00
rlar 704e50b62a devices/asrc, rewrite #8/10, cleanup and reorder 2015-04-12 18:18:20 +02:00
rlar 3a1c094682 devices/asrc, rewrite #7/10, allocate in one go 2015-04-12 18:18:14 +02:00
rlar b3860ac599 devices/asrc, rewrite #6/10, check for errors right at the beginning 2015-04-12 18:17:52 +02:00
rlar 1c53a425f0 devices/asrc, rewrite #5/10, combine common code 2015-04-12 18:17:46 +02:00
rlar 6ea1e1932d devices/asrc, rewrite #4/10, drop `ASRCcont_br' 2015-04-12 18:11:41 +02:00
rlar ce49a4977d devices/asrc, rewrite #3/10, combine TSTALLOC and MY_TSTALLOC 2015-04-12 18:11:38 +02:00
rlar e902ebd34d devices/asrc, rewrite #2/10, simplify incremental memory allocation 2015-04-12 18:11:33 +02:00
rlar e13e1690d2 devices/asrc, rewrite #1/10, add a return (E_BADPARM) 2015-04-12 18:11:29 +02:00
rlar 7afb450e66 devices/asrc, cleanup #9/9, polish local variables 2015-04-11 21:31:02 +02:00
rlar 21ff522441 devices/asrc, cleanup #8/9, cleanup parentheses and braces 2015-04-11 21:31:02 +02:00
rlar 39a25ba114 devices/asrc, cleanup #7/9, use '[]' to access array elements 2015-04-11 21:31:02 +02:00
rlar 036a45f348 devices/asrc, cleanup #6/9, cleanup 2015-04-11 21:31:02 +02:00
rlar bd5ac3e4fc devices/asrc, cleanup #5/9, drop explicit NULL comparsion 2015-04-11 21:31:02 +02:00
rlar b91386222e devices/asrc, cleanup #4/9, unify model cast 2015-04-11 21:31:01 +02:00
rlar 03ef81785a devices/asrc, cleanup #3/9, polish comments 2015-04-11 21:31:01 +02:00
rlar 2cb727476f devices/asrc, cleanup #2/9, whitespace 2015-04-11 21:31:01 +02:00
rlar df147cd8b8 devices/asrc, cleanup #1/9, invert `if' 2015-04-11 21:31:01 +02:00
rlar bfe9df8511 devices/ind.c, bug fix, use 'm' in pz analysis 2015-04-07 20:43:43 +02:00
rlar 685d684c88 devices/ind: bug fix, multiplier `m'
multiplier `m' was applied twice,
  because it was already implemented in indtemp.c before this commit :

> Date:   Thu May 9 10:28:38 2013 +0200
>
>     devices/ind: implement multiplier `m'
2015-04-06 21:19:44 +02:00
dwarning 7c5f3173e2 hisimhv2: fix naming problems by MS linker 2015-03-29 11:43:30 +02:00
rlar 4b7092633c hisimhv1, remove unused variables 2015-03-28 12:15:18 +01:00
rlar 5042ffc5cc hisimhv1, remove excess casts 2015-03-28 12:15:17 +01:00
rlar 7464d4423a hisimhv1, drop of non __STDC__ code 2015-03-28 12:15:16 +01:00
rlar 90d0bb3d2d hisimhv1, append `;' when using `BINNING' to be auto indentation friendly 2015-03-28 12:15:15 +01:00
rlar c5a3788f6b hisimhv2, TMFx, globals need to be static or need an own namespace
Fixme, actually these should have block local scope.
  (local in the blocks of the macros where these variables are actually used)
Thats safer, much easier to understand, at least as fast,
  and won't defeat parallelisation.
2015-03-28 12:15:11 +01:00
rlar 6ac641e906 hisimhv2, remove excess casts 2015-03-28 11:26:12 +01:00
rlar 970299bdc2 hisimhv2, drop of non __STDC__ code 2015-03-28 11:26:11 +01:00
rlar 0ef07aad20 hisimhv2, append `;' when using `BINNING' and `TSTALLOC' to be auto indentation friendly 2015-03-28 11:26:11 +01:00
rlar 6ad8b96dbb hisimhv2, apply "mark end of struct GENmodel overlay" 2015-03-28 11:26:11 +01:00
rlar 1f5b0f852b hisimhv2, apply commit "use TMALLOC, funcall, and NULL casts" 2015-03-28 11:26:11 +01:00
rlar 53555ac8c6 hisimhv2, extend rename from hisimhv --> hsimhv2 2015-03-28 11:26:11 +01:00
rlar 87a9c67a8f hisim2, remove excess casts 2015-03-27 17:53:36 +01:00
rlar efd8a0dce8 hisim2, append `;' when using `BINNING' to be auto indentation friendly 2015-03-27 17:52:05 +01:00
rlar 495988608a hisim2, apply commit "use TMALLOC, funcall, and NULL casts" 2015-03-27 16:45:48 +01:00
dwarning 26937f8dfb hisimhv1: less verbosity, remove useless printout 2015-03-26 10:30:57 +01:00
dwarning eb99465713 hisimhv1: prevent a nonsens range check for model parameter qme2 2015-03-26 10:21:37 +01:00
dwarning 6dbe8e618d correct node assignment for hisimhv 2015-03-26 10:08:09 +01:00
rlar 00ed1122b7 hisim2, reintroduce "rewrite, useing IFerrorf()" 2015-03-25 18:49:44 +01:00
rlar a87bf334b8 hisim2, reintroduce "rewrite `TSTALLOC()' macro for auto indentation" 2015-03-25 18:49:43 +01:00
rlar 9141e86926 hisim2, reintroduce "mark end of struct GENmodel overlay" 2015-03-25 18:49:43 +01:00
rlar 48ff3df6eb hisim2, reintroduce "hsm2eval.c, avoid static variables to allow multithreading" 2015-03-25 18:49:43 +01:00
dwarning 2b71713498 get the hisimhv v2 device info 2015-03-25 15:34:34 +01:00
dwarning 9ed2da9ad9 new hisimhv model version 2.2.0 in a separate directory 2015-03-25 15:17:16 +01:00
dwarning adcec9fa5f Revert "update hisimhv model to version 2.2.0"
This reverts commit c2ef7aeff3.
2015-03-25 14:13:07 +01:00
dwarning c2ef7aeff3 update hisimhv model to version 2.2.0 2015-03-25 06:47:32 +01:00
dwarning 339e7fe819 update hisim model to version 2.8.0 2015-03-23 21:47:00 +01:00
rlar 7d92eae124 noisean, introduce a .control variable "sqrnoise" to deliver noise data in squared representation
use "set srqrnoise" (and "unset sqrnoise") to control this.
2015-03-23 19:32:33 +01:00
rlar 8d6726f0f4 noisean, deliver results in V/sqrt(Hz) and A/sqrt(Hz) 2015-03-22 21:44:50 +01:00
rlar e755b45281 fix commit "noise analysis, bug fix, override ac magnitude of all vsrc/isrc devices" 2015-03-22 20:22:01 +01:00
rlar c16701b66c swallow compiler warning caused by "noise analysis, bug fix, override ac magnitude of all vsrc/isrc devices" 2015-03-22 18:25:17 +01:00
dwarning dd24406234 allow alternativ model parameter tref for vbic models 2015-03-16 17:21:42 +01:00
dwarning c44f101c49 extend bsim4 instance parameter with mulu0 for local mobility multiplier 2015-03-16 16:08:59 +01:00
dwarning 4402897a07 allow alternate instance parameter name delvt0 for bsim4 models 2015-03-16 15:27:42 +01:00
dwarning 759ec4a3d0 allow r=value as an alternative instance parameter 2015-03-15 10:38:06 +01:00
dwarning 88ef78e53b introduce geometry and frequency dependency for the flicker noise model 2015-03-15 10:16:16 +01:00
dwarning 82b0bc070f sorting parameter for resistor setup and temperature update routines 2015-03-14 00:29:55 +01:00
dwarning 95f45e2ee6 allow redundant instance parameter noise for compatibility reasons 2015-03-13 22:04:01 +01:00
rlar 07ee771a96 noise analysis, bug fix, override ac magnitude of all vsrc/isrc devices
Bug report due to Hartmut Henkel in
>> [Ngspice-users] Noise analysis depends on ac parameter

The noise analysis internally depends on an ac analysis
  to derive "inoise" from "onoise"
("onoise" is multiplied with the inverse ac gain from input to output)

This AC analysis used all the given ac magnitudes for all vsrc/isrc
  devices in the deck.

This fix overrides all ac magnitudes with zero,
  except for the given input device,
  whose magnitude is set to one.
2015-03-09 20:02:36 +01:00
dwarning 032b1c32c4 separate diode bottom and sidewall contributions for depletion capacitance 2015-03-08 17:54:49 +01:00
dwarning ea4c438311 Limiting the junction potential to a usual values for silicon diodes 2015-03-08 17:54:30 +01:00
dwarning c30373e37e correct formula for temperature dependent depletion capacitance (tlevc=1) 2015-03-04 06:54:34 +01:00
rlar a21770aab9 parser/inpgtok.c, remove unused function `INPgetU2Tok()'
INPgetU2Tok() was introduced in commit
Date:   Fri Sep 3 12:51:42 2010 +0000
    bug in B source parsing removed

and later unused in commit
Date:   Thu Apr 28 19:27:45 2011 +0000
    bug fix, (#329233)
2015-02-28 20:43:25 +01:00
rlar 1b7f3a9f2c parser/inpeval.c, this cannot happen here 2015-02-28 19:41:31 +01:00
rlar 548a1045a4 parser/inpeval.c, simplify mil/meg/milli processing 2015-02-28 19:22:01 +01:00
rlar c018b328b9 parser/inpeval.c, whitespace cleanup 2015-02-28 19:03:41 +01:00
rlar 4555107013 parser/inpeval.c, use '\0' 2015-02-28 19:03:39 +01:00
rlar a2b5288a3d parser/inpeval.c, bug fix, allow at most one sign char when parsing a number 2015-02-28 19:03:37 +01:00
rlar 12e8ee750b parser/inpeval.c, bug fix, incorrect restore of `*line' 2015-02-28 19:03:32 +01:00
rlar 2cbc84ccd1 parser/inpgtok.c, use copy_substring() 2015-02-28 11:05:46 +01:00
rlar 39d391fe33 parser/inpgtok.c, whitespace cleanup 2015-02-28 11:05:43 +01:00
rlar 4ae35e8974 parser/inpgtok.c, bug fix, introduced in "memory leaks: code improved"
commit "memory leaks: code improved"
Date:   Sun Apr 5 08:57:55 2009 +0000

'point' has not been incremented for so called
   "Weird items" with string length == 1
2015-02-28 11:05:23 +01:00
rlar 3c133c95b3 update bison generated files 2015-02-21 15:08:06 +01:00
rlar 788a5e5fa0 inpptree parser, bug fix, segfault due to usage of an unknown function
for example:
B1  1 0  V = {log(2.0, 1.3) + nosuchthing(2.0, 1.3)}
2015-02-21 15:08:04 +01:00
rlar 8e65614d31 spfactor.c, cktnames.c, don't crash when simulating "nothing"
reported by Siddhant Saraf in
> [ngspice:discussion] "out of memory" error : simulating a 2bit AND gate"

This comes in two flavours,
   1) an empty circuit
   2) a xspice circuit with exclusively xspice event nodes
2015-02-08 22:07:14 +01:00
rlar c5e0bcde04 cleanup using `hypot()' 2014-12-06 20:41:11 +01:00
rlar e08dcafbe9 cleanup, signature of CKTacDump() and CKTdump(), void* --> runDesc* 2014-10-12 22:07:28 +02:00
rlar 5c97e31049 cleanup, use '\0' and NULL 2014-09-20 19:20:20 +02:00
rlar 9e72296e40 src/spicelib/parse, implement `nint()' (`B' language) 2014-09-20 17:15:09 +02:00
rlar 2602a492b2 fix `log' in `B' and in `.control', to base e instead of 10
In the B language this can be considered a bug fix.

In the .control language this is a severe change
  and breaks backwards compatibility.

In all three languages 'numparam' 'B' and '.control' we now have
  ln    to the base e
  log   to the base e
  log10 to the base 10

Thus log and log10 is now consistent
  with the vast majority of programming languages.

ln is merely for convenience.
  very few other languages have it.
  I'd like to discourage its usage.
2014-09-12 19:18:11 +02:00
rlar abfd38b535 B language, introduce `log10' 2014-09-12 19:10:07 +02:00
rlar bdf70bd2b0 cleanup, rename PTln --> PTlog, PTF_LN --> PTF_LOG (`B' language) 2014-09-12 19:09:30 +02:00
rlar 93a212ca3c cleanup, rename PTlog --> PTlog10, PTF_LOG --> PTF_LOG10 (`B' language) 2014-09-12 19:05:56 +02:00
rlar f5d05af51d inpgmod.c, INPgetModBin(), use model_name_match() 2014-08-09 18:17:51 +02:00
rlar 6dc5f12914 USE_OMP, dont miss error return codes when a DEVLoadOMP() invocation fails 2014-06-26 19:50:12 +02:00
dwarning e562243558 hsm2ld.c, when multithreading, always print the debuging header lines 2014-06-26 19:50:10 +02:00
dwarning a94bcaeb0e multicore simulation with hisim2 2014-06-26 19:50:09 +02:00
rlar 25a093c557 hsm2eval.c, avoid static variables to allow multithreading 2014-06-26 19:50:08 +02:00
dwarning 27cb51afca hisim2, remove register class 2014-06-26 19:50:01 +02:00
dwarning a646a5f78f devices/bsim4, update to version 4.8 2014-06-26 19:49:34 +02:00
dwarning 010174ec2a devices/bsim4v7, add to build infrastructure 2014-06-26 19:48:15 +02:00
dwarning 58122ce47b devices/bsim4v7, string substitution, bsim4 -> bsim4v7 2014-06-26 19:46:01 +02:00
dwarning 7e4128c60a devices/bsim4v7, new directory, plain copy from devices/bsim4 2014-06-26 19:44:57 +02:00
dwarning cba69c4850 devices/bsim4v4, remove ancient bsim4 model version 4.4 2014-06-26 19:43:54 +02:00
rlar 9736b0fe2b dev.c, get rid of hardwired device enumeration 2014-06-26 19:04:55 +02:00
dwarning 5bb69f77d1 hisimhv1, hisim2, clean up unused variables 2014-06-24 18:19:51 +02:00
rlar 609c246b95 cktpzstr.c, cleanup minimising / maximising operations 2014-05-15 18:50:35 +02:00
rlar aa7a7606c7 avoid multiple declarations of controlled_exit(), add 'noreturn' attribute 2014-05-14 21:36:18 +02:00
rlar 9a9e1c5413 ifeval.c, IFeval(), pronounce definite end of instructions flow 2014-05-14 20:55:32 +02:00
rlar eedb80a2ba rewrite, using IFerrorf() 2014-05-09 16:36:57 +02:00
dwarning 157aedd72d update hisimhv to version 1.2.4 2014-05-09 16:36:57 +02:00
dwarning 452544b30e apply few patches according the model developers web site 2014-05-07 18:45:00 +02:00
dwarning d671e70b6c clarify level parameter for hisim and hisimhv 2014-05-05 20:35:03 +02:00
dwarning de6293de18 apply few patches according the model developers web site 2014-05-05 20:18:16 +02:00
dwarning 1e1c4fe168 apply few patches according the model developers web site 2014-04-20 19:04:29 +02:00
rlar cc56c90b9d drop asprintf() 2014-04-12 21:02:31 +02:00
rlar 7aa454e5b4 rewrite, using tprintf() 2014-04-05 19:10:12 +02:00
rlar 4049e8ec1f rewrite, using IFerrorf() 2014-04-04 21:58:08 +02:00
rlar ea7372efe7 rewrite, useing IFerrorf()
OUTerror() and IFerror() are no more used,
  but kept for compatibility
2014-04-04 21:22:48 +02:00