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
Holger Vogt
14ef4e74ec
Add PSPICE compatible ISWITCH
...
Translates iswitch either to csw or to aswitch models
2020-10-10 13:53:02 +02:00
Holger Vogt
2f1d3df8c7
add a Spectre compatibility mode
2020-10-10 12:19:49 +02:00
Holger Vogt
445c6f2d32
fix a bug that occurs when xspice is not selected
...
missing function parameter has been introduced in previous commit
2020-10-10 12:11:41 +02:00
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.
2020-10-10 12:11:14 +02:00
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.
2020-10-10 12:10:43 +02:00
Holger Vogt
ca27319213
no forcing lower-case letters for command 'cd'
2020-10-10 12:09:25 +02:00
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 {}.
2020-08-20 15:49:32 +02:00
Holger Vogt
e3aad7849c
remove vceo= and icrating= from bjt model cards
2020-08-20 15:47:49 +02:00
Holger Vogt
ebb1e953fe
Streamline the compatibility flag generation
2020-08-20 15:39:19 +02:00
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
2020-08-20 15:38:43 +02:00
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.
2020-08-20 15:28:59 +02:00
Holger Vogt
71338c3271
replace 'noiseless' only if it is an unconnected token
2020-08-20 15:28:32 +02:00
Holger Vogt
ba7be26b95
If a g table source contains %, [, nor ] in its name,
...
replace it by _ in the a instance generated during parsing.
2020-08-20 15:18:40 +02:00
Holger Vogt
05bf86caaa
safeguard against empty lines which may be sent to shared ngspice
2020-05-06 11:12:21 +02:00
Holger Vogt
bbe81ca8f8
shared ngspice may transmit netlists with empty lines,
...
guard against crashing
2020-05-05 12:00:19 +02:00
Holger Vogt
cbab726d69
use memcpy instead of strncpy to copy an exact amount of characters
...
remove unused function header
2020-05-01 18:49:45 +02:00
Holger Vogt
c520a9a4b9
if lt(a) comp mode is set, replace 'noiseless' by 'noisy=0' in resistors
2020-04-25 10:30:05 +02:00
Holger Vogt
572daed2ec
Remove '.backanno' if LT campatibility mode is set
2020-04-21 20:02:18 +02:00
Holger Vogt
f5ebea5e9f
use internally predefined pow() function
2020-04-21 19:59:11 +02:00
Holger Vogt
4c80a1ab7d
fix a bug, use ciprefix instaed of cieq, cieq led to
...
always FALSE if statement
2020-04-21 19:55:42 +02:00
Holger Vogt
84ff135e5b
syntax check for vdmos instances with 'thermal' flag
2020-04-04 14:10:07 +02:00
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.
2020-04-04 14:09:25 +02:00
dwarning
edc5b5a4d4
VDMOS prevent fault if thermal switch is given but thermal nodes are not
2020-04-04 14:08:48 +02:00
dwarning
e9abecc8c7
change vdmos flag to thermal, not to confuse with b4soi
2020-03-15 08:51:15 +01:00
dwarning
3686dbfb78
filter only mos instances with thermal switch
2020-03-15 08:51:15 +01:00
dwarning
791f18053f
change vdmos flag to thermal, not to confuse with b4soi
2020-03-15 08:51:15 +01:00
Holger Vogt
71ad2903ff
plug a memory leak in inpcom.c vdmos code
2020-03-15 08:51:13 +01:00
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
2020-03-15 08:51:12 +01:00