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
2021-07-05 13:59:24 +02:00
dwarning
b1bf7ea0ad
Diode model with selfheating option
2021-07-05 13:58:51 +02:00
Holger Vogt
bc74caca2f
Don't create cat2strings if on VS2019
2021-07-02 11:54:06 +02:00
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().
2021-07-02 11:51:18 +02:00
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.
2021-02-21 16:48:53 +01:00
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.
2021-01-28 17:06:02 +01:00
Holger Vogt
939410874a
Info "No circuit loaded!" is added.
2021-01-20 16:49:05 +01:00
Holger Vogt
d239a523e0
remove memory leak
2021-01-20 16:48:46 +01:00
Holger Vogt
ed15d6f975
replace controlles_exit by error return,
...
delete netlist cc when returning upon error.
2021-01-20 16:48:27 +01:00
Holger Vogt
058f474f90
Prevent crash if netlist input is something like
...
H n1
2021-01-20 16:48:08 +01:00
Holger Vogt
c9eeb0ceea
Modify get_number_terminals() and make it non-static.
...
Use modified function to replace fixed node number.
2021-01-20 16:46:37 +01:00
Holger Vogt
b640e57c39
re-enable getting correct node numbers for bipolar
...
using TSMC cv018bcd
2021-01-20 16:46:27 +01:00
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.
2021-01-20 16:44:57 +01:00
Holger Vogt
e601325149
Avoid any buffer overflow if user provides a large TABLE:
...
Replace fixed length strings and fcn 'cat' by dstrings.
2021-01-20 16:44:19 +01:00
Holger Vogt
02630c0af2
fix a bug in printing the compatibility status
2021-01-20 16:41:53 +01:00
Holger Vogt
0d4685f459
preliminarily turn off fcn nlist_model_find()
...
to avoid compiler warning
2021-01-02 23:29:35 +01:00
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.
2021-01-02 19:12:26 +01:00
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.
2021-01-02 19:11:44 +01:00
Holger Vogt
164d3dd20c
Enable models with parens by using gettok_parens() like
...
.model NP NPN(BF=125 Cje=.5p Cjc=.5p Rb=500)
2021-01-02 19:11:29 +01:00
Holger Vogt
70d1647cfa
Update to ps .model selection for MOS,
...
add support for bipolar (Mextram, lateral pnp),
enable 'level = nn' (with spaces).
2021-01-02 19:07:16 +01:00
Holger Vogt
8602915942
level for ekv2.6 is 44
2021-01-02 19:06:17 +01:00
Holger Vogt
50ec89e284
PS compatibility: select appropriate level for MOS models
2021-01-02 19:05:41 +01:00
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.
2021-01-02 19:02:44 +01:00
Holger Vogt
e8aea4967c
Remove some compiler warnings
2021-01-02 19:00:48 +01:00
Holger Vogt
7bd12a60a6
Enable multiplier 'm' for behavioral resistor
...
(R using a B source).
2020-12-22 17:56:19 +01:00
Holger Vogt
3c2f6585e0
Add some comment.
2020-12-22 17:56:19 +01:00
Holger Vogt
19fb3ec38f
make some functions non-ststic to support function
...
rem_unused_mos_models() in inps.c
2020-12-22 17:56:18 +01:00
Holger Vogt
043634b60e
Jump over the HSPICE-specific key words
2020-12-22 17:56:18 +01:00
Holger Vogt
8b376b4581
Remove dot lines somewhat later.
2020-12-22 17:56:18 +01:00
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.
2020-12-22 17:56:18 +01:00
Holger Vogt
79d6f27d74
fix a typo
2020-12-22 17:56:18 +01:00
Holger Vogt
9072f40b9a
bug 535: re-enale tc1, tc2 even if tokens tc1 or tc2
...
may be part of other tokens as well.
2020-12-22 17:56:18 +01:00
Holger Vogt
aee35e6ef3
No brackets around instance parameters dtemp, temp
2020-12-22 17:56:18 +01:00
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.
2020-12-22 17:56:18 +01:00
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.
2020-12-22 17:56:18 +01:00
Holger Vogt
025a9fe599
Partially undo commit [ab778d] :
...
revert to aswitch as vswitch replacement
2020-12-22 17:56:18 +01:00
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.
2020-12-22 17:56:18 +01:00
Holger Vogt
6055fda73d
spaces
2020-12-22 17:56:18 +01:00
Holger Vogt
44b8498d63
prevent a crash when e,g,f,h sources do not have enough paramaters.
2020-12-22 17:56:18 +01:00
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.
2020-12-22 17:56:18 +01:00
Vogt
bb8cdb2e2d
enable the use of either single or double quotes
...
for file path names (was mixed up, becaus isquote()
aknowledges both types).
2020-12-22 17:56:18 +01:00
dwarning
03cd512e7f
separate and correct capacitor charge formula transformation
2020-12-22 17:56:18 +01:00
dwarning
450ec47a3e
rm unused quote.h in vngspice_fftw
2020-12-22 17:56:18 +01:00
Holger Vogt
aa0d0abe34
Fix a bug in the limit() function (PSPICE compat mode)
2020-12-22 11:11:59 +01:00
Holger Vogt
9276f9fb0e
Use the pwl LIMIT=TRUE flag when replacing
...
G1 2 3 TABLE ... or E2 4 5 TABLE ... by code model pwl
2020-12-22 11:11:23 +01:00
Holger Vogt
19a688513c
add compatibility mode eg for EAGLE
...
clarify mode a for 'whole netlist' and ll for 'all'
2020-12-22 11:07:31 +01:00
Holger Vogt
7360d8aa66
Fix a typo
2020-12-22 11:03:44 +01:00
Holger Vogt
28861739f8
allow writing character '%'
2020-10-16 18:12:31 +02:00
Holger Vogt
51df9aaa55
remove non ascii character §, which leads to compiler warnings
2020-10-11 21:12:29 +02:00
Holger Vogt
fdc143ce16
Add a limit capability to the code model aswitch
...
Example switch-oscillators_inc.cir showed currents up to 3GA
2020-10-10 13:53:36 +02:00