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.
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.
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
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
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))
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
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.
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/
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 ...)
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
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