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.
5 years ago
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
5 years ago
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
5 years ago
dwarning
b1bf7ea0ad
Diode model with selfheating option
5 years ago
Holger Vogt
bc74caca2f
Don't create cat2strings if on VS2019
5 years ago
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().
5 years ago
Holger Vogt
8076e2b4cf
Check for double '{{ }}', replace the inner '{', '}' by '(', ')'
in .model lines, if compat mode ps is set. Enables use of some On-Semi
power transistor models.
5 years ago
Holger Vogt
5747982ae8
Re-enable devices like E2 1 0 (2,3) 1
Add a new function nexttok_noparens(const char *s) which
skips tokens. Characters , ( and ) are treated like spaces.
5 years ago
Holger Vogt
939410874a
Info "No circuit loaded!" is added.
5 years ago
Holger Vogt
d239a523e0
remove memory leak
5 years ago
Holger Vogt
ed15d6f975
replace controlles_exit by error return,
delete netlist cc when returning upon error.
5 years ago
Holger Vogt
058f474f90
Prevent crash if netlist input is something like
H n1
5 years ago
Holger Vogt
c9eeb0ceea
Modify get_number_terminals() and make it non-static.
Use modified function to replace fixed node number.
5 years ago
Holger Vogt
b640e57c39
re-enable getting correct node numbers for bipolar
using TSMC cv018bcd
5 years ago
Holger Vogt
822a63974f
Unused binning models are removed.
Flag 'nf', when given on the x lines, is
recognized.
Tested with TSMC, Skywater, and X-Fab model
files.
5 years ago
Holger Vogt
e601325149
Avoid any buffer overflow if user provides a large TABLE:
Replace fixed length strings and fcn 'cat' by dstrings.
5 years ago
Holger Vogt
02630c0af2
fix a bug in printing the compatibility status
5 years ago
Holger Vogt
0d4685f459
preliminarily turn off fcn nlist_model_find()
to avoid compiler warning
5 years ago
Holger Vogt
94eac89749
Remove 'comment out any unused models' for now, it
has been working, but led to spurious error messages.
Has to be checked more thoroughly.
Add a ngbehaviour setting 'mc', needed for running
'make check'. It will unset all other compatibility modes
and suppress the note on compatibility settings which
led to a 'make check' failure just due to its printout.
5 years ago
Holger Vogt
1234c3bdf8
Update to the compatibility mode:
Rename new_compat_mode() to set_compat_mode().
Add fcn print_compat_mode() to print out
the selected compatibility mode.
5 years ago
Holger Vogt
164d3dd20c
Enable models with parens by using gettok_parens() like
.model NP NPN(BF=125 Cje=.5p Cjc=.5p Rb=500)
5 years ago
Holger Vogt
70d1647cfa
Update to ps .model selection for MOS,
add support for bipolar (Mextram, lateral pnp),
enable 'level = nn' (with spaces).
5 years ago
Holger Vogt
8602915942
level for ekv2.6 is 44
5 years ago
Holger Vogt
50ec89e284
PS compatibility: select appropriate level for MOS models
5 years ago
Holger Vogt
a147a3b190
If we encounter tc1= or tc2= (temp coeffs.) or m= (multiplier),
the expression is done, thus keeping the brackets as is.
Enables tcx={} or m={} with their own expressions, dealt with
by numparam.
5 years ago
Holger Vogt
e8aea4967c
Remove some compiler warnings
5 years ago
Holger Vogt
7bd12a60a6
Enable multiplier 'm' for behavioral resistor
(R using a B source).
5 years ago
Holger Vogt
3c2f6585e0
Add some comment.
5 years ago
Holger Vogt
19fb3ec38f
make some functions non-ststic to support function
rem_unused_mos_models() in inps.c
5 years ago
Holger Vogt
043634b60e
Jump over the HSPICE-specific key words
5 years ago
Holger Vogt
8b376b4581
Remove dot lines somewhat later.
5 years ago
Holger Vogt
777cfcf477
Reduce the memory requirements if there is a PDK with
a lot of binning models.
This is a hack and needs testing!
inpcom.c: If an x line, add w and l to the netlist card,
if available.
subckt.c: select a suitable model bin, discard the rest
for each subcircuit, depending on w and l from above.
inpgmod.c: less restrictive equal for real numbers,
allow both min and max boundaries (problem of equating
real numbers), when the selected device has w or l on
the boundary between two model bins.
5 years ago
Holger Vogt
79d6f27d74
fix a typo
5 years ago
Holger Vogt
9072f40b9a
bug 535: re-enale tc1, tc2 even if tokens tc1 or tc2
may be part of other tokens as well.
5 years ago
Holger Vogt
aee35e6ef3
No brackets around instance parameters dtemp, temp
5 years ago
Holger Vogt
fe24a4135c
spice2g6 poly(19 compat:
When counting token, count an expression {...} for the
gain as a single token, even if it contains spaces.
5 years ago
Holger Vogt
d24aa7134c
E_constant Vconst 0 TABLE {Max(V(DP)-V(GN),0)}=((20,120))
Allow such strange construct, where a single pair x,y will
simplay return a constant y (120 in the above example).
This is used in external devices models and aknowledged
by other simulators.
5 years ago
Holger Vogt
025a9fe599
Partially undo commit [ab778d] :
revert to aswitch as vswitch replacement
5 years ago
Holger Vogt
2d34cbddf8
re-write and simplify the tc1, tc2 code for behavioral
R, L, C lines invoking the B source.
Enable parameterization of the TCs.
Create a tc string in an extra function, add this string
to the new R, L, C line.
5 years ago
Holger Vogt
6055fda73d
spaces
5 years ago
Holger Vogt
44b8498d63
prevent a crash when e,g,f,h sources do not have enough paramaters.
5 years ago
Holger Vogt
d0a8e6ac51
update to the limit function for ps compatibility.
The output will stay between the two limits given.
Tere is no prescription which of the two is upper
or lower.
This function will not solve all PS-Spice
compatible model convergence issues. We better look
for a built-in function with smooth, steadily
differentiable corners.
5 years ago
Vogt
bb8cdb2e2d
enable the use of either single or double quotes
for file path names (was mixed up, becaus isquote()
aknowledges both types).
5 years ago
dwarning
03cd512e7f
separate and correct capacitor charge formula transformation
5 years ago
dwarning
450ec47a3e
rm unused quote.h in vngspice_fftw
5 years ago
Holger Vogt
aa0d0abe34
Fix a bug in the limit() function (PSPICE compat mode)
5 years ago
Holger Vogt
9276f9fb0e
Use the pwl LIMIT=TRUE flag when replacing
G1 2 3 TABLE ... or E2 4 5 TABLE ... by code model pwl
5 years ago
Holger Vogt
19a688513c
add compatibility mode eg for EAGLE
clarify mode a for 'whole netlist' and ll for 'all'
5 years ago
Holger Vogt
7360d8aa66
Fix a typo
6 years ago
Holger Vogt
28861739f8
allow writing character '%'
6 years ago