Commit Graph

178 Commits

Author SHA1 Message Date
h_vogt 00d88d28ce prevent crash if files for debug-out could not be opened,
e.g. due to missing permission
2016-11-12 17:28:56 +01:00
rlar 9b80badbd0 cleanup rem_tlist() 2016-11-05 20:32:59 +01:00
rlar 709512f733 drop set_tlist, minimize usage of globals modtlist and devtlist 2016-11-05 20:32:59 +01:00
rlar 9f66aca9d4 tail, better in CKTcircuit, oh no, needs to access symboltab 2016-11-05 20:32:59 +01:00
rlar 435a32152d not exactly the same 2016-11-05 20:32:59 +01:00
rlar 46b971aef9 drop condition 'expr_w_temper' when used with devtlist and modtlist
The actual condition is (devtlist || modtlist)
yet functions
  inp_parse_temper_trees()
  inp_evaluate_temper()
can cope with that anyway.
2016-11-05 20:32:59 +01:00
rlar cd6fdbf380 remove excessive inp_evaluate_temper() prototypes 2016-11-05 20:32:59 +01:00
rlar c8ce9d963d inp.c, rem_tlist(), cleanup 2016-11-05 20:32:58 +01:00
h_vogt 3a27cb43ba inp.c, add loop to remove linked lists devtlist, modtlist 2016-11-05 20:32:58 +01:00
rlar d69179ce5e try to fix rem_tlist()
Note:
  struct INPparseTree is an overlay of struct IFparseTree
  very ugly.
2016-11-05 20:32:58 +01:00
h_vogt c9517c397b lists struct pt_temper *modtlist and struct pt_temper *devtlist
contain parse trees handling TEMPER equations in model or instance lines.
Create new lists  upon entering inp_parse_temper().
Save pointers to lists in current circuit ft_curckt.
Upon changing circuit, reload lists from ft_curckt.
Upon removing current circuit, delete lists.
2016-11-05 20:32:58 +01:00
rlar fa63b66c81 rename gettok_nc() --> nexttok(), and functionalize it 2016-11-05 20:32:57 +01:00
h_vogt aa13929dde inp.c, sharedspice.c, enable adding scripts by 'circbyline' 2016-11-05 20:32:54 +01:00
h_vogt 6704c04a42 inp.c, randnumb.c, option seedinfo
Print seed information only when option is set.
2016-11-05 20:32:53 +01:00
h_vogt 0b39676549 inp.c, enable .option seed=val || random || 'random'
setting the seed value of the random number generator either to val
or to a random number drawn from the amount
of seconds passed since 1.1.1970
May be overrideden at any time later by command 'setseed newval'
2016-11-05 20:32:53 +01:00
h_vogt eb65ff8ec8 inp.c, xpressn.c, cmath2.c, apply gauss1() instead of gauss0()
-> reproducible start value if 'set rndseed=val' is given.
2016-11-05 20:32:41 +01:00
h_vogt 4f49cd743a inp.c, correction for shared ngspice 2016-11-05 20:31:55 +01:00
h_vogt a185be81c4 inp.c, shift agauss evaluation before subckt substitution. So parameters with agauss are set once only for all devices. 2016-11-05 20:30:28 +01:00
h_vogt 06adfa3753 Store the numparam dicoS structure for each circuit in a list.
Functions to add, remove, retrive dicoS from the list and to
update dicoS, if the circuit has been changed.
Keeping dicoS is necessary because it may be used by measure.
This patch prevents (huge) memory leaks by overwriting dicoS
if multiple calls to the 'source' command are executed.
2016-11-05 20:30:05 +01:00
h_vogt d7deb374e6 replace function name eval_agauss_bsource by eval_agauss to reflect its actual usage 2016-11-05 20:30:05 +01:00
h_vogt dc8494a1b1 inp.c, add .param lines to evaluation of agauss etc. 2016-11-05 20:30:05 +01:00
h_vogt 9ae9968902 inp.c, incom.c: enable evaluation of all statistical functions agauss, gauss, aunif, unif, limit
inp.c: agauss in MC with prof. libraries, second part: after subcircuit expansion, replace all agauss occurrencies in b-lines by their respective return value of fcn agauss()
2016-11-05 20:27:43 +01:00
h_vogt 7f80087060 inp.c: agauss in MC with prof. libraries, second part: after subcircuit expansion, replace all agauss occurrencies in b-lines by their respective return value of fcn agauss() 2016-11-05 20:27:43 +01:00
h_vogt b7e87b5702 new command 'alterparam', to be used in conjunction with 'mc_source'
add command 'alterparam paramname=pvalue'
  to change a global .param

