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
6 years ago
Holger Vogt
19a688513c
add compatibility mode eg for EAGLE
clarify mode a for 'whole netlist' and ll for 'all'
6 years ago
Holger Vogt
7360d8aa66
Fix a typo
6 years ago
Holger Vogt
28861739f8
allow writing character '%'
6 years ago
Holger Vogt
51df9aaa55
remove non ascii character §, which leads to compiler warnings
6 years ago
Holger Vogt
fdc143ce16
Add a limit capability to the code model aswitch
Example switch-oscillators_inc.cir showed currents up to 3GA
6 years ago
Holger Vogt
14ef4e74ec
Add PSPICE compatible ISWITCH
Translates iswitch either to csw or to aswitch models
6 years ago
Holger Vogt
2f1d3df8c7
add a Spectre compatibility mode
6 years ago
Holger Vogt
445c6f2d32
fix a bug that occurs when xspice is not selected
missing function parameter has been introduced in previous commit
6 years ago
Holger Vogt
602baf68e6
spice2g6 allows to omit the poly(n) statement, if the
polynomial is one-dimensional (n==1).
For compatibility with the XSPIXE code, we have to add
poly(1) appropriately.
6 years ago
Holger Vogt
60dfe836f4
If ps is enabled, .dc TEMP -15 75 5 will have been
modified to .dc (TEMPER) -15 75 5.
So we repair it here with a preliminary fix.
6 years ago
Holger Vogt
ca27319213
no forcing lower-case letters for command 'cd'
6 years ago
Holger Vogt
a0389bb547
In PS compatibility mode:
In subcircuit .subckt and X lines with 'params:' statement
replace comma separator by space. Do nothing if comma is inside of {}.
6 years ago
Holger Vogt
e3aad7849c
remove vceo= and icrating= from bjt model cards
6 years ago
Holger Vogt
ebb1e953fe
Streamline the compatibility flag generation
6 years ago
Holger Vogt
c112279555
new compatibility handling with struct compat newcompat:
simplify the compatibility handling, better readability
make it easily extendable
add new flag 'ki' for KiCad compatibility
6 years ago
Holger Vogt
71e65b75b0
Syntax check: If the first character in a netlist
or .control line is one of =[]?()&%$§\"!:, then ngspice
replaces it by '*' and issues a warning.
'set strict_errorhandling' will force ngspice existing.
6 years ago
Holger Vogt
71338c3271
replace 'noiseless' only if it is an unconnected token
6 years ago
Holger Vogt
ba7be26b95
If a g table source contains %, [, nor ] in its name,
replace it by _ in the a instance generated during parsing.
6 years ago
Holger Vogt
05bf86caaa
safeguard against empty lines which may be sent to shared ngspice
6 years ago
Holger Vogt
bbe81ca8f8
shared ngspice may transmit netlists with empty lines,
guard against crashing
6 years ago
Holger Vogt
cbab726d69
use memcpy instead of strncpy to copy an exact amount of characters
remove unused function header
6 years ago
Holger Vogt
c520a9a4b9
if lt(a) comp mode is set, replace 'noiseless' by 'noisy=0' in resistors
6 years ago
Holger Vogt
572daed2ec
Remove '.backanno' if LT campatibility mode is set
6 years ago
Holger Vogt
f5ebea5e9f
use internally predefined pow() function
6 years ago
Holger Vogt
4c80a1ab7d
fix a bug, use ciprefix instaed of cieq, cieq led to
always FALSE if statement
6 years ago
Holger Vogt
84ff135e5b
syntax check for vdmos instances with 'thermal' flag
6 years ago
Holger Vogt
9e8e50cb57
Fix a bug raised by Sambeet in
[Ngspice-users] Problems with xspice limiter block:
Don't treat .model limit_comp limit(gain... as a function
if PSPICE compatibility is set.
6 years ago
dwarning
edc5b5a4d4
VDMOS prevent fault if thermal switch is given but thermal nodes are not
6 years ago
dwarning
e9abecc8c7
change vdmos flag to thermal, not to confuse with b4soi
6 years ago
dwarning
3686dbfb78
filter only mos instances with thermal switch
6 years ago
dwarning
791f18053f
change vdmos flag to thermal, not to confuse with b4soi
6 years ago
Holger Vogt
71ad2903ff
plug a memory leak in inpcom.c vdmos code
6 years ago
Holger Vogt
7f085144a9
remove all the remains of quote() and strip() that had been
used to modify the eigths bit of a character or string.
The functions had been switched off some time ago.
We now need all bits of a char for extended ascii or utf8
6 years ago