Commit Graph

2890 Commits

Author SHA1 Message Date
h_vogt 023374fa79 update `making xspice' within actual ngspice 2012-06-12 21:26:27 +02:00
h_vogt 40e8f868da NUMDdump(): add binary mode
fopen() with wb
write operating point (external state) for true binary output
2012-06-12 21:26:27 +02:00
h_vogt 80ca57eb76 beautify code 2012-06-12 21:26:27 +02:00
h_vogt d65259fd45 error return only if variable `error' is set 2012-06-12 21:26:27 +02:00
h_vogt ca8e9b2d2d prevent false outputs of @dev[param], when not defined in ac simulation 2012-06-12 21:26:27 +02:00
h_vogt fe86d3d5c7 Enable ctrl-c to interrupt a simulation also for Windows GUI 2012-06-12 21:26:27 +02:00
h_vogt a820a7cba8 Independent variable `temper' now returns the temperature in degree C 2012-06-12 21:26:27 +02:00
h_vogt a51953d93e allow `time', `temper', and `hertz' in expressions of behavioral R,L,C devices 2012-06-12 21:26:27 +02:00
rlar bde3536ecc subckt.c, doit(): fix another memory leak 2012-06-12 21:26:27 +02:00
rlar e3402554f0 subckt.c, doit(): fix a memory leak 2012-06-12 21:26:27 +02:00
h_vogt dcde15afd2 exclude circuits with XSPICE 'A' devices from using 'savesnap'
XSPICE data storage is not yet implemented
2012-06-12 21:26:26 +02:00
rlar 58b0614467 fix memory leaks in ASRC and in INPgetTree()
implement a reference counter `usecnt' for the elements
  of the `INPparseTree'
2012-06-12 21:26:26 +02:00
rlar 4fb75fbd51 INPgetTree(), express the live range of some globals 2012-06-12 21:26:26 +02:00
rlar d21b3a3cd5 mkfnode(), minor rewrite 2012-06-12 21:26:26 +02:00
rlar e889c821d1 configure.ac, fix `NO_X' and `has_no_help'
drop configure options `--enable-x' and `--disable-x'
use `--with-x' and `--without-x' provided by AC_PATH_X

bug tracker item:
  [ngspice-Bugs-3515015] Startup error message without x11
  https://sourceforge.net/tracker/index.php?func=detail&aid=3515015&group_id=38962&atid=423915
2012-04-06 16:19:49 +02:00
rlar 7641450b29 inpptree.c, fix differentiation of PTF_FLOOR PTF_CEIL and PTF_POW 2012-04-05 21:55:44 +02:00
rlar 149345068f update bison generated files 2012-04-05 21:33:54 +02:00
rlar 3bb2bd8e05 fix memory leak in PTparse() 2012-04-05 21:30:41 +02:00
rlar 15bda2b9e0 fix memory leak in PPparse() 2012-04-05 21:30:05 +02:00
rlar 76336fa21b fix memory leak in cp_vset() 2012-04-05 21:25:04 +02:00
rlar 9a75774e36 inpptree.c, polish comments 2012-04-05 21:24:48 +02:00
rlar 42653f7c3d inpptree.c, fix premature memory allocation 2012-04-05 21:24:25 +02:00
Michael Woodworth 3375e1b976 fix a memory leak in parse_line()
This has a HUGE affect on memory usage
2012-04-05 20:49:09 +02:00
h_vogt 8b780fa42b bug_fix: R,L,C instantiations, tc1, tc2, numbers followed by `:'
Ternary function was not recognized in R, C, or L lines
  if no voltage or current node was part of the expression,
  because then B-Source is not used.
In these cases now inp_fix_ternary_operator_str() is called explicitly.

tc1, tc2 were sometimes recognized falsely,
  if part of a token e.g. tc1end.

R, C, and L models are never commented out,
  because their names may be token no. 4 or 5 in an R, C, or L line,
  and will not be recognized if 5.

INPevaluate() will now correctly evaluate a number if followed by ':'
  (number may be part of the ternary function).
2012-03-31 23:42:37 +02:00
h_vogt 232270cbc4 bug fix, inp_bsource_compat(): `tc1=' `tc2=' `reciproctc=' `}'
don't substitute `tc1=' `tc2=' `reciproctc='
don't fail when processing tokens followed by `}' chars
2012-03-30 22:56:15 +02:00
rlar e91e3c4ec7 lingrid(), avoid buffer overflow
Bug ID: `Buffer overflow detected - ID: 3510521'
    reported by Zsolt Makaró

  The variable `mag3' sometimes seems to take
    unexpected values
    (for example log10 can be -Inf, which will be casted to 0x80000000)
  and seems then to have overflown a buffer buf[LABEL_CHARS]
