Commit Graph

2734 Commits

Author SHA1 Message Date
rlar 20f5bb3e2e inpcom.c: rename library_name[][] --> section_name[][] 2013-12-31 12:56:42 +01:00
rlar b8e3843f45 inpcom.c: rename library_ll_ptr[][] --> section_ref[][] 2013-12-31 12:56:41 +01:00
rlar aa9d291114 inpcom.c: rename libraries[] -> library_deck[] 2013-12-31 12:56:41 +01:00
rlar 61ab7b1de2 inpcom.c: rename num_lib_names --> num_sections 2013-12-31 12:56:40 +01:00
rlar d619a8b024 inpcom.c: rename new_lib_name() --> remember_section_ref() 2013-12-31 12:56:39 +01:00
rlar 05bd53b8de inpcom.c: rename find_lib_name() --> find_section() 2013-12-31 12:56:39 +01:00
rlar 09e89df89d inpcom.c: static declaration of library related global variables 2013-12-31 12:56:38 +01:00
h_vogt c15608c903 unique modtab for each circuit, store in ckt structure 2013-12-31 12:56:38 +01:00
h_vogt 4bed98936c inp.c: nullify `dbs' for use with 'source' command 2013-12-31 12:56:37 +01:00
rlar 3ea7a23394 fix bug `#233 cktdojob: Uninitialized variable: ANALmaxnum'
this is WANT_SENSE2 specific

http://sourceforge.net/p/ngspice/bugs/233/
2013-12-31 12:56:36 +01:00
rlar 14ae087ec5 fix bug `#232 soi3cap.c: wrong array index alpha_args[2]'
though incorrect, this didn't lead to misbehavior.

http://sourceforge.net/p/ngspice/bugs/232/
2013-12-31 12:56:36 +01:00
rlar d1764cc7fa inp_readall() change function signature for readability 2013-12-31 12:56:35 +01:00
rlar 536d3c229f inpcom.c: abstract into new function read_a_lib() 2013-12-31 12:56:34 +01:00
rlar eaf4801b33 inpcom.c: rewrite using new function find_lib() 2013-12-31 12:56:34 +01:00
rlar 9d856dad61 inp_determine_libraries(): rewrite 2013-12-31 12:56:33 +01:00
rlar 9e3f2a9d28 inp_determine_libraries(): can happen at most once 2013-12-31 12:56:32 +01:00
rlar 111a258ff4 inpcom.c: small cleanup 2013-12-31 12:56:32 +01:00
rlar b4db509d83 inpcom.c: comment .lib semantic 2013-12-31 12:56:31 +01:00
rlar 7463499523 inp_readall(): rename local variables 2013-12-31 12:56:31 +01:00
rlar 3877e2d0d6 inp_readall(): local scope for `tmp_ptr1' 2013-12-31 12:56:30 +01:00
rlar 5fda0e2694 inp_readall(): local scope for `fdo' 2013-12-31 12:56:29 +01:00
rlar 8a154a7a9a use SP_VOLTAGE instead of literal value `3'
(grep "git --no-pager grep -nH -e '->[ \t]*type.*[0-9]'")
2013-12-31 12:56:29 +01:00
rlar b3847817a1 retire #define NODE_VOLTAGE, use SP_VOLTAGE instead
(grep "git --no-pager grep -nH -e '\\(SP_\\|NODE_\\)\\(VOLTAGE\\|CURRENT\\)'")
2013-12-31 12:56:22 +01:00
dwarning d823272a1b jfet: new noise model selector nlev=3 for correct noise in non-saturated region 2013-12-31 12:54:45 +01:00
dwarning ef2614d014 jfet: whitespace cleanup 2013-12-31 12:54:44 +01:00
rlar 4184aa8c10 cleanup, use array operator
checked for object file invariance on linux with
   ./configure --enable-debug=no --enable-maintainer-mode --with-readline=yes --enable-cider --enable-ndev --enable-pss --enable-xspice
