Commit Graph

7327 Commits

Author SHA1 Message Date
Holger Vogt 059e2b2158 Add function check_for_nodes to
check if there are enough tokens in an instance line.
2024-06-09 17:35:05 +02:00
Holger Vogt 9774a64bf6 Bail out when the instance line is not complete.
Moving on does typically not make any sense.
2024-06-09 17:30:52 +02:00
Holger Vogt 8d854fcbfc Enable monotonic negative growth of abscissa values. 2024-06-09 17:29:57 +02:00
Holger Vogt b3fb5c00b3 Error messages to stderr only.
For MS Windows: Make code model path absolute.
Call LoadLibrary only when *.cm file exists. Until now
spurious return from LoadLibrary prevented error message,
when *.cm was not found, followed by a crash upon 'quit'.
2024-06-09 17:29:24 +02:00
Holger Vogt 08ac17bd0a When reading code models, allow only a single model pere command
(as was implicitely assumed anyway).
2024-06-09 17:25:30 +02:00
Holger Vogt 2874fbae5b Add ft_spiniterror, to be set during spinit processing,as
ft_stricterror will be set only later, when .spiceinit is
executed.
2024-06-09 17:24:26 +02:00
Holger Vogt ed60ccec69 Remove Valgrind "potentially undefined" message. 2024-06-01 15:38:59 +02:00
Holger Vogt a72696959f Enable coupling of more than 2 inductots in a single line:
K1 L1 L2 L3 L4 L5 0.99
2024-05-30 14:44:58 +02:00
Holger Vogt abd4c49ee6 'No OP' is the more important news, update note to the user. 2024-05-29 14:15:11 +02:00
Holger Vogt cd47e104b0 Improve comment 2024-05-29 14:14:19 +02:00
Holger Vogt 92f32fb8e1 Search path for .lib and .include has been enhanced to read complete
or partial paths from environmental variables. The env variable
names have to start with '$' as the first character after the .inc
or .lib token. Two consecutive env variables are possible. They are
read each until directory separator '/' or '\\', or if none is found,
until the end of the line. In this case the filename has to be included
in the env variable. A .lib line may look like
.lib "$ENVS1\$ENVS2/libraries\sky130_fd_pr\latest\models\sky130.lib.spice" tt

If an env variable is read successfully, a ngspice variable with
the same name (without leading '$') and contents is defined for
use in a .control section.
2024-05-27 15:41:17 +02:00
Holger Vogt 94522f5c14 Revert "Search path for .lib and .include has been enhanced to read complete"
This reverts commit 82c15a8d98.
2024-05-27 09:31:02 +02:00
Holger Vogt 82c15a8d98 Search path for .lib and .include has been enhanced to read complete
or partial paths from an environmental variable. The env variable
name has to start with '$' as the first character after the .inc
or .lib token. It is read until it hits a directory separator '/' or '\\',
or if none is found, until the end of the line. In this case the filename
has to be included in the env variable.

If the env variable is read successfully, a ngspice variable with
the same name (without leading '$') and contents is defined for
use in a .control section.
2024-05-25 16:06:46 +02:00
Holger Vogt c735423222 Add '.save nosub' to suppress storing the node vectors from inside
of subcircuits.

Saves a lot of memeory if using devices with subcircuit models,
and one is not interested in the inner workings of the device model.
2024-05-24 17:38:30 +02:00
Holger Vogt e4d86e6e86 Merge branch 'pre-master-43' of ssh://git.code.sf.net/p/ngspice/ngspice into pre-master-43 2024-05-18 23:09:06 +02:00
Holger Vogt 3356311197 Transform nested braces {{}} into {()} also in .param statements
(See TI PSPICE model for LMR33630).
2024-05-18 23:08:13 +02:00
dwarning 672c52720d mos1...3: set channel thermal noise to 0 in subthreshold range for nlev=3 2024-05-15 14:30:16 +02:00
dwarning 1bf6cc36c5 mos1...3: logical error-prevent garbage for nlev=3 2024-05-14 17:45:29 +02:00
dwarning 6f6ee47767 diode: no need for vte recalculation, rhs not changed 2024-05-13 12:30:32 +02:00
Holger Vogt be56394222 Issue this warning only when 'set ngdebug' is given. 2024-05-12 15:35:22 +02:00
Holger Vogt 4072b9aab2 Improve error message if malloc or realloc fails. 2024-05-12 15:19:28 +02:00
Holger Vogt 684627dd97 Save path to .include file, add it to the search paths
for loading the next .include file.

If input directory dir_name is not set when loading .include files,
set it to the first .include found.

Both instruction add to the search paths for file to be inluded
and are valuable when the netlist is sent by circbyline without
input file involved.
2024-05-08 15:42:05 +02:00
dwarning 4aa3d2fc54 diode: add saturation current temperature model tlev=2 2024-05-06 11:47:12 +02:00
Holger Vogt aef73c9b20 Identifier 'card' may not be available or not useful when
netlist is loaded via circbyline().
2024-05-06 11:21:01 +02:00
Holger Vogt 1d4f02ca91 Clear the variable before checking anew if it is to be set. 2024-05-06 11:19:39 +02:00
Holger Vogt 67829d634b Don't delete sourceinfo as it may lead to a crash upon 'quit'.
Needs further investigation.
2024-05-01 10:10:42 +02:00
Holger Vogt db6427edf8 Reload sourceinfo when changing the current circuit. 2024-05-01 10:10:42 +02:00
Holger Vogt 55f7d3fcef Save the wordlist sourceinfo to the current circuit.
Remove sourceinfo only upon 'quit'.
2024-05-01 10:10:42 +02:00
Holger Vogt 87a601395d Add a fcn wl_delete to free the wordlist, but not its wl_word contents. 2024-05-01 10:10:42 +02:00
Holger Vogt 279fe0afcf Add (enhanced) patch by Giles Atkinson
Add controlled_exit() to errors when parsing functions.
Add verbose error messages, including line number and
name of the source file.

.lib file handlinmg with its recursive structure probably needs
testing and improvements.

More error messages may need this update.
2024-05-01 10:10:42 +02:00
Holger Vogt 8d539aa9ba Add linum_orig and linesource to commented out *include line 2024-05-01 10:10:42 +02:00
Holger Vogt 43772de1f9 Add linenum_orig and linesource info to newly generated
U device lines.
2024-05-01 10:10:41 +02:00
Holger Vogt 9c21a1fe9e Add char *lineinfo to parameters of fcn insert_new_line 2024-05-01 10:10:41 +02:00
Holger Vogt 55aee45955 New parameter char *linesource for fcn insert_new_line
Make Fcn inp_read in inpcom.c static
2024-05-01 10:10:41 +02:00
Holger Vogt cca34330f8 Add file_name to fcn inp_read
Add wordlist sourceinfo to store input sources
path/file, internal, etc.)
debug_out.txt adds line info (var. sourcelineinfo)
Add sourcelineinfo to wordlist sourceinfo and to each new line.
When adding lines due to compatibility handling, use existing
linenum_orig and linesource.
2024-05-01 10:10:41 +02:00
Holger Vogt 7348627c5e Add the original line source information to the new line. 2024-05-01 10:10:41 +02:00
Holger Vogt 7f0dc4b39f Allow delay of 0, as requested by Infineon model of the 2EDNY52X 2024-05-01 10:10:41 +02:00
Holger Vogt 35a7e49ac8 Do not add line number 0, but the number of the original
.probe command to linenum_orig.
2024-05-01 10:10:41 +02:00
Holger Vogt 88418eca56 Add an additional funtion parameter 'filename' to fcn inp_readall
to transfer not only the folder, but also the file name of the
current input
2024-05-01 10:10:40 +02:00
Holger Vogt a095048e63 Add 'linesource', to contain the path/file of the origin of the line. 2024-05-01 10:10:40 +02:00
Holger Vogt 50ce5bbff4 while copying a deck, copy the new infos 2024-05-01 10:10:40 +02:00
Giles Atkinson 69fd0296a4 Prevent lines beginning '#' in .include files from being treated
as device lines.
2024-05-01 10:06:19 +02:00
Giles Atkinson aed347c95a Fix an error in cfbe1afa21 that causes a crash in d_cosim. 2024-05-01 10:06:13 +02:00
dwarning 342f1c926f diode: add alternative bangap calculation for tlev=2 2024-04-30 17:23:20 +02:00
dwarning 20a04fccdd diode: add model parameter xw for mask and etching effect (level=3) 2024-04-30 16:32:52 +02:00
dwarning ca8d150872 diode: add aliases for breakdown voltage 2024-04-29 20:39:43 +02:00
Pat Deegan 25c7795a89 level 3 note on breakdown voltage params 2024-04-29 11:00:47 -04:00
Pat Deegan 80209f0215 Diode Model Parameters, Level 3, support for diode breakdown voltage synonyms, as used in sky130 PDK 2024-04-29 10:47:13 -04:00
Holger Vogt b056b647af Stop ngspice in case of pwl errors, avoid crash. 2024-04-24 10:24:46 +02:00
Holger Vogt 3694dddd64 Revert "Define the members of the struct in the correct sequence."
This reverts commit ce8bce7947.
2024-04-23 11:33:34 +02:00