Holger Vogt
0be163d8d8
Search for "off" token in device instance lines not with
C standard fcn strstr, but with search_plain_identifier().
Thus allow model names that contain "off" (like offset)
4 years ago
Holger Vogt
4cc6222230
Make function search_plain_identifier non-static
Declare info on the compatibility mode as a 'Note'.
4 years ago
Holger Vogt
696736b2b3
adding expressions in {} as pwl parameters
not complete, still requires caring about the FIXME above.
4 years ago
Holger Vogt
242a1d796a
Remove the "type" declaration from a .model line
4 years ago
Holger Vogt
f21255ef1b
Fix regression bug #579
Accept numbers to ac statement in voltage (current) sources
also given as parameters.
4 years ago
Holger Vogt
0eb272243f
Enable RKM notation also for inductors (e.g. 1u2 for 1.2u)
4 years ago
Holger Vogt
632f8c033d
Make numoparam error messages more user friendly.
Add line number of netlist to the message.
Original line number added to new lines in inpcom.c.
Internal error messages only when 'ngdebug' is set
4 years ago
Holger Vogt
c4e94cd59b
safeguard against a crash when the s line is buggy
4 years ago
Holger Vogt
b636017359
add function prototype
for insert_new_line()
4 years ago
Holger Vogt
422719200e
re-enable parameters in agauss function
fixes bug #564 reported by Stefan Schippers
If nested braces {..{ }...} have been created,
replace the inner { } by ( )
4 years ago
Holger Vogt
b749e62e31
Make error message more verbose
4 years ago
Holger Vogt
9dff15507d
.probe: Add call to function inp_probe() which resides
in inpc_probe.c.
Make function insert_new_line() non-static
Enable detecting the number of nodes in x-lines
(calls to subciruits) in function get_number_terminals()
4 years ago
Holger Vogt
3f3936c728
Remove memory leaks
4 years ago
Holger Vogt
d6038ea43c
Redo the transformation vswitch -> pswitch
Parsing takes default values into account, when
parameter is missing.
S vswitch --> pswitch code model
S_ST vswitch (with hysreresis) --> SW switch
S iswitch --> aswitch code model
S_ST iswitch (with hysreresis) --> CSW switch
Use string handling for replacements: allow parameter
equations in .model lines.
5 years ago
Holger Vogt
a87b237bff
is_a_modelname() to detect a model 1N4148, if compt LT is set.
Rewrite is_a_modelname(), when LT is set: only check element lines
beginning with r and c for RKM notation of a number.
So don't use a RKM number (e.g. 4k7) for naming a resistor model.
5 years ago
Holger Vogt
6f6f2b8996
Remove double assigment to s[1]
Assignment Is either done in the loop or by *y = '\0';
5 years ago
Holger Vogt
df5e7e36f6
When checking for µ, truncated the line, when shifted.
Enable R470, when newcompat LT is selected.
5 years ago
Holger Vogt
3dcc36c1c3
ngspice input deck may contain special characters like µ (mu).
Detect mu for ANSI and UTF-8 and translate it to u.
5 years ago
Holger Vogt
601287e949
Check V and I lines for dc and ac.
Allow ac without parameters, a default is set to ac ( 1 0 )
5 years ago
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.
5 years ago
Holger Vogt
3599c189b6
re-enable lower-casing of tokens beginning with 'cd',
except for command 'cd' which is usually followed by a space.
5 years ago
Brian Taylor
abad190b38
Don't search for ic.file within comments.
5 years ago
Brian Taylor
b3a99f0c6c
Do not use non-portable strcasestr.
5 years ago
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.
5 years ago
Holger Vogt
9221df234c
Patch to allow (and ignore) leading or trailing commas
when putting {} around tokens. Tested with PWL voltage source.
Patch has been suggested by Liqian Zhang
5 years ago
Holger Vogt
9cc9c56cad
Don't write past '\0', fixes a bug in commit
1c5e0d11d ("If there is a XSPICE code model .model line with
file input, keep quotes and case for the file path.", 2021-07-15)
5 years ago
Holger Vogt
b7473a33a0
Check for double '{', replace the inner '{', '}' by '(', ')'
in .subckt or .model (which both may stem from external sources)
5 years ago
Holger Vogt
1c5e0d11dd
If there is a XSPICE code model .model line
with file input, keep quotes and case for the file path.
5 years ago
Holger Vogt
15a3ed87c0
Enable the m parameter in E, G, B, R behavioral source/devices
5 years ago
Holger Vogt
ae72677cc2
Remove a false read when curr_line has
already been invalidated.
5 years ago
Holger Vogt
0f25c25c7e
Remove a memory leak
Make inp_rem_levels non-static
and use it to remove 'root' after it has been used.
5 years ago
Holger Vogt
93ddc7a3eb
Enhancement for E source with table, convert to B source with pwl:
Add G source
Allow 'table' also being part of a parameter name like 'table_something'
5 years ago
Holger Vogt
76eac5aa0f
Make error message more verbode
5 years ago
Holger Vogt
a4be66b9b0
Prevent crash if there is bad syntax in h, g, e, or f line
5 years ago
Holger Vogt
31fbf910af
Crash when trying to delete root and netlist:
Revert the order of deletion: Firstly the root, then the netlist.
5 years ago
Holger Vogt
858689d206
Make syntax check for nesting of .subckt ... .ends more verbose:
Try to find out where .subckt/.ends may be doubled, or missing.
5 years ago
Holger Vogt
52b5e218c7
Add '\f' to characters to be replace by '+'
during the syntax check of an netlist input file.
5 years ago
Holger Vogt
dcde7b590e
Don't put brackets around dtemp and temp, when they denote
instance parameters and thus are on the left hand side of '='
5 years ago
Holger Vogt
19abc83312
Make the choice of last commit mor obvious
5 years ago
Holger Vogt
87a9d87f7d
Replace identifier by func not only after '=', but also '{'
Extension to commit
61e48f984 ("Start replacing identifiers by func only after the first '='", 2021-06-18)
5 years ago
Holger Vogt
68e51848a4
logic condition to check only 'x' lines had not been given
5 years ago
Holger Vogt
d0ca6a4773
Start replacing identifiers by func only after the first '='
5 years ago
Holger Vogt
0d2d034eb2
Add devices s and w to previous commit.
R and C are not yet covered here, due to the many
varieties available.
5 years ago
Holger Vogt
c033298db9
Don't replace a device model name by a parameter, if both
have the same names.
This is an extension to commit
7706889a0 ("inpcom.c, fix bug no 384 do not quote fourth
token in f, h lines otherwise if dev name equals param
name parsing fails", 2018-12-08)
Fixes bug 327 reported by T. Edwards at
https://github.com/google/skywater-pdk/issues/327
5 years ago
Holger Vogt
273b773280
New pswitch is not compatible to iswitch
Keep the old aswitch until a modified pswitch is available.
5 years ago
Holger Vogt
5cc5e351f1
prepare for the new pswitch with g, gd input
5 years ago
Holger Vogt
9abb61d6ac
Bug fix for %i(node1) in an A instance.
Don't do i() replacement in an A instance as shown above.
5 years ago
Holger Vogt
c46676d06e
If compatmode PS is set, translate vswitch and iswitch to pswitch.
This reverts commit 025a9fe59 ("Partially undo commit [ab778d] : revert to aswitch as vswitch replacement", 2020-11-22)
Successful OpAmp tests vote for pswitch.
Enable iswitch.
5 years ago
Holger Vogt
db5395032f
Avoid model warning for C if compat flag lt is set.
5 years ago
Holger Vogt
7dd96c241c
PSPICE MC parameters are not (yet) supported, so remove them
from .model (lot, dev) and netlist (.distribution)
Triggered by Patch #104 by Giles Atkinson
5 years ago