2013-12-31 12:54:43 +01:00
h_vogt 92a529f15c winmain.c: print buffer enlarged 2013-12-31 12:54:43 +01:00
h_vogt baad0b1bb8 inp.c: some comments added 2013-12-31 12:54:34 +01:00
rlar 6c8f002eea unify #ifndef include wrapper 2013-12-31 12:54:32 +01:00
rlar 1ee88a5694 prepare for #ifndef include wrapper unification 2013-12-31 12:54:31 +01:00
rlar 8cafeed8f0 rename #ifndef include wrapper CKT_H 2013-12-31 12:54:30 +01:00
rlar c377b7a6b3 avoid leading underscore in preprocessor macros 2013-12-31 12:54:27 +01:00
rlar 5086a90746 cleanup some preprocessor macros 2013-12-31 12:54:15 +01:00
h_vogt 6c74513120 fix bug #229 `Node name "n" is sometimes toxic'
Error: too few nodes for MOS or CPL:
m6 1 n 2 vss nch.3 l=4.3e-07 ...

http://sourceforge.net/p/ngspice/bugs/229/
2013-09-20 22:27:35 +02:00
rlar 8c69016464 inpcom.c: rewrite for readability 2013-09-20 21:38:58 +02:00
rlar dbfc90df0a inpcom.c, bug fix, incorrect start value for `prev'
this bug was introduced in the following commit,
which `reused' variable prev,
failing to preserve its initialization value NULL

Author: pnenzi <pnenzi>
Date:   Mon Oct 8 21:10:34 2007 +0000

    Improvements in frontend by Phil Barker
2013-01-12 23:26:42 +01:00
Francesco Lannutti d448378f58 Fixed a memory leak in dcpss.c on the "err_conv" array 2013-01-12 14:10:21 +01:00
h_vogt 8e5ad3d344 ivars.c: prevent crash in CYGWIN batch mode, if NGSPICE_INPUT_DIR given
remove unused Default_MFB_Cap
2013-01-01 17:31:44 +01:00
dwarning 752ab78bd8 b4soinoi.c: Correct the flicker noise model with device multiplier 2013-01-01 17:29:02 +01:00
h_vogt 3c078cde57 inp.c: remove buf if .control section contains only 'save...' lines 2013-01-01 12:32:04 +01:00
rlar d6354598b9 fix commit "update hisim to version 2.7.0"
missing #include "ngspice/config.h"

thats required for consistent interpretation of the type
  struct IFdevice
from ngspice/ifsim.h
included from ngspice/devdefs.h

(invisible XSPICE definition leading
   to different size and layout of this struct)
