Commit Graph

5844 Commits

Author SHA1 Message Date
rlar caf3115733 cleanup, emphasise CKTrhs being an array
when accessing slot [0]
2018-01-29 19:51:13 +01:00
Holger Vogt 560cb6e970 plotting/grid.c, bug fix, avoid string buffer overflow
Prevent a crash of example/FFT_test.cir.
Buffer 'buf' in function drawlingrid() has been too small.
Increase 'buf' size, and add some protection.

The example file examples/plot/test-small-plot.cir
shows the limits of plotting:
  difference in two numbers at digit 14 is plotted well.
                            at digit 15 is plotted with bugs.
                            at digit 16 is reduced to integer.

consider compiling with
  -O1 -D_FORTIFY_SOURCE=2
for gcc, and
  /GS
for visual studio.
2018-01-27 21:58:15 +01:00
rlar c892b2d460 analysis/acan.c, check for valid startfreq
an 'ac dec' or 'ac oct' can not have a startfreq <= 0
2018-01-20 10:55:26 +01:00
rlar c5d8ad792e analysis/acsetp.c, ac analysis, allow frequency=0 2018-01-15 19:04:52 +01:00
rlar 57a0a5dec0 devices/bjt/bjttemp.c, bug fix, capacity temperature dependency
Fix a very old bug in the implementation of the
  gummel-poon model formulas for the junction capacities.
  (already in spice3f4)
For unknown reasons, the same formulas in the
  diode mos1 mos2 mos6 jfet models
have been implemented correctly right from the beginning,
the typo was bjt specific.

Many Thanks for the concise and precise Bug Report
  provided by Schabo Rumanus on the ngspice-users mailing list
> To: ngspice-users@lists.sourceforge.net
> Subject: [Ngspice-users] Temperatursimulation von Sperrschichtkapazitäten

Many Thanks to Dietmar Warning for his thorough verification
  of this commit.
2017-12-20 18:02:13 +01:00
rlar f0159cbd0b numparam/spicenum.c, stripbraces(), bug fix
overwriting SPICE_DSTRING `dstr_p' may invalidate `s'

This bug was injected with the introduction of SPICE_DSTRING in :
> commit 76feebbbfa
> Date:   Thu Feb 25 21:43:03 2010 +0000
>     various bug fixes
2017-11-13 20:36:49 +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
rlar 3f9e79925e tests/bin/check.sh, process MINGW and MSYS test results like Linux 2017-09-16 20:42:17 +02:00
rlar 91c60c28df whitespace change, avoid gcc warnings due to missleading indentation 2017-09-16 20:38:27 +02:00
h_vogt b3827f6488 gnuplot.c, correct the setting of limits in log plots 2017-09-16 20:37:24 +02:00
rlar e9a675efb6 regression/**/*.cir, hide printed numeric values in some test cases
these tests shall be decided by "exit" value,
not be "diffing" the printed numerical values
2017-09-16 20:32:05 +02:00
dwarning 9f931ad155 modelQaTestRoutines.om, avoid '(' ')' and '/' in the platform name
which will be used as a directory name
2017-09-16 20:30:42 +02:00
h_vogt 927f955156 run ./autogen.sh, if compiling shared ngspice 2017-09-11 00:23:58 +02:00
h_vogt 230bce05cf remove out-of-date comment. 2017-09-09 11:57:34 +02:00
h_vogt a3a0aa2338 add info for generating ngspice shared library 2017-09-09 11:22:24 +02:00
dwarning 2fd3c4d94f fix the still existing wrong array access in psd smooth routine 2017-09-05 11:28:14 +02:00
h_vogt 44efe91e07 compile_min.sh is now executable 2017-09-04 23:03:07 +02:00
dwarning 8316af27cf autosclae for psd plot 2017-09-02 10:25:31 +02:00
h_vogt ca3a9bb648 com_fft.c, correct scaling and filtering for PSD 2017-09-01 23:16:25 +02:00
dwarning 0ef666ea26 com_psd: Correct the special handling of dc and nyquist component in fftw branch 2017-08-26 17:20:19 +02:00
h_vogt 2c0081e5c0 tiny updates 2017-08-25 18:10:09 +02:00
h_vogt f2bb3be222 prepare for ngspice-27 2017-08-24 18:01:05 +02:00
h_vogt 2ea8efa3db Further clarification of the CIDER license status,
table.cm status added.
2017-08-24 17:45:23 +02:00
h_vogt b82401abca New BSD for CIDER 2017-08-24 17:34:47 +02:00
h_vogt fbde62ad1e add info on cross compiling 2017-08-24 11:11:38 +02:00