Commit Graph

5362 Commits

Author SHA1 Message Date
Holger Vogt 875b875705 adapt project to MSVC 2019 2021-07-12 22:49:15 +02:00
Holger Vogt c494c51781 debug info added:
DB some useful printouts
DB_FULL all addresses created, freed and left over to files
2017-11-06 00:03:14 +01:00
Holger Vogt 4cddf8e5c5 Some comments added 2017-11-05 14:27:01 +01:00
Holger Vogt bdb69d7a3e replace strdup by copy 2017-11-05 14:20:00 +01:00
Holger Vogt fd97074ba1 realloc -> trealloc 2017-11-05 14:19:34 +01:00
Holger Vogt 279cec070c README for this branch 2017-11-05 14:19:11 +01:00
Holger Vogt 5a42a2b6f0 cleaning up is now done from DllMain 2017-11-05 10:45:00 +01:00
Holger Vogt 1894b10ddd Replace calloc by tcalloc 2017-11-05 10:44:08 +01:00
Holger Vogt 4e263cd14a mem_init in DllMain will segfault, FIXME 2017-11-05 10:33:57 +01:00
Holger Vogt f3476862d1 internal tcalloc no longer needed 2017-11-05 10:31:01 +01:00
Holger Vogt 94be38cf93 add tcalloc 2017-11-05 10:30:34 +01:00
Holger Vogt 63be4bc81b return without value 2017-11-04 21:57:10 +01:00
Holger Vogt 0f15c7ea8d set path to 64 bit codemodel files 2017-11-04 21:56:25 +01:00
Holger Vogt 190a80c023 set relative path 2017-11-04 21:55:45 +01:00
Holger Vogt c6bc7b937e Add function nghash_delete_special()
that returns the pointer if not successful
2017-11-04 18:33:29 +01:00
Holger Vogt 1747f47f9a Apply mem_delete() and mem_init()
Use entry function DllMain or
__attribute__((constructor)), __attribute__((destructor))
2017-11-04 18:19:10 +01:00
Holger Vogt d2ec748984 beautify the code with AStyle 2017-11-04 18:15:12 +01:00
Holger Vogt ff94368d56 apply memdeleted(), memsaved() 2017-11-04 17:18:38 +01:00
Holger Vogt c190eb3470 add function to store or delete hash table for memory address storage
and functions to store memory address to or delete from hash table
2017-11-04 16:56:22 +01:00
Holger Vogt 192a04be85 add function tcalloc 2017-11-04 16:41:06 +01:00
Holger Vogt cb4b230236 add function tcalloc 2017-11-04 16:38:40 +01:00
Holger Vogt 824ce581e6 replace malloc by tmalloc 2017-11-04 16:26:23 +01:00
Holger Vogt 8362809e2d free -> txfree 2017-11-04 15:56:35 +01:00
Holger Vogt 338e1bf6fa replace free() by tfree() or txfree 2017-11-04 15:49:03 +01:00
rlar 84761c125f fix erfc() usage in cider
cider relied on our broken ngspice variant of erfc() which behaved as
  erfc_ngspice(x) = erfc(fabs(x))

Note:
  apart from cider, erfc is used in
    devices/ltra/ltramisc.c
      always with positive argument
  and
    src/frontend/spec.c
      again always with positive argument
Thus, the difference in implementation
 never mathered anywhere except in cider
2017-10-28 12:38:36 +02:00
rlar c900cc8824 drop ngspice internal implementation of erfc()
which these days is guaranteed to be provided by <math.h>

note,
  our own implementation was incorrect anyway.
  it evaluated to
    erfc_ngspice(x) = erfc(fabs(x))
2017-10-28 12:38:32 +02:00
rlar ca57447f6c fix commit "devices/bsim3v32: apply Area Calculation Method (ACM) to the bsim3v3.2.4 model"
which moved processing of several parameters into a new function
  ACM_SourceDrainResistances()
but did so incompletely.

As a consequence the matrix footprint was not correctly modified
 when source or drainresistance is zero