2012-12-31 11:26:20 +01:00
h_vogt 20716d3496 inpcom.c: exit if 'poly' option is required, but XSPICE not available,
remove memory leak
2012-12-30 19:27:36 +01:00
h_vogt 82c5d5b3be dcpss.c: Allow XSPICE usage without excessive debug message 2012-12-30 15:34:24 +01:00
h_vogt 9a4bb846a6 com_dl.c: exit upon codemodel load error 2012-12-30 15:32:44 +01:00
h_vogt 0ecd633334 dcpss.c : compatibility to MS Visual Studio C
vngspice.vcproj, config.h: add PSS to Vc project
2012-12-28 21:19:20 +01:00
Stefano Perticaroli 79bffc78a1 next version of PSS2
which was reviewed and rewritten on branch `PSS-2-try-to-rebase+4'
by Stefano Perticaroli and Francesco Lannutti
2012-12-28 18:15:37 +01:00
rlar 0be61b3e5a remove PSS2 2012-12-28 18:10:05 +01:00
h_vogt 1b4c17a464 rename spicelib/parser/inp.h to inpxx.h
since we have another "inp.h" in src/frontend
2012-12-27 14:25:43 +01:00
Francesco Lannutti f153208a5f nipred.c, remove unused variable `temp' 2012-12-25 01:40:16 +01:00
Francesco Lannutti 574d39e29c remove almost empty src/maths/ni/nipred.h 2012-12-25 02:27:04 +01:00
dwarning 5dd6351773 distclean and maintainer-clean shall remove generated Makefile.am files in adms directories 2012-12-25 16:41:57 +01:00
Francesco Lannutti e27d43cd0c remove empty src/maths/ni/*.h include files 2012-12-24 11:28:30 +01:00
h_vogt 298f9ceaa9 tclspice.c, ngspice.pm, config.h in visualc: prepare ngspice-25 2012-12-23 12:13:38 +01:00
h_vogt 2a9723e06d inpdpar.c: remove memory leak 2012-12-22 20:20:00 +01:00
h_vogt 8a1cec25a5 vsrc, isrc TRNOISE: allow repeated calls to 'tran' 2012-12-22 17:57:31 +01:00
h_vogt 237fd538d1 cktntask.c: remove meory leak 2012-12-22 10:39:15 +01:00
rlar 4146a8644a use enum Mif_Port_Type_t values instead of numericals 2012-12-20 18:31:38 +01:00
dwarning 12b2287aa6 remove of modtab after the job is done to issue additional source commands 2012-12-19 18:49:32 +01:00
h_vogt 8b86617e2d isrcload.c: remove memory read beyond array boundary 2012-12-18 23:22:45 +01:00
rlar 0bb266eab0 use enum dvec_flags values instead of numericals 2012-12-16 19:34:13 +01:00
rlar 190932bf65 use enum simulation_types values instead of numericals 2012-12-16 18:53:28 +01:00
h_vogt 3d28a3a225 device.c: plug memory leak in 'alter' command 2012-12-16 14:07:33 +01:00
h_vogt 7d45880654 plotit.c: remove memory leaks 2012-12-15 22:59:47 +01:00
h_vogt 717fe81c17 com_display.c: remove memory leak 2012-12-15 22:44:21 +01:00
rlar e67e9da202 inperror.c, release errMsg when it has been consumed 2012-12-15 21:51:59 +01:00
h_vogt cea4eb09d6 niiter.c: indentations 2012-12-15 20:07:42 +01:00
h_vogt ba6dd7b1af main.c, inperror.c: unify errMsg 2012-12-15 20:03:57 +01:00
h_vogt 07ec7bd412 inperror.c: indentations 2012-12-15 19:51:56 +01:00
h_vogt 8f44839f3e com_measure.c, measure.c: remove memory leaks 2012-12-09 16:24:39 +01:00
h_vogt 12e19d140b measure.c, rewrite do_measure() 2012-12-09 13:27:53 +01:00
h_vogt 155b6134a8 apply_func(), use arg->pn_value->v_name instead of recreated name 2012-12-09 13:27:53 +01:00
h_vogt aac7c1d4be com_diff(), use hash tables for the vector search
patch originally provided by Bill Swartz, 2010
reduces vector search time from O(n*n) to O(n)
2012-12-09 13:27:53 +01:00
h_vogt c5de0c21c9 findvec(), use hash tables for the vector search
patch originally provided by Bill Swartz, 2010
reduces vector search time from O(n) to O(1)
2012-12-09 13:27:53 +01:00
h_vogt 75447dc43c implement spice_dstring_append_lower()
patch originally provided by Bill Swartz, 2010
2012-12-09 13:27:53 +01:00
h_vogt a13e5bf867 measure.c: outputting 'meas' status in Windows GUI 2012-12-05 23:06:16 +01:00
dwarning 0f2794267c jfet model temperature extension, tcv and bex parameter 2012-12-04 20:58:01 +01:00
rlar 2e40bf9bff allow Ctrl-d to quit
based upon Cody Creagers patch,
  EOF Control-D support - ID: 3586069
  http://sourceforge.net/tracker/?func=detail&aid=3586069&group_id=38962&atid=423917
2012-12-02 12:26:24 +01:00
rlar 6260fd16ec cmpp, rewrite for proper report of error locations 2012-12-01 22:46:53 +01:00
rlar 348e3976e7 cmpp, use <stdarg.h> for print_error() 2012-12-01 22:39:21 +01:00
rlar 6757c48602 cmpp, remove dead code 2012-12-01 22:29:32 +01:00
rlar d9590f31c3 cmpp, don't exit(0) when reporting an error 2012-12-01 22:29:29 +01:00
rlar 83e3100917 remove unused variables 2012-12-01 16:05:20 +01:00
rlar b4b4e63611 hisimhv1, avoid warnings 2012-12-01 16:05:20 +01:00
h_vogt b216db8ffd cplsetup.c: indentations etc. 2012-12-01 13:32:27 +01:00
h_vogt d747f0de50 cplsetup.c: remove memory leaks 2012-12-01 13:28:28 +01:00
h_vogt 6a6c49516a inpcom.c: remove memory leak 2012-12-01 13:24:46 +01:00
rlar b45c4ea78b ltraacct.c, shortcutting the bug fix
use following fact at the artificial timestep time[-1]
   voltage[-1]  ===  voltage[0]
to shortcut the expressions
2012-12-01 11:00:14 +01:00
rlar e4cc63417b ltraacct.c, bug fix
reported by Gary Hennigan
on tracker
  http://sourceforge.net/tracker/index.php?func=detail&aid=3591132&group_id=38962&atid=423915

access to uninitialized memory,
  trying to acquire the "time" of a projected auxiliary timestep in the past.

now using the following auxiliary timestep t[-1]

  voltage(t[-1])  ===  voltage(t[0])
and
  t[-1]   ===   t[0]  -  (t[1] - t[0])

the details are not understood,
  but thats certainly better than accessing uninitialized memory.
2012-12-01 10:38:35 +01:00
h_vogt 9d52468471 inpcom.c: plug memory leaks 2012-11-27 23:56:00 +01:00
dwarning 51ec28d174 hisimhv update to version 1.2.3 2012-11-26 23:17:11 +01:00
h_vogt d0f58dc5a6 inpcom.c: prevent invalid memory read/write 2012-11-25 18:27:42 +01:00
dwarning c1705e32ae change model name from hisimhv to hisimhv1 2012-11-25 17:59:50 +01:00
dwarning 67aaf6a26e rename directories hisimhv --> hisimhv1 2012-11-25 17:52:46 +01:00
dwarning 6abd2e2c0c gnuplot.c: allow png terminal by gnuplot_terminal variable 2012-11-21 22:12:27 +01:00
dwarning 79119b3372 update hisim to version 2.7.0 2012-11-21 20:36:52 +01:00
Francesco Lannutti 0d0426e05c b3ld.c, b4ld.c, b3v32ld.c: charge computation for MODEDCTRANCURCE instead of MODEDC
this is a fix for commit:
b3ld.c, b4ld.c, b3v32ld.c: enable capacitance calculation during dc sweep
2012-11-21 19:30:43 +01:00
h_vogt a581c3b43f mif_inp2.c: bug 3389072 fixed 2012-11-19 23:06:39 +01:00
h_vogt b676a73167 beautify code 2012-11-19 21:48:13 +01:00
h_vogt a419712eca inp.c: pre_<command> to allow command execution from the .control section before parsing the circuit 2012-11-17 16:30:17 +01:00
rlar 843126d9a6 fix `make dist' 2012-11-16 22:29:55 +01:00
h_vogt e4af384d7b outitf.c: do not call clock() if MS Windows GUI 2012-11-07 22:17:16 +01:00
rlar 451c121dd5 improve commit `variable.c: add strict error handling' 2012-11-07 19:38:28 +01:00
dwarning b7080fdbb7 make the level switch compatible for HiSIM2 and HiSIMHV 2012-11-07 11:35:51 +01:00
dwarning 13e1a7a5b9 rm whitespaces 2012-11-07 11:33:07 +01:00
Francesco Lannutti 952f55866e remove "error.h" from Makefile.am
this file is not anymore in the "frontend" folder
and "make dist" failed to generate the tarball
2012-11-06 23:55:49 +01:00
dwarning 44786a490b fix a leak in devmodtranslate 3 terminal section 2012-11-06 20:56:27 +01:00
Francesco Lannutti a4e0cfe341 move windows specific `STRICT' definition to canonical place 2012-11-06 19:31:17 +01:00
Francesco Lannutti 1209a5b025 Makefiles, drop some CVS remnants 2012-11-06 19:18:54 +01:00
Francesco Lannutti 6b7f408ca8 avoid a compiler warning, (unused static function) 2012-11-06 19:13:54 +01:00
Francesco Lannutti 32c6a76fc2 Added datarootdir variable as usual behavior and to avoid autoconf warning 2012-11-06 10:38:44 +01:00
Francesco Lannutti 99296c9530 Solved linking error for ngsconvert after ft_stricterror patch in src/frontend/variable.c 2012-11-06 10:32:46 +01:00
Francesco Lannutti b361dee4cc fix #include <> versus "" 2012-11-05 21:34:54 +01:00
rlar 9976c1e177 XSPICE, install dlmain.c
for separate compilation of XSPICE user models
2012-11-05 21:23:52 +01:00
dwarning 082a3e92ae allow more then 4 terminal mos models in subckts 2012-11-05 18:16:55 +01:00
h_vogt d5a2a361f6 variable.c: add strict error handling 2012-11-04 14:16:27 +01:00
h_vogt 85244d0222 inpcom.c: remove bug in inp_add_series_resistor(),
prevent crash in inp_remove_ws() upon erroneous input
2012-11-04 14:15:37 +01:00
h_vogt 5c4f8946f6 inp.c: avoid crash if setparse() returns NULL 2012-11-04 14:12:03 +01:00
h_vogt d8d8cf147e spiceif.c: correct types being loaded by snload() 2012-11-03 16:24:01 +01:00
h_vogt 65b976dab7 rename commands 'savesnap', 'loadsnap' to 'snsave', 'snload'
to avoid conflict with command 'save'
2012-11-01 14:41:13 +01:00
rlar ff2138b186 hisim2, bug fix, a numerical problem in the hisim2 and hisimhv models
First seen when compiled with gcc-4.6.2 -g -O1

The macro `Fn_SZ' which boils down to
  1/2 * (x + sqrt(x*x + c*c))
was used in a context where a negative result
  blew up the following computations.
(used to compute `Egidl', which is used to
 compute exp(-1 / (Egidl + small_constant)))

For large negative values of x the computation
boils down to
  1/2 ( x + almost(|x|) )
where the summands almost cancel each other,
sometimes yielding a small negative result.

small_constant was too small to avoid a big
  result for -1/(Egidl + small_constant)
yielding an `inf' during the exp() computation,
which was later multiplied with a `0'
  yielding a NaN,
which was carried forward
  during the rest of computations.

Because the error of the cancellation scales
with the magnitude of x, no larger `small_constant'
could have avoided the problem.

Presumably the problem was amplified
  by a mixture of precisions (double versus extended float)
  of intermediate values.
(the program wasn't compiled for sse)

( x was -2.812500e+06,
  c was  1.000000e-02,
  Fn_SZ result was -1.853095e-11

  thus the cancellation remainder
  was of relative size
    6.6e-18
  which is approximately
    2^-57
  and thus more accurate
   as a `double float' could have delivered
)
2012-11-01 23:04:51 +01:00
rlar 0c0f21faaf hisim2, use TMALLOC, funcall, and NULL casts 2012-11-01 22:53:43 +01:00
rlar a7a2ff0f7b hisim2, fix NevalSrc(), Nintegrate() redeclaration 2011-05-22 10:16:08 +00:00
h_vogt a57361333a inpcom.c: add series resistor to each inductor with option rseries=1m 2012-10-29 23:13:20 +01:00
h_vogt c53f74ee5f com_ghelp.c: better message for help under Windows 2012-10-29 23:09:35 +01:00
Francesco Lannutti 08ec219417 remove all .cvsignore files 2012-10-26 18:30:14 +02:00
Francesco Lannutti 1dc70189a7 remove compilation warnings (type casts) 2012-10-26 18:04:44 +02:00
Francesco Lannutti d8b2ac56a3 rename "bsim3soi" device to "bsimsoi" 2012-10-26 17:56:59 +02:00
rlar 2142d39506 remove adms3 #2/2, files 2012-10-25 18:54:09 +02:00
rlar ba131a5077 remove adms3 #1/2, code
due to license issues, and with the aim to approach the next
  ngspice release 25
we have to move this over to a development branch
2012-10-25 18:54:09 +02:00
dwarning e75fdab962 hisim2 update to version 2.6.1 2012-10-24 08:54:31 +02:00
Francesco Lannutti fd4c492562 white space changes 2012-10-22 23:06:25 +02:00
Francesco Lannutti 5f34eb2729 white space changes 2012-10-22 23:06:25 +02:00
Francesco Lannutti c23bd59c44 removed ancient PARALLEL_ARCH feature
removed variables
  ARCHme
  ARCHsize

removed functions
  SMPcombine()
  SMPcCombine()
  CKTpartition()

removed files
  spcombin.c
  cktpartn.c

removed struct slots
  STATcombineTime
  STATtranCombTime
  STATacCombTime
  GENowner
  <MODEL>owner
2012-10-22 23:06:25 +02:00
Francesco Lannutti cb0ff8049a white space changes 2012-10-22 23:06:25 +02:00
Francesco Lannutti 3342f58149 bsim3v1/ChangeLog, bsim4v4/ChangeLog: cleanup 2012-10-22 23:06:25 +02:00
rlar a394d79c56 use utf-8 encoding 2012-10-20 21:27:15 +02:00
rlar 2bcadae16c missing newline at end of file 2012-10-20 19:49:10 +02:00
rlar 5d1bc8e55d Changed line-ending from DOS to UNIX 2012-10-20 19:48:48 +02:00
h_vogt 0853c374a1 inpcom.c: require parentheses in ternary functions if numparam
parser is involved (no B sources)
2012-10-17 22:28:49 +02:00
rlar 15606cf281 com_print(), fix a memory leak 2012-10-17 19:51:30 +02:00
rlar 99b0e78c84 DCtrCurv(), fix a memory leak 2012-10-17 19:39:30 +02:00
rlar f038d59fbe mkfnode(), fix a memory leak 2012-10-17 19:39:02 +02:00
rlar 31fa48cf17 com_write(), com_write_sparam(), fix a big memory leak 2012-10-15 20:55:55 +02:00
h_vogt c6e631f30a fourier.c: rename stored vectors 2012-10-15 18:37:07 +02:00
h_vogt ae25f54709 inpcom.c: plug small memory leak 2012-10-15 18:35:12 +02:00
rlar 0336e31c57 vector.c, rewrite vec_basename(), FIXME !
This rewritten code is functionally equivalent to the previous code,
yet the result is queer,
because the char *v_name slot of struct dvec is read
beyond its terminating '\0'

Is there indeed some code in ngspice which creates
v_name strings with an embedded '\0' ?
2012-10-13 19:09:49 +02:00
rlar ebc50b8639 inpcom.c, rewrite 2012-10-13 16:48:15 +02:00
h_vogt 339a002c55 fourier.c: output also to vector feature request tracker no. 3575841 2012-10-13 15:56:19 +02:00
rlar 374b716fdd fourier.c: remove even more memory leaks 2012-10-13 13:25:00 +02:00
rlar a4e167a657 inpcom.c, use strchr() in favour of strstr() 2012-10-13 12:27:20 +02:00