add command 'alterparam subcktname pname=vpval'
  to change a parameter inside of a subcircuit
2016-11-05 20:27:23 +01:00
h_vogt f42e49770b new command 'mc_source' to internally reload circuit
We store a copy of the whole deck in 'mc_deck'.
'mc_source' can be used to re-read this copy.
2016-11-05 20:26:54 +01:00
h_vogt 6a0a6071a0 gettok_nc(&line): like gettok(), move pointer beyond next token in line, but without returning a string, without TMALLOC. Replaces constructs like tfree(gettok(&line)). 2016-10-15 15:06:20 +02:00
rlar b302dbe975 inp.c, cleanup using new function `line_nconc()' 2016-10-15 15:06:16 +02:00
h_vogt c28c5d307a inp.c, remove bug with handling of options: options stemming from a command file are kept, options from sourced circuit are removed with ckt 2016-10-15 15:06:03 +02:00
h_vogt 81e1e6fa32 inp.c, inpcom.c, treat files starting with '*ng_script' as command files 2016-10-15 12:59:16 +02:00
h_vogt 6535558f9e inp.c, plug memory leak 2016-10-15 12:59:13 +02:00
h_vogt 9f62057973 introduce include file "ngspice/randnumb.h" 2016-08-15 11:30:26 +02:00
h_vogt 33b11f9598 comments improved 2016-08-15 11:26:55 +02:00
rlar c0513ed573 inp.c, rewrite inp_savecurrents() 2016-07-26 20:18:33 +02:00
h_vogt 893157b11f inp.c, inp_savecurrents(), remove a memory leak 2016-07-20 20:02:21 +02:00
rlar 5e04924890 cleanup `skip_ws()' usage 2016-03-22 15:26:11 +01:00
rlar b1d8b99018 skip-ws, #6/6, rename to match inpcom.c 2016-03-22 15:26:10 +01:00
rlar 22875d056b skip-ws, #5/6, use functional style 2016-03-22 15:26:09 +01:00
rlar d12679fccd skip-ws, #4/6, drop `TEMPORARY_SKIP_WS_X0'
use TEMPORARY_SKIP_WS_X1 instead of TEMPORARY_SKIP_WS_X0
2016-03-22 15:26:08 +01:00
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 1ad65120d5 skip-ws, #1/6, prepare for rewrite, obj-invariant 2016-03-22 15:26:04 +01:00
rlar 1578348fdf frontend/inp.c, inp_evaluate_temper(), fix memory hole 2016-03-22 15:25:43 +01:00
rlar cc8f84ab84 frontend/inp.c, inp_parse_temper(), bug fix, prevent multiple free'ed memory 2016-03-22 15:25:39 +01:00
rlar c9ee5a4501 frontend/inp.c, inp_parse_temper(), rewrite linked list insertion 2016-03-22 15:25:33 +01:00
rlar 4c1c95e20f everywhere, use `TMALLOC()' instead of `alloc()' 2016-03-21 21:22:07 +01:00
rlar 71a7c3459b use char variants of the <ctype.h> isxxxx() family 2016-03-09 20:24:36 +01:00
h_vogt eef5a058d2 inp.c, disable command `edit' unless `interactive' has been set 2016-02-07 17:36:54 +01:00
rlar cd7e77d21f src/frontend/inp.c, avoid warning, drop nested local `wl' 2015-12-17 21:45:18 +01:00
rlar fc6455ca99 inp.c, bug fix, `temper' in a model parameter, missing INPretrieve() invocation
The model name needs to be transformed into a `IFuid'
  before it can be searched for with `findModel()'

see tests/regression/temper/temper-1.cir
2015-08-10 17:52:21 +02:00
rlar 5ac7858a79 rewrite, use tprintf 2015-03-28 20:10:29 +01:00