Thanks for the bug report by "Sto" in message
>  bug: mosfet models with deliberate NRD=0 (ngspice-27)
https://sourceforge.net/p/ngspice/discussion/133842/thread/fa39228d
2017-10-21 20:22:43 +02:00
Holger Vogt f868418d13 ACM_SourceDrainResistances(), fix misleading signature
This function does return resistance, not conductance.
2017-10-21 20:21:34 +02:00
rlar 57f3d35ddc devices/res, #6/6, rename variables back to their original names
strip the X in RESconductX, REScurrentX, RESacConductX
2017-10-21 19:05:28 +02:00
rlar 93ab0fb0e0 devices/res, #5/6, RESconduct, include RESm
Henceforward RESconduct (renamed to RESconductX) shall include factor RESm.
That's a mere rewrite and doesn't change functionality.
2017-10-21 19:05:28 +02:00
rlar afd5147f98 devices/res, #4/6, RESacConduct, include RESm
Henceforward RESacConduct (renamed to RESacConductX) shall include factor RESm.
That's a mere rewrite and doesn't change functionality.
2017-10-21 19:05:28 +02:00
rlar 6941c43673 devices/res, #3/6, RESacConduct, collect RESm
Reshape the sourcecode to emphasize the RESm * RESacConduct affiliation.
That's a mere rewrite and doesn't change functionality.
2017-10-21 19:05:28 +02:00
rlar 7edd241e96 devices/res, #2/6, RESconduct, collect RESm
Reshape the sourcecode to emphasize the RESm * RESconduct affiliation.
That's a mere rewrite and doesn't change functionality.
2017-10-21 19:05:28 +02:00
rlar 5b23f0c684 devices/res, #1/6, REScurrent, include RESm
Henceforward REScurrent (renamed to REScurrentX) shall include factor RESm.
That's a mere rewrite and doesn't change functionality.
2017-10-21 19:05:28 +02:00
rlar f73a353d6b devices/res/resnoise.c, cleanup using pow() 2017-10-21 19:05:28 +02: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 cffab98882 devices/res/resparam.c, bug fix, alter resistance not honoured when resuming a transient simulation
When "alter" is invoked after a break-point stopped a transient simulation,
then it might be necessary to update RESconductance
before continuing the transient simulation.

Thanks for the bug report to An Zou
in message "alter resistor value" on the ngspice-users forum
https://sourceforge.net/p/ngspice/discussion/133842/thread/33ce6855/
2017-10-21 19:05:28 +02:00
rlar 480a3f6be1 tests/regression/misc/resume-1.cir, expose bug
alter "resistance" and "resistor coefficient"
  is not honoured when resuming a transient simulation.
2017-10-21 19:05:28 +02:00
rlar 0e1294b3b5 devices/res/resparam.c, whitespace and parenthesis 2017-10-21 19:05:27 +02:00
rlar 0a48e6f2a7 devices/res, introduce RESupdate_conduct()
which will be usefull later
2017-10-21 19:05:27 +02:00
rlar 0af576a7d8 devices/res/resask.c, bug fix, set and query of RESresist and RESacResist shall comute
Note:
  RESresist and RESacResist are device parameters
     they do not reflect effective resistance when "ask"'ed
     (don't reflect tc1, tc2, tce, m, scale, temp ...)
  RESconduct and RESacConduct are "query-only" parameters
     these report the effective conductance when "ask"'ed
     (including tc1, tc2, tce, m, scale, temp ...)
2017-10-21 19:05:27 +02:00
rlar 1c5e954b47 devices/res, bug fix, semantics of "short" and "narrow", aka "dlr" and "dw"
These need to be subtracted from both sides
2017-10-21 19:05:27 +02:00
rlar e0126a4947 tests/regression/misc, check resistor flicker noise 2017-10-21 19:05:27 +02:00
Fabio Rossi 4c503c1e47 src/tclspice.c, bug fix, broken trimming of the "spice::" namespace
Due to a missing break in the for(;;) loop,
  causing the loop to walk beyond end of string argv[0],
  causing random behaviour.
2017-10-19 17:58:02 +02:00
rlar 06f2ce9087 examples/tclspice, cleanup "wish" trampoline and add emacs mode specification 2017-10-19 17:57:37 +02:00
rlar fad7605c21 examples/tclspice, rename test bench scripts, .tcl --> .sh
Customers have been mislead to invoke them with tclsh or wish.
Actually some are indeed tcl scripts which could be invoked with "wish"
All these scripts include a #!/bin/sh trampoline to the proper interpreter.
No script was meant to be interpreted by tclsh
2017-10-19 17:57:03 +02:00
rlar f3fd53769c configure.ac, search for BLT library
search for three variants
  -lBLT       (for debian and gentoo)
  -lBLT24     (for redhat and centos)
  -lBLT25     (might be usefull for someone else)

The advertised configure incantation is now:
  configure --enable-shared=yes --with-tcl=/usr/lib/tcl8.6
In case you need a special "BLT" you can still use
  LIBS=-lBLTfoobar configure --enable-shared=yes --with-tcl=/usr/lib/tcl8.6
to override the automatic search
2017-10-19 17:55:43 +02:00
dwarning 22599ca096 examples/tclspice, explicit blt::vector create
in blt2.5 "create" is not the default vector operation anymore
2017-10-19 17:50:34 +02:00
dwarning 8539029e6d reduce simulation time for tcl examples 2017-10-12 11:22:17 +02:00
Francesco Lannutti af7ab797c2 build-for-mac-os.sh, script to build ngspice under MacOS 2017-09-17 08:48:28 +02:00