Holger Vogt
d19c8e7f41
Efficiency: Remove setting the random seed to behind the options selection
...
Evaluate '.options cshunt=xx' earlier to allow the following:
Set the option by calling INPpas4() during parsing the circuit,
before .ic is set.
Ckt and Task cshunt are still set, but their values are available
only too late for INPpas4(), but may be used by command 'option'
(w/o parameters) for assessing the options and their values.
2021-07-02 11:53:42 +02:00
Holger Vogt
f8357dad88
Prepare Cshunt: add a cpacitor to each voltage node
...
Function inppas4() will add the extra caps, to be done.
2021-07-02 11:52:15 +02:00
Holger Vogt
db5c6cd0ec
Add some comments for inppas1,2,3
2021-07-02 11:51:57 +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
8da2f3c16d
unify the evaluation of '.options scale=xx'
...
.option in a netlist will override 'options'
from spinit, .spiceinit or a script
'.options scalm=xx' yields a warning, it is not supported.
2021-07-02 11:50:17 +02:00
Holger Vogt
9311674499
re-enable PostScript/SVG to file by pushbutton
...
on the ngspice plot window, avoid crash due to double freeing.
2021-03-19 15:07:33 +01:00
Holger Vogt
e1ae8c7495
remove memory leak
2021-03-19 15:07:23 +01:00
Holger Vogt
9f6d550837
Remove memory leaks in the SVG code
2021-03-19 15:06:59 +01:00
Holger Vogt
74a615d5af
Free tmalloced Cfg.strings[i]
2021-03-19 15:06:49 +01:00
Holger Vogt
02b4f06f2d
variables like color1 may override thie svg_intopts and svg_stropts.
...
Unsetting the variables will reset to the default.
Malloced colors and cfg.strings will be freed again.
Examples do show more of the options.
2021-03-19 15:06:35 +01:00
Holger Vogt
4303534f91
Shift colorID evaluation to a place after svg_stropts is read.
...
Remove unused.
2021-03-16 11:01:54 +01:00
Holger Vogt
1ba168ff30
clarify call to gnuplot on Linux/Cygwin
2021-03-14 15:33:17 +01:00
Holger Vogt
7b9d1fb74a
enable variable 'nolegend' for gnuplot
2021-03-14 15:33:10 +01:00
Holger Vogt
f61ea3aa96
if 'set nounits' is given, plotting of the units is suppressed
...
(they may be added manually to the y and x labels for SI conformity).
2021-03-14 15:32:49 +01:00
Holger Vogt
43f3fceb75
enable svg also for console app on Windows
2021-03-14 15:32:31 +01:00
Holger Vogt
f31ae08f0b
remove unused args
2021-03-14 15:32:15 +01:00
Holger Vogt
1607b3a21f
X11: Add a button for writing an SVG file to the plot window.
...
Update button texts.
Add a function hardcopySVG to write the SVG file, called by
clicking the SVG button.
2021-03-14 15:32:03 +01:00
Holger Vogt
43c44a8ca9
correct description
2021-03-14 15:31:57 +01:00
Holger Vogt
1f54a6add3
WinGUI: Make the text output from com_hardcopy available immediately
...
by call to function UpdateMainText.
Enable color for postscript output.
2021-03-14 15:31:45 +01:00
Holger Vogt
683ef77955
Separate color and b&w
...
b&w in the plot window is not(yet) supported.
2021-03-14 15:31:07 +01:00
Holger Vogt
6d388e1679
Select black&white, if appropriate
...
Return colorID to previous values after hardcopying.
2021-03-14 15:30:59 +01:00
Holger Vogt
391822b558
use colorN as for normal plots
...
color0 is background
svg_intops and svg_stropts may set all parameters
2021-03-14 15:30:33 +01:00
Holger Vogt
bc678baaca
modified from Giles Atkinson's patch:
...
use hardcopy entries to set variables
maybe overridden by stropts and intopts list variables
2021-03-14 15:30:24 +01:00
Holger Vogt
6b4d2a9241
separate svg and postscript handling
2021-03-14 15:30:13 +01:00
Holger Vogt
dacd727d87
separate svg and postscript
...
suitable text placement for svg
2021-03-14 15:30:06 +01:00
Holger Vogt
87b59d22a5
add generation of svg graphics file
...
based on patch no. 97 by Giles Atkinson
2021-03-14 15:29:53 +01:00
Holger Vogt
b86c85f85b
Safeguard against usage of --with-readline or --with-editline
...
Some package maintainers have erroneously used the above ./configure
flags during compiling libngspice-0.so. This has led to an unresolved
symbol history_file with ngspice-34.
2021-02-21 16:49:00 +01: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
a77b529928
set the locale to "C" locally, if shared ngspice
2021-01-29 10:44:28 +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
433a76a1f2
Guard against vector "time" not being available
2021-01-28 17:01:30 +01:00
Holger Vogt
c8a7b69190
re-enable setting options when 'set ngbehavior=hs' is set.
2021-01-27 16:29:15 +01:00
Holger Vogt
ca26364a7a
Remove "incompatible pointer" warning
2021-01-26 18:18:28 +01:00
Holger Vogt
8de513e8e9
ngspice.exe and .dll (.so): seperate the main files:
...
main.c now belongs to exe, sharedspice.c to dll (so)
2021-01-26 18:17:59 +01:00
Holger Vogt
fb8e974ac4
i-sweep sall become a current vector (SV_CURRENT)
2021-01-20 16:49:14 +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
a86a500b07
checkspeed: use startclock instead of lastclock to ensure
...
Linux compatibility.
2021-01-20 16:47:48 +01:00
Holger Vogt
2a2a488f7d
If 'set ngdebug', and if transient simulation,
...
create a vector speedcheck in the tran plot
which contains the real time versus simulated time,
to check for obstacles during the course of the
transient simulation. If command 'save' is given,
one has to add speedcheck to obtain this vector.
2021-01-20 16:47:27 +01:00
Holger Vogt
c891bf846c
reduce precision to avoid false rounding
2021-01-20 16:46:59 +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
273b0fb4a3
fix a plotting bug with xlog axis and ylabels
2021-01-20 16:45:54 +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
059e869754
free the wordlist wle to avoid memory leaks
2021-01-20 16:42:33 +01:00
Holger Vogt
02630c0af2
fix a bug in printing the compatibility status
2021-01-20 16:41:53 +01:00
Holger Vogt
5af7f0ff78
sort instance list entries: RHS numbers (like nf=2) come first,
...
expression then follow.
2021-01-20 16:41:25 +01:00
Holger Vogt
4a6fff05b6
typo
2021-01-05 23:11:50 +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
9485a51928
Re-enable the 'hardcopy' command
...
Fixes support-requests #53 by Paolo M.
2021-01-02 19:10:30 +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
3c354092ff
Line endings from \r\n to \n
2021-01-02 19:06:58 +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
98eb5bf475
bug #537 : remove memcopy with overlapping strings
...
Bug reported by Ronan BARZIC
2021-01-02 19:02:29 +01:00
Holger Vogt
86f5a9b819
Only print the devices that are really used in the circuit
...
(don't print the 0 occurencies).
2021-01-02 19:02:07 +01:00
Holger Vogt
e8aea4967c
Remove some compiler warnings
2021-01-02 19:00:48 +01:00
Holger Vogt
2359f28812
Remove compiler warning
...
cast between incompatible function types from
‘void (*)(int, int)’ to ‘void (*)(int)’
2021-01-02 19:00:29 +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
014dfe1b7b
The old inp_deckcopy() is a safer way of copying, while retaining
...
the correct line numbers for parameter substitution.
2020-12-22 17:56:19 +01:00
Holger Vogt
b1d062668c
When there is no model found, and we have an m devices,
...
set the number of nodes to 4. This has to be fixed (find
a way to detect the number of nodes automatically).
2020-12-22 17:56:19 +01:00
Holger Vogt
b0a2ab5729
A FIXME: The number of nodes is fixed to 4!
...
Better make this flexible, but how to detect this number safely?
2020-12-22 17:56:19 +01:00
Holger Vogt
5366f946eb
Remove more compiler warnings
2020-12-22 17:56:19 +01:00
Holger Vogt
238f8d393a
Suppress some compiler warnings
2020-12-22 17:56:19 +01:00
Holger Vogt
3c2f6585e0
Add some comment.
2020-12-22 17:56:19 +01:00
Holger Vogt
e1eb851ec4
Add function rem_unused_mos_models()
...
Netlist is flat at this stage, all numbers expanded,
but not yet parsed into the circuit structure.
So again try to remove unused MOS models.
All binning models are still here when w or l have been
determined by an expression from within the PDK.
2020-12-22 17:56:18 +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
5ee6a98e4b
Add a comment
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
8c253524af
With the new inp_deckcopy_ln treat the first line
...
in the deck equal to all other lines.
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
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
Holger Vogt
458411b2e1
more precise freeing the wordlist, depending on exit point
2020-08-20 15:48:45 +02:00
Holger Vogt
e3aad7849c
remove vceo= and icrating= from bjt model cards
2020-08-20 15:47:49 +02:00
Holger Vogt
23ceaabf83
fix a memory leak
...
Reported in bug report 504 by Ferdy
2020-08-20 15:41:39 +02:00
Holger Vogt
a04c909a23
Don't add copied scale vector as new vector, but as new scale vector,
...
thus preventing crash after pushing X11 'Hardcopy' twice or
pushing 'quit' after 'Hardcopy'.
Scale vector was deleted two times, then crashimg ngsoice.
2020-08-20 15:41:15 +02:00
Holger Vogt
c68940712d
prevent writing beyond end of buffer
2020-08-20 15:39:55 +02:00
Holger Vogt
ebb1e953fe
Streamline the compatibility flag generation
2020-08-20 15:39:19 +02:00
Holger Vogt
f03a32287f
If 'set ngbehavior=ki' in .spiceinit or flag 'kicad' on the plot line:
...
Add " around vector names containing character /
Numerical ivision in plot line then requires spaces around /
2020-08-20 15:39:00 +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
0caeaccdd3
fix typo
2020-08-20 15:38:18 +02:00
caand
6907d17985
add missing get_sysmem() when no info available
2020-08-20 15:29:49 +02:00
Holger Vogt
a406af26d6
bug fix 'extern int sh_vecinit()', not void
...
See patch #96 , thanks to Balazs Kovacs
2020-08-20 15:29:42 +02:00
Holger Vogt
c8c58b9f5b
Print out the netlist sent to ngspice by caller via 'circbyline'
...
or ngSpice_Circ
2020-08-20 15:29:12 +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
fe28feae4e
Cut out part of each vector of the current tran plot,
...
from times cut-tstart to cut-tstop and copy these
into a new tran plot. A new scale vector 'time' will be
generated as well. Vectors that are shorter than the
new scale vector will not be copied.
2020-08-20 15:28:48 +02:00
Holger Vogt
71338c3271
replace 'noiseless' only if it is an unconnected token
2020-08-20 15:28:32 +02:00
Holger Vogt
ba1945d685
enable flags xdelta, ydelta for gnuplot command
2020-08-20 15:27:46 +02:00
Holger Vogt
2c0729e8de
Print also the bool value 'off'.
...
Do not abort ngspice when vector LIST cannot be printed,
just skip printing and continue.
2020-08-20 15:26:38 +02:00
Holger Vogt
8f4e512826
ust tmpstr instead of second strstr()
2020-08-20 15:26:30 +02:00
Holger Vogt
e6fdf5f7e2
Make PPerror message more verbose:
...
give hint to buggy line segment
2020-08-20 15:26:10 +02:00
Holger Vogt
064bd39a2f
Unify batch mode and control mode raw file output:
...
Voltage is always named as v(nodename)
2020-08-20 15:25:50 +02:00
Holger Vogt
527abee022
Do not print "Units" on a graph, if unknown type
...
or settype notype is given.
2020-08-20 15:25:00 +02:00
Holger Vogt
6b0104849e
Add statistics: load, subckt expansion, and parse times
2020-08-20 15:23:19 +02:00
Carsten Schoenert
5a0ed18907
Small fixup for misspelled words
2020-08-20 15:22:48 +02:00
holger
569bc228fd
If code completetion is deselected, don't add keywords or key commands.
...
To prevent a crash in shared ngspice
2020-08-20 15:22:36 +02:00
Holger Vogt
0cf6b89eb3
during removing the plot 'const', also delete the hash table
2020-08-20 15:21:49 +02:00
Holger Vogt
f83bbb0d0f
delete 'myvec' upon 'quit'
2020-08-20 15:21:29 +02:00
Holger Vogt
8be33bb361
clear all variables upon 'quit'
2020-08-20 15:21:12 +02:00
Holger Vogt
05f3d21c3e
reset control structures (commands saved) upon 'quit'
2020-08-20 15:20:39 +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
8d64983659
const parameter added
2020-05-06 11:12:54 +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
dd5d1f1868
new copyright notice added
2020-05-03 11:47:22 +02:00
Holger Vogt
70be7508ce
Prevent 'unused variable' compiler message
2020-05-03 00:49:53 +02:00
Holger Vogt
13c23fd71b
Prevent buf2 buffer overflow by limiting the the amount of bytes printed
2020-05-03 00:19:48 +02:00
Holger Vogt
e0f5181bee
Correct comment
2020-05-02 20:16:48 +02:00
Holger Vogt
8a1eff8e88
Add function 'remzerovec' to remove vectors of length 0
...
from current plot. Maybe of interest if you have option
savecurrents, write xx all, and ac generates length 0 vectors
2020-05-02 20:06:58 +02:00
Holger Vogt
3a00520071
Improve error message
2020-05-02 14:59:31 +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
5e37955dc5
prevent buffer overrun by using snprintf
2020-05-01 18:48:18 +02:00
Holger Vogt
8ea51cc2f3
If command 'source' fails, don't move on with the script
...
(and od nonsens simulations), but stop ngspice and await
detaching (shared ngspice), or wait for user input.
2020-04-28 17:23:07 +02:00
Jim Monte
0a8f700311
typo
2020-04-27 10:26:36 +02:00
Jim Monte
01574b91b5
remove unused
2020-04-27 10:26:22 +02:00
Jim Monte
9d714fe1bf
#includes modified
2020-04-27 10:24:45 +02:00
Jim Monte
bd84e4be6c
error messages
2020-04-27 10:23:33 +02:00
Jim Monte
7f82a4e036
FALLTHROUGH
2020-04-27 10:22:58 +02:00
Jim Monte
1d62ae2d97
type casts
2020-04-27 10:22:40 +02:00
Jim Monte
ca2be5dd41
More efficient utf-8 to tchar conversion
...
remove 'graph' from SetColor
2020-04-27 10:18:10 +02:00
Jim Monte
3b0b944128
#include sequence, error message
2020-04-27 10:17:49 +02:00
Jim Monte
b5ce669de5
fgets error
2020-04-27 10:17:22 +02:00
Jim Monte
d96ea2490a
EXITPOINT, memory leaks upon failure
2020-04-27 10:16:55 +02:00
Jim Monte
9a83e6705c
#include resource.h added, fcn parameter void
2020-04-27 10:16:19 +02:00
Jim Monte
3a72b8e562
const qualifier, graph removed from SetColor,
2020-04-27 10:16:02 +02:00
Jim Monte
a3a8bc702d
type modifier, parameter graph removed from SetColor()
2020-04-27 10:15:32 +02:00
Holger Vogt
5b98b1e723
typüe modifier
2020-04-27 10:15:01 +02:00
Jim Monte
c8bf3a776c
error message
2020-04-27 10:14:13 +02:00
Jim Monte
19318929c1
modifier const, error message if 'system' fails
2020-04-27 10:13:50 +02:00
Holger Vogt
9af5e20eaf
formatting
2020-04-27 10:13:11 +02:00
Jim Monte
1e938f91b1
Error message if printing fails
2020-04-27 10:12:36 +02:00
Holger Vogt
e3441044dd
formatting
2020-04-27 10:12:19 +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
74dbb1e843
Commit [88653f] Fixed assorted compiler warnings, memory leaks, etc.
...
branch beta_jdm by Jim Monte
2020-04-25 10:29:16 +02:00
Holger Vogt
ca05aa318b
Commit [88653f] Fixed assorted compiler warnings, memory leaks, etc.
...
branch beta_jdm by Jim Monte
2020-04-25 10:29:00 +02:00
Holger Vogt
779bd0e6e2
Commit [88653f] Fixed assorted compiler warnings, memory leaks, etc.
...
branch beta_jdm by Jim Monte
2020-04-25 10:28:49 +02:00
Holger Vogt
a084f4f2b5
avoid type conversion warning size_t -> int
2020-04-25 10:28:34 +02:00
Holger Vogt
d3866a6315
Spice_Notice is never NULL
2020-04-25 10:28:07 +02:00
Holger Vogt
fdbcdb5b7d
apply const qualifier appropriately
2020-04-25 10:27:28 +02:00
Holger Vogt
b3fdff7bc0
Spice_Build_Date is never NULL
2020-04-23 13:30:55 +02:00
Holger Vogt
1f8b179ef9
typo
2020-04-21 20:02:31 +02:00
Holger Vogt
572daed2ec
Remove '.backanno' if LT campatibility mode is set
2020-04-21 20:02:18 +02:00
Holger Vogt
b701a6347d
cktislinear(): coupling of inductors is also linear
2020-04-21 20:02:05 +02:00
Holger Vogt
bad2a4e467
Guard XSPICE plot switching against circuit being removed already
2020-04-21 20:01:49 +02:00
Holger Vogt
bbb0007466
add function EVTswitch_plot() to switch the event data
...
according tothe (analog) plot. Called from plot_setcur()
in vetors.c, when command 'setplot xxx' is given.
2020-04-21 20:00:17 +02:00
Holger Vogt
d72b4c415f
get the plot name into the event job
2020-04-21 19:59:58 +02:00
Holger Vogt
f5ebea5e9f
use internally predefined pow() function
2020-04-21 19:59:11 +02:00
Holger Vogt
d8085ed594
guard against ft_curckt->ci_ckt == NULL
2020-04-21 19:58:36 +02:00
Holger Vogt
11b22c8f46
showmod will no longer crash ngspice if run after some error
2020-04-21 19:58:07 +02:00
Holger Vogt
6ab1f8b2d6
add mfg to the .model tokens to be ignored during altermod
2020-04-21 19:57:47 +02:00
Holger Vogt
87101cd26d
no double parens
2020-04-21 19:56:55 +02:00
Holger Vogt
55f3776fc1
add a warning if file with modified parameters has not been found.
...
Then ignore the altermod command.
2020-04-21 19:56:27 +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
dwarning
d735c60183
no size_t cast for GlobalMemoryStatusEx result
2020-04-21 19:52:05 +02:00
Holger Vogt
c4e23989f3
Don't us atexit(), but delete memory during 'quit'
2020-04-04 14:22:04 +02:00
Holger Vogt
c2513af3e8
remove code that leads to crash if tran simulation is
...
interrupted and reset is sent (KiCAD)
2020-04-04 14:21:49 +02:00
Holger Vogt
1a9c1b8c24
remove unused code snippet
2020-04-04 14:21:33 +02:00
Holger Vogt
9edc436ef7
remove SIGINT handling which was not functional
...
add SIGSEGV handler which may be excluded by
set nosighandling
2020-04-04 14:19:55 +02:00
dwarning
3999dcc700
w and l must be exact altermod parameter for MOS binning
2020-04-04 14:16:47 +02:00
Holger Vogt
ded0092ad6
If ngSpice_Command(NULL) is sent to shared ngspice,
...
the internal control structure memory is freed.
2020-04-04 14:15:38 +02:00
Holger Vogt
d3fcf2f43f
restrict removal of arg only to comma operator,
...
otherwise functions with a single variable may fail
2020-04-04 14:13:35 +02:00
Holger Vogt
4a3b193154
remove memory leak in function parser (bug. no 478),
...
second case
2020-04-04 14:13:01 +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
Holger Vogt
0490bc090b
Allow 3-terminal MOS devices (e.g. VDMOS),
...
prevent crash upon user error
2020-03-15 10:59:05 +01:00
Holger Vogt
11cf6e709b
third trial: get the token i(vss) as a whole in the lexer,
...
this prevents the parser from generating the spurious vector vss.
No need to do an extra translation i(vss) -> vss#branch.
2020-03-15 10:58:56 +01:00
Holger Vogt
7a7f717574
make flag 'nolegend' localfor each plot
2020-03-15 08:51:17 +01:00
Holger Vogt
1398ee7aa0
set the proper preprocessor flag __MINGW32__
2020-03-15 08:51:17 +01:00
Holger Vogt
0e4b736a5d
remove outdated function GlobalMemoryStatus(&ms)
2020-03-15 08:51:17 +01:00
Holger Vogt
09d3fbe3ad
remove false bracket in EXT_ASC
2020-03-15 08:51:17 +01:00
Holger Vogt
027b342a9c
prevent crash if premature exit (without ckt)
2020-03-15 08:51:17 +01:00
Holger Vogt
ded6bbbe34
make declaration inline
2020-03-15 08:51:16 +01:00
Holger Vogt
10c312856e
re-enable making nutmeg
2020-03-15 08:51:16 +01:00
Holger Vogt
2f23c58585
plug a memory leak (pll-xspice.cir)
2020-03-15 08:51:16 +01:00
Holger Vogt
14c0828a65
plug a memory leak (IXTH80N20L-IXTH48P20P-quasisat.sp)
2020-03-15 08:51:16 +01: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
Holger Vogt
f24ed96cbd
plug some memory leaks
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
Jim Monte
b9d45349d5
Added featurest to com_let to allow default low and high indices and to allow the last dimension to default to its full range
2020-03-15 08:51:15 +01:00
Holger Vogt
e53632c368
When plotting arrays of curves, plot lines only in the direction
...
of (in absolute terms) growing x values.
Example: MOS output characteristics.
In the rare case of plotting versus varying x directions
(e.g. example memristor.sp), one has to add the flag
'retraceplot' to the plot command.
2020-03-15 08:51:14 +01:00
Holger Vogt
14b154f5f3
Copy the scale vector as well and attach it to the data vector.
...
Remove it again when the graph is destroyed.
2020-03-15 08:51:14 +01:00
Holger Vogt
f518766c66
add a slight offset between y axis labels and grid
2020-03-15 08:51:14 +01:00
Holger Vogt
1919cf5c94
replace variable 'gridwidth' by 'xgridwidth'
2020-03-15 08:51:13 +01:00
Holger Vogt
c2cf4d7eda
required for reliable re-plotting, however still has the
...
return line bug no #472
2020-03-15 08:51:13 +01:00
Holger Vogt
acbec3ae81
Preliminary 'fix' to a plotting bug (visible return line in an array of curves):
...
Partially undo code added in commit 10415875f4 /
This will need further discussion or updates
2020-03-15 08:51:13 +01:00
Holger Vogt
71ad2903ff
plug a memory leak in inpcom.c vdmos code
2020-03-15 08:51:13 +01:00
Holger Vogt
8ff4c7cd3b
just another remains of quote
2020-03-15 08:51:12 +01:00