Commit Graph

7515 Commits

Author SHA1 Message Date
Holger Vogt d0da4bebd3 make variable 'dir' local 2021-07-05 14:10:44 +02:00
Holger Vogt 11d3188e19 fix typo 2021-07-05 14:10:20 +02:00
Holger Vogt 4fd7de9e34 Partially re-introduce and improve code that has been
inadvertently deleted in commit

83592c456 ("unify the evaluation of '.options scale=xx'
.option in a netlist will override 'options' from spinit,
.spiceinit or a script '.options scalm=xx' yields a warning,
it is not supported.", 2021-04-05)

The code transforms the option statements and adds them
to the current circuit.
2021-07-05 14:09:56 +02:00
dwarning 6bafdf70d5 sub-coll junction calculation only if ISS given 2021-07-05 14:09:35 +02:00
Holger Vogt 3a908c76ef Prevent crash, refName may be NULL 2021-07-05 14:08:41 +02:00
Holger Vogt 98f8a4fcb2 Improve error message, if occuring during op 2021-07-05 14:08:25 +02:00
dwarning 4ca4b43801 simplify while loop for subckt diode and bjt models 2021-07-05 14:08:02 +02:00
Holger Vogt c8db059144 Use 'm' and 'multi' correctly in PDKs
If there is alraedy m=xx in a subcircuit instance line,
replace it by m='m*xx' to aknowledge the additional m.

Tested with an (old) TSMC PDK and with Skywater PDK.
2021-07-05 14:07:46 +02:00
dwarning 1f95e12142 Value stored to vsub is never read 2021-07-05 14:07:26 +02:00
dwarning 52f4244345 fix Vcrit calculation for coll-subs junction and correct tlev=3 temperature model 2021-07-05 14:07:14 +02:00
dwarning b00fa921ac rm depreciated storage class 2021-07-05 14:06:52 +02:00
Holger Vogt da6d2dd781 Bug 548: Add support for mawk in autogen.sh 2021-07-05 14:06:40 +02:00
dwarning e14dc3aaa3 few style cleanings 2021-07-05 14:06:28 +02:00
Holger Vogt 109e33f127 Improve font selection for Win GUI plot window
Font Names from
https://docs.microsoft.com/en-us/typography/fonts/windows_10_font_list
without option or with Bold or Italic are supported, e.g.
setcs wfont="Cambria Bold Italic".
2021-07-05 14:06:06 +02:00
Holger Vogt 80e5f67466 Reduce wchar_t string length to minimum required
(to be NULL-terminated for CreateWindowW)
2021-07-05 14:05:33 +02:00
Holger Vogt c9a19c7569 Fix for bug 547
Reduce length of wchar_t strings to the minimum required
for conversion

Check if Bold or Italic is given in the font name, set
corresponding variable
2021-07-05 14:04:09 +02:00
Holger Vogt 897d4c598b Upgrade due to recent ngspice enhancements 2021-07-05 14:03:55 +02:00
dwarning 45e397727b rm dead assignments 2021-07-05 14:03:38 +02:00
Holger Vogt d2f6ad239f If the input file path contains ANSI-encoded special characters,
utf-8 conversion and thus file opening will fail.

This patch then in addition tries opening the file with standard fopen.
2021-07-05 14:03:21 +02:00
Holger Vogt ba262eaa5f Internal global variable Infile_Path is a file search path made
available for the code models. It is set when command 'source' is used.

This patch makes the first entry in var 'sourcepath' available to
the code models as well by setting Infile_Path, when 'sourcepath'
is set in .spiceinit.
2021-07-05 14:02:51 +02:00
dwarning a08f120518 TEMPFORMAT has already leading / in defines.h 2021-07-05 14:02:21 +02:00
dwarning 64c407332d rm dead assignemnts 2021-07-05 14:02:04 +02:00
dwarning 9b2f3cfd5e iter value never read - prevent compiler warning 2021-07-05 14:01:26 +02:00
dwarning 4e86cfa352 diode cbv only needed for tracing - prevent compiler warning 2021-07-05 14:01:09 +02:00
dwarning 2b2e40793e correct indentation 2021-07-05 14:00:44 +02:00
Holger Vogt 741cab390f Prevent a crash when the number of models exceeds MODNUMBERS
Raise MODNUMBERS to 2048

https://github.com/kicad-spice-library/KiCad-Spice-Library/issues/16
2021-07-05 13:59:53 +02:00
Holger Vogt 66cbac3f4e Fixes a bug introduced by commit [4895a4]
Re-enables R with .model like
.model R_NOISELESS RES (TCE=0 T_ABS=-273.15)
R77 1 0 R_NOISELESS 100
2021-07-05 13:59:24 +02:00
dwarning b1bf7ea0ad Diode model with selfheating option 2021-07-05 13:58:51 +02:00
Holger Vogt 48acb10929 Remove compiler warnings 2021-07-02 11:58:30 +02:00
Holger Vogt e91ec306ba Remove some compiler warnings 2021-07-02 11:58:10 +02:00
Holger Vogt 2536b78acb Allow tailing '\0'
Remove potentially user induced buffer overflow by replacing
sprintf by snprintf.
2021-07-02 11:57:30 +02:00
Holger Vogt 053e8c5a04 remove compiler warning 2021-07-02 11:56:29 +02:00
Holger Vogt d5fd9c8625 correct function prototype 2021-07-02 11:56:14 +02:00
Holger Vogt 45c171635a Remove compile error which may occur with specific settings 2021-07-02 11:55:28 +02:00
Holger Vogt 19ddeb8fe6 formatting (not complete) 2021-07-02 11:54:59 +02:00
Holger Vogt 545d2f9177 Report an error when trying to define ports
'v', 'vd', 'i', and 'id' as 'inout'
Parch 105 provided by  Giles Atkinson
2021-07-02 11:54:34 +02:00
Holger Vogt bc74caca2f Don't create cat2strings if on VS2019 2021-07-02 11:54:06 +02:00
Holger Vogt d19c8e7f41 Efficiency: Remove setting the random seed to behind the options selection
Evaluate '.options cshunt=xx' earlier to allow the following:
Set the option by calling INPpas4() during parsing the circuit,
before .ic is set.
Ckt and Task cshunt are still set, but their values are available
only too late for INPpas4(), but may be used by command 'option'
(w/o parameters) for assessing the options and their values.
2021-07-02 11:53:42 +02:00
Holger Vogt 32204bffe0 enable cshunt for MS Windows fftw and shared ngspice 2021-07-02 11:53:15 +02:00
Holger Vogt 911b50fa8f Adding capacitors, one per voltage node 2021-07-02 11:52:45 +02:00
Holger Vogt f8357dad88 Prepare Cshunt: add a cpacitor to each voltage node
Function inppas4() will add the extra caps, to be done.
2021-07-02 11:52:15 +02:00
Holger Vogt db5c6cd0ec Add some comments for inppas1,2,3 2021-07-02 11:51:57 +02:00
Holger Vogt d07fab904c Speed enhancement while reading large PDKs:
Line concatenation used tprintf, which uses vsnprintf,
which is very inefficient in Linux, MINGW, but efficient
using MSVC. Thus for the others a function cat2strings() is
introduced, which uses memccpy().
2021-07-02 11:51:18 +02:00
Holger Vogt e2cf397b6d Restrict the limit for exp function (linear growth when exponent
is larger than 14, commit [93a76d]) to the PSPICE compatibility
mode.
2021-07-02 11:50:42 +02:00
Holger Vogt 8da2f3c16d unify the evaluation of '.options scale=xx'
.option in a netlist will override 'options'
from spinit, .spiceinit or a script
'.options scalm=xx' yields a warning, it is not supported.
2021-07-02 11:50:17 +02:00
dwarning 8a04d049ab Correct scaling for area and pj geometry scaled diode (level=3) 2021-07-02 11:49:35 +02:00
dwarning a7cf70e615 Introduce element parameter handling for geometry scaled diode (level=3) 2021-07-02 11:49:21 +02:00
dwarning 56c8a24dd7 Correct parameter handling for geometry scaled diode (level=3) 2021-07-02 11:48:53 +02:00
dwarning 2a55f50192 First attempt for geometry scaled diode (level=3) 2021-07-02 11:48:04 +02:00
Holger Vogt 4bee26b8b9 Remove unused prototype 2021-07-02 11:45:11 +02:00