2012-03-27 21:07:12 +02:00
rlar 6e829f7cc4 rewrite subckt.c
transform doit() into a true recursive version,
    drop usage of global variables
  reduce scope of many variables
  cleanup and readability

  FIXME,
    an opportunity to plug a memory leak is visible now.
2012-03-25 20:19:42 +02:00
rlar da06afb895 bug fix, numnodes()
in response to the `ex-41.cir' test case
    distilled from a Dietmar Warning Bug report in
      "Subject: Re: subckt, param"

  translate() is called recursively and depends on
    `num of nodes' provided by numnodes().
  numnodes() depends on availability of `su_numargs'.
  But the processing allows non-processing of subckt instantiations
    in inner recursions (which will be processed later)
    which means `su_numargs' is not always available.
2012-03-25 18:54:10 +02:00
rlar a1ea1b3193 round to next nearest integer for the rise, fall and cross arguments of `measure'
Simon Guan reported
  Bug item #3509528, `Meas goes wrong when put in a while loop'

In a .control block a `let' variable was passed to the `measure' command.

The value of this variable would have been a plain integer,
  yet it was converted internally to an internal ascii representation
    with exponential representation  (203 ==> 2.03e2)
  and then processed by `ft_numparse()' where it was converted back to
    double floating point.
  Because the intermediate 2.03 has
    no exact representation in the space of double floating point numbers
    this conversion was lossy and resulted in a non-integer value.
  This non-integer was then truncated towards minus infinity in com_measure
    yielding an error of -1

This commit implements round to nearest in com_measure2
  to avoid the problem.

FIXME,
  the internal intermediate conversion of double floating point machine
    values to ascii representations must be dropped,
  or replaced with an exact/lossless ascii representation.
    (for example GNU printf/scanf %a or 64bit hexadecimal representation)
2012-03-25 11:08:48 +02:00
h_vogt b4516b08ca bug fix, iplot(): Buffer overflow
Thanks to Zsolt Makaró for the bug report in
  Buffer overflow detected - ID: 3510521
  http://sourceforge.net/tracker/?func=detail&aid=3510521&group_id=38962&atid=423915
2012-03-24 18:29:36 +01:00
h_vogt 0a2e031cb1 bug fix, inp_fix_subckt(): problem when parsing a .subckt line
this worked
  .subckt psub a b p2 = {p1*2-1} p1 = 1
but this failed
  .subckt psub a b p2 = { p1 * 2 - 1 }  p1 = 1

thanks to Ivan Riis Nielsen for the report in Message
  [Ngspice-devel] parsing problem (ngspice-24 tarball)
2012-03-24 18:29:36 +01:00
h_vogt 4b1abe0a18 tclspice.c: new functions to get start and final time of a transient simulation 2012-03-24 18:29:36 +01:00
h_vogt 48a08dc63a .gitignore: exclude /release* and /debug* directories 2012-03-17 17:00:46 +01:00
h_vogt 787a6a3581 inp_fix_subckt(): allow spaces in an expression which acts as a parameter 2012-03-17 16:56:30 +01:00
h_vogt f15765bf46 Visual Studio: console and GUI, 32 Bit and 64 Bit newly organized 2012-03-10 00:01:17 +01:00
dwarning 1938041e10 1. Correct the list of binable models. 2. Fix a problem with wrong MOS level entries. 2012-03-01 20:33:06 +01:00
rlar 9f017ea557 .gitignore files 2012-02-26 16:19:58 +01:00
h_vogt 80a039983e dummy functions 2012-02-19 16:38:33 +00:00
dwarning 70e9907415 Add reciprocal temperature behaviour for B sources 2012-02-19 12:55:54 +00:00
h_vogt 8f3f757813 command mrdump 2012-02-19 11:11:31 +00:00
h_vogt dffe4ed156 command mdump 2012-02-19 10:23:56 +00:00
dwarning 862f10dce3 Add temperature coefficients for B sources 2012-02-11 19:52:04 +00:00
dwarning d9561123f9 Add temperature coefficients for B sources 2012-02-11 19:45:25 +00:00
h_vogt 1a7fa85e3c reading incs, libs etc. 2012-02-11 13:14:34 +00:00
h_vogt fc7692a896 outheap removed 2012-02-11 12:50:44 +00:00
h_vogt 5d101f46f9 updates tcl for Windows 2012-02-11 11:59:12 +00:00
rlar 848b0c2158 update bison generated files 2012-02-11 08:18:57 +00:00
rlar 6ea91d2834 upgrade INPgetTree() 2012-02-11 08:17:12 +00:00
rlar 37940c9133 search for tclspinit in `cwd' as well 2012-02-10 16:59:33 +00:00
rlar 86ea7c5290 NG_IGNORE something 2012-02-10 16:57:21 +00:00