Holger Vogt
c43c6f6ca4
improve comment
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
87751ad073
Make the ngSpice_Circ(char** circa) more robust:
...
Error message when .end card is missing
Reset if .end card is missing, to allow loading
a netlist again.
NULL as last element is no longer required, but .end card
(this has been implicitedly assumed).
Remove a bug that skippoed the last line (the .end card).
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
1ef4115578
In a command 'meas tran teval when v(2)=1' the rhs
...
should be treated as a number '1', not as a vector v(1)
2020-12-22 17:56:18 +01:00
Holger Vogt
6055fda73d
spaces
2020-12-22 17:56:18 +01:00
Holger Vogt
5c4af54be1
Windows.h -> windows.h
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
Holger Vogt
95754d29c1
Introduce variacle 'plainlet' which allow simple copying
...
of vectors, even if the right hand side vector name
contain forbidden characters (like math characters).
set plainlet
let newvec = v(/out)
unset plainlet
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
d06ff2abab
New variable 'plainwrite' added. Allows 'write' with node names
...
containing characters like + - /. Function are the disabled.
This replaces the automatic selection of this mode by compat flags,
which is not transparent enough to the user.
2020-12-22 11:09:40 +01:00
Holger Vogt
36e2a9af4d
Add variable 'plainplot' to allow plotting without
...
function support, but with node names incl chatacters like + - /.
Flag to command 'plot' is renamed to plainplot.
Error message added if vector not found.
Example file added.
2020-12-22 11:09:27 +01:00
Holger Vogt
b76ac6be1c
Add writing all vectors if compat mode eg or ki is selected.
2020-12-22 11:09:09 +01:00
Holger Vogt
f0090508b0
If new parameter 'plain' is added to the 'plot' command,
...
all expression handling is skipped, vectors are plotting as is.
This allows nodes names with vectors like v(+vs) or /out
to be plotted without need resorting to double quotes.
2020-12-22 11:08:57 +01:00
Holger Vogt
84d3d8c143
Don't add v(...) around output vector if compat mode 'eg' is set.
2020-12-22 11:08:22 +01:00
Holger Vogt
c90230b43f
If the compatibility flags ki or eg are set, the 'write' command
...
will not use function parsing and evaluation, but simply plot
the listed vectors. vec1 vs vec2 is also not supported.
This option is useful if node names vs+ or /mynode are used and
have to be written into a raw file, as may be used by KiCad or EAGLE.
2020-12-22 11:08:03 +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
dd86bdee46
Enlarge the buffer size for command 'listing' from 512 to 4096 bytes.
2020-12-22 11:07:14 +01:00
Holger Vogt
3e98cecd56
enable paths with spaces for finding 'spinit'
2020-12-22 11:07:02 +01:00
Holger Vogt
c67da190ef
If function 'db' is evaluated, set
...
v_type to SV_DB.
2020-12-22 11:05:33 +01:00
Holger Vogt
97db844944
Prevent raw file entries (by the 'write' command) like
...
6 i(i(v_vsupply2)) current
2020-12-22 11:05:21 +01:00
Holger Vogt
f49922c1f1
If a new vector is created by the functions cph or ph,
...
its type should be 'phase', not voltage. Thus prevent
raw file entries (created by the 'write' command like
4 v(cph(vout2)) voltage
2020-12-22 11:05:10 +01:00
dwarning
f12dfc6e7b
prevent garbage output of X11 plotting function
2020-12-22 11:04:24 +01:00
Holger Vogt
7360d8aa66
Fix a typo
2020-12-22 11:03:44 +01:00
Holger Vogt
4796face12
Make message more verbose by printing the scale value
2020-12-22 11:03:22 +01:00
Holger Vogt
28861739f8
allow writing character '%'
2020-10-16 18:12:31 +02:00
Holger Vogt
af99beb6a2
Allow simple copying from start time to end time
2020-10-15 17:45:08 +02:00
Holger Vogt
013c74918f
Command 'cutout': Don't add the scale vector to nv->v_scale.
...
So the new plot with its vectors copied resembles the old plot.
2020-10-15 17:44:30 +02:00
Holger Vogt
a836f81d62
This is a quick fix to the Windows printing function.
...
Tested with pdf and a color laser printer.
Still some bugs: the grid needs to be fixed.
2020-10-15 17:41:58 +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
4bcacb310d
enable XSPICE %vnam in subcircuits.
...
The token following after %vnam has to be
tranlated as an instance during subcircuit expansion.
2020-10-10 13:53:10 +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
990d87bf1c
replace gettok by gettok_node to ignore parentheses when reading
...
a .model line in the altermod ... file ... command.
2020-10-10 12:19:32 +02:00
Holger Vogt
b0a790a463
proper size_t to int conversion
2020-10-10 12:12:59 +02:00
Holger Vogt
8ea8ddcc03
simplify the previous commit, single step warp if multibyte utf-8 character
2020-10-10 12:12:37 +02:00
Holger Vogt
f911758e4b
X11: re-enable writing text to a graph if libxft is used
2020-10-10 12:12:21 +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
26a4a32b8b
avoid some compiler warnings 'referencing a NULL pointer'
2020-08-20 15:49:05 +02:00