Commit Graph

7854 Commits

Author SHA1 Message Date
Holger Vogt 57d812afa8 Compiling for macOS
New compile scripts for ngspice executable and shared library,
using gcc-11 from Homebrew.
All relevant options are included (readline, openmp, X11 graphics etc.)
2021-09-29 20:32:02 +02:00
Holger Vogt 34c227815d RKM for C: Revert reading f, it is again femto
Examples files include expected results
2021-09-29 20:31:53 +02:00
Holger Vogt 7f981569d9 Update to RKM if ngbehavior=lt is set:
Reading C and R values follow the RKM convention with 2 exceptions:

    Upper case and lower case letters are not distinguished.

    Letters m, M denote milli (1e-3), letters Meg or meg denote 1e6.
2021-09-29 20:31:44 +02:00
Holger Vogt 6f6f2b8996 Remove double assigment to s[1]
Assignment Is either done in the loop or by *y = '\0';
2021-09-29 20:31:22 +02:00
Holger Vogt daa3609e58 Enable RKM notation for R and C, when ngbehavior LT is selected.
Add 2 evaluation functions specific for R and C respectively.
R has code letters L, R, K, M, G, T enabled. M here is Meg!
C has code letters p, n, u or µ, m, F. F here is unity, femto is
not available, m is still milli!
Two examples files show all cases.
2021-09-29 20:31:14 +02:00
Holger Vogt df5e7e36f6 When checking for µ, truncated the line, when shifted.
Enable R470, when newcompat LT is selected.
2021-09-29 20:30:53 +02:00
Holger Vogt 3dcc36c1c3 ngspice input deck may contain special characters like µ (mu).
Detect mu for ANSI and UTF-8 and translate it to u.
2021-09-29 20:30:35 +02:00
Holger Vogt 4ce4f52938 XSPICE d_source: prevent a crash when the input file is not found 2021-09-29 20:30:10 +02:00
Holger Vogt d4c559421e prevent crash if info.node_table has not been defined,
caused by some preceding error.
2021-09-29 20:29:54 +02:00
Holger Vogt 93f904fb0b Make 'speedcheck' also available in batch mode simulation. 2021-09-29 20:29:36 +02:00
Holger Vogt 5d116d1fb9 command listing: add option r (runable)
listing r > $inputdir/mycirc_runable.cir
will save the expanded netlist without line numbers,
ready to be sourced again and run in ngspice.
2021-09-29 20:29:26 +02:00
Keno Fischer 174f3d9cf9 Add missing rule for ngicon.rc 2021-09-29 20:29:13 +02:00
Brian Taylor 36313d59f3 Use the current point number as the single digit index for Cider 2D ascii save files. This conforms to the normal usage with other types of ascii rawfile. The numd parser table entry for ic.file now has the correct IF_STRING type. 2021-09-29 20:28:59 +02:00
Holger Vogt 3cf6857cfc Fix bug #557
Revise memory allocation for different analysis types
2021-09-29 20:28:43 +02:00
Holger Vogt 601287e949 Check V and I lines for dc and ac.
Allow ac without parameters, a default is set to ac ( 1 0 )
2021-09-29 20:28:15 +02:00
Brian Taylor 81df6ed772 Retaining the mixed case of Cider quoted string valued parameters. Limit searches for ic.file to D*, M*, and Q* device instantiation lines. Cider model (numos, numd, nbjt) detection is limited to .model lines. Continuation lines which do contain these tokens are not checked, but this should rarely happen. All of the examples/cider circuits meet these assumptions. Memory errors have been removed. 2021-09-29 20:27:29 +02:00
Holger Vogt 3599c189b6 re-enable lower-casing of tokens beginning with 'cd',
except for command 'cd' which is usually followed by a space.
2021-09-29 20:27:05 +02:00
Holger Vogt 0266bd5894 make PTparse error message more verbose:
include point in a line where parsing failed.
2021-09-29 20:26:42 +02:00
Holger Vogt 0817d86f33 No oscillation: Add a starting pulse 2021-09-29 20:23:43 +02:00
Brian Taylor abad190b38 Don't search for ic.file within comments. 2021-09-29 20:23:26 +02:00
Brian Taylor b3a99f0c6c Do not use non-portable strcasestr. 2021-09-29 20:23:08 +02:00
Brian Taylor 663a79dea8 Fix NAN error in numd2 area report and crashes when a doping file is missing. Update examples/cider so that the test circuits all run; add case sensitivity tests for rootfile and ic.file parameter strings enclosed in a single pair of double quotes. 2021-09-29 20:22:56 +02:00
Holger Vogt 68c5eb2d6b Add resistance sweep error message for failing optran 2021-09-29 20:22:34 +02:00
Holger Vogt 8708b6651b Optran may throw an error message while in temp sweep
and optran fails: message added (in addition prevent a crash)
2021-09-29 20:22:15 +02:00
Holger Vogt 04a902ddf7 add potran to spinit d 2021-09-29 20:22:01 +02:00
Holger Vogt 1b3e192bfd errno needs to be nulled in Linux.
Its previous value will be returned after checking.
2021-09-29 20:21:39 +02:00
Holger Vogt e84c210876 'Option interp' and command 'stop' have been incompatible.
Allow both in a run.
Issue note (however not checked) that stop time data have to fit
the inpolated times.
2021-09-29 20:21:23 +02:00
Holger Vogt e35e3e3b33 prevent a crash, e.g. when incompatible 'option interp'
is set and 'stop' is called.
2021-09-29 20:20:52 +02:00
Holger Vogt a180eb60d5 command 'wrnodev'
Write current node voltages to file in format .ic=value
The file may be used to set initial conditions for another simulation,
e.g. ac at a specific time step of a transient simulation.
2021-09-29 20:20:27 +02:00
Holger Vogt 7f4fc2948b Add a line feed to make message more readable. 2021-09-29 20:20:00 +02:00
Holger Vogt fac1d3a79c ASRC (B-Source) error message is cryptic, as it does not tell
which B-Source failed.
Add a hint to the ASRC error message on the name of the
B-Source instance.
2021-09-29 20:19:38 +02:00
Holger Vogt 4667a74389 Adapt gtkwave plotting to the various OSs.
macOS still needs some improvement.
2021-09-29 20:19:19 +02:00
Holger Vogt 18478380ad Revise the SOA and add new parameters:
pd_max id_max idr_max te_max rth_ext derating
rth_ext is currently not used
2021-09-29 20:17:55 +02:00
Holger Vogt 3f322e1954 Add a check for sys/sysctrl.h, which has been declared deprecated,
and which may not be available (in the future) on some systems.
2021-09-29 20:17:23 +02:00
Holger Vogt 3b245ddd82 VDMOS, prepare SOA with new parameters
Model parameters pd_max, id_max, idr_max, and te_max
(power dissipated, drain current, drain reverse current, temperature)
2021-09-29 20:17:03 +02:00
Holger Vogt aeafe4bd49 Update to the optran circuit examples:
TLV9002-test.cir: Rely on optran from spinit
TLV6001-test.cir: Override optran from spinit
2021-09-29 20:16:32 +02:00
Holger Vogt 4a1f7f950c spinit: add optran to the standard inits 2021-09-29 20:16:09 +02:00
Holger Vogt 00f530c9cb Add MOS model cards 2021-09-29 20:15:55 +02:00
Holger Vogt 7c84e3f993 SOA for bipolar
Replace pow_max by pd_max
2021-09-29 20:15:41 +02:00
Holger Vogt f06496c912 Enable command 'optran' in spinit or .spiceinit,
when the circuit is not yet loaded.
Then the optran data are stored in static variables,
until optran is called again with arg NULL from inp.c,
to set the data in ft_curckt->ci_defTask.
2021-09-29 20:15:13 +02:00
Holger Vogt a225ce2aaf List definition needs spaces between ( and next token,
and between token and )

Update to comment.
2021-09-29 20:14:45 +02:00
Holger Vogt 04080c2ab3 Add short description of the new examples 2021-09-29 20:14:26 +02:00
Holger Vogt f40e6b9357 Linux line endings (LF only) 2021-09-29 20:14:17 +02:00
Holger Vogt 70ba37b149 Example OpAmp which converge for op only with optran:
TLV6001 and TLV9002
2021-09-29 20:14:05 +02:00
Holger Vogt b20ac16093 remove old files 2021-09-29 20:13:53 +02:00
Holger Vogt 03d956cbfa Example file with three dual opamp filters.
Different opamps: TL072, OPA1656, OPA1612
2021-09-29 20:13:35 +02:00
Holger Vogt 8dcb1f901a Three OpAmp Example for optran 2021-09-29 20:13:18 +02:00
Holger Vogt 8c5c8da2a7 line endings LF (Linux) 2021-09-29 20:13:04 +02:00
Holger Vogt 493cf73f7f optran is only selected when the 'optran' command has been processed.
If not, the call to the OPtran() function returns the previous
'converged' value.
2021-09-29 20:12:52 +02:00
Holger Vogt 7f1fdd3934 Don't do optran, if command optran is not given. 2021-09-29 20:12:31 +02:00