Giles Atkinson
8ab446fc9c
Fix Bug #750 - "VDMOS Model Naming Rules in NGSPICE Cause Confusion."
Recognise VDMOS as a special keyword only as the third token in a
.model line. A new function, skip_token(), included in the change
allows simplification of some existing code.
1 year ago
Holger Vogt
80d6e681f2
MS Windows: Get a canonical paths name: Important if
path length exceeds MAX_PATH, might happen when using PDKs
Patch provided by kreijstal
12 months ago
Holger Vogt
43c4c49e11
re-enable adding variables (path names) to list variable "sourcepath"
12 months ago
Holger Vogt
a2dbedff4e
Improved error message, not using internal 'circbyline'
12 months ago
Giles Atkinson
629d1f5462
Fix a bug where a node name is mis-identified as the model for
an OSDI device and remove a limit on node count.
Problem was reported by user Sam in ngspice-users.
1 year ago
Giles Atkinson
b41b8a48c3
Tidy code in get_number_terminals(), removing unneeded copying.
1 year ago
Holger Vogt
ef00416ebf
Add a section without source info to the debug output.
Truncate .model lines in this section, as .model lines with
several hundred parameters may mask the relevant information.
1 year ago
Holger Vogt
26b197df33
Allow m parameter for B source with current output
Fixes bug no. 734
1 year ago
Holger Vogt
e5d4d7d63f
Add to debug-out.txt an output without source file information.
Thus cluttering the view is reduced.
1 year ago
Holger Vogt
e1bd97d8f6
If C= or Q= is omitted in the instance line of a behavioral capacitor,
select as default the C= formulation, not the Q= formula..
1 year ago
Holger Vogt
ce8480c690
Enable improved error message with nested .include.
1 year ago
Holger Vogt
c7ee676e3d
Improve the error message by hinting to the source of the error.
1 year ago
Holger Vogt
a4e443fcce
precautionary prevent passing instances which internally have got
upper case lettering. Removes a crash reported in
https://gitlab.com/kicad/code/kicad/-/issues/18648 .
1 year ago
Holger Vogt
ffde17441b
Don't quote the subcircuit name in an X line
1 year ago
Holger Vogt
1e4a6ac8b8
avoid memory leak by appending, not prepending the word
1 year ago
Holger Vogt
a6ad2470f1
Add a flag compmod to struct card.
Set compmod to 1 if netlist line is included by command 'incpslt'
Guard special newcompat.hs sections by compmod
1 year ago
Holger Vogt
8b5a046cdb
Remove again, not needed
1 year ago
Holger Vogt
deb3cd9809
Replace all BOOLEAN, BOOL, _Bool by bool
Remove all #undef bool (set in conjunction with #iclude <Windows.h>)
1 year ago
Holger Vogt
660b183ad0
Revise check for '.probe alli' and event nodes:
Bail out, don't run any sim, don't change variable
'auto_bridge'.
1 year ago
Holger Vogt
2db9533380
Enable strings as parameters across subckt boundaries
by keeping the quotes and excluding {} around the string token.
1 year ago
Holger Vogt
a45c1500a6
Remove 512 char limit of sourcepath variable.
Make attaching new path more efficient.
1 year ago
Holger Vogt
793fca6e2a
If preprocessing is skipped, we still need the number of lines in the deck.
1 year ago
Holger Vogt
d5f0c6598f
Fix commit 09685dde1
("Set lower case for variables or vectors in command 'echo'.
Tokens starting with '$' will get lower-casing.", 2024-09-07)
Don't use s as name for temporary string, as s has been set
already and is used later.
2 years ago
Holger Vogt
b62528d7e5
Set lower case for variables or vectors in command 'echo'.
Tokens starting with '$' will get lower-casing.
2 years ago
Holger Vogt
8e8716abc7
Fix warning message
2 years ago
Holger Vogt
c2c35b56a4
More on verbose error and warning messages
2 years ago
Holger Vogt
c33fd66a21
Make error messages more verbose:
add line number and source file name.
2 years ago
Holger Vogt
295be20859
Remove sourceinfo upon shared ngspice reset.
Remove memory leaks.
2 years ago
Holger Vogt
14bb63490c
Plug a memory leak
2 years ago
Brian Taylor
d01868b725
Cleanup gcc compiler warnings.
2 years ago
Holger Vogt
b1795dbcf2
add path or filepath (without file name) to variable sourcepath,
when calling command 'source'
2 years ago
Holger Vogt
74fc096bfd
Enable coupling of more than 2 inductots in a single line:
K1 L1 L2 L3 L4 L5 0.99
2 years ago
Holger Vogt
ee39d678b7
Improve comment
2 years ago
Holger Vogt
ace47103e7
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.
2 years ago
Holger Vogt
2f5b869979
Issue this warning only when 'set ngdebug' is given.
2 years ago
Holger Vogt
b660e75504
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.
2 years ago
Holger Vogt
3f2673a2be
Clear the variable before checking anew if it is to be set.
2 years ago
Holger Vogt
97d9f38421
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.
2 years ago
Holger Vogt
862aa27713
Add linum_orig and linesource to commented out *include line
2 years ago
Holger Vogt
63d496b564
New parameter char *linesource for fcn insert_new_line
Make Fcn inp_read in inpcom.c static
2 years ago
Holger Vogt
c4cbc40a3b
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.
2 years ago
Giles Atkinson
b2c0f85c6d
Prevent lines beginning '#' in .include files from being treated
as device lines.
2 years ago
Holger Vogt
a48b1f8f46
allow compiling with CIDER deselected
2 years ago
Holger Vogt
39b5ea0d3f
no lower casing for file input paths
2 years ago
Holger Vogt
e561249e9b
fix a bug in the ={par({...})} function.
The replacement did not happen correctly.
2 years ago
Holger Vogt
adb38ecb17
Upon error, bail out when strict_error is set.
2 years ago
Holger Vogt
a0bddf872d
Fix dd7b9ff27
("Avoid memory crash when reading old VDMOS models.
Enable both old and current model format.",
2023-12-30)
2 years ago
Holger Vogt
88d0727d3f
In PS compat mode we only have 2 nodes in a diode,
but still allow self heating diode with ngspice syntax.
2 years ago
Holger Vogt
dd7b9ff273
Avoid memory crash when reading old VDMOS models.
Enable both old and current model format.
2 years ago
Holger Vogt
37944bd7c4
Preliminary fix to bug 650
Don't omit replacement, when independent nested subcircuit has been checked.
FIXME: Better use the cards level parameter.
2 years ago