Holger Vogt
f3eb46e76d
Fix bug in fprintf
2023-09-23 16:45:35 +02:00
Holger Vogt
b034332e84
Improve warning message during evaluating .probe
2023-09-19 14:57:22 +02:00
Holger Vogt
e834c89313
Prevent a crash when number of nodes differs in subckt and X call.
2023-05-27 10:48:30 +02:00
Holger Vogt
63d86f5af8
Prevent a crash in strchr
...
Reported by KiCad Sentry
2023-03-18 14:37:59 +01:00
Holger Vogt
8915d42241
Prevent crash during .probe p(...) when no subcircuits are given.
2023-03-18 14:35:33 +01:00
Holger Vogt
9c6fe3f8e4
Definitely exclude A devices from power probing (and others with less than 2 pins).
2023-03-18 14:31:05 +01:00
Holger Vogt
33a3557910
Safeguard against NULL pointers
2023-02-03 11:44:57 +01:00
Holger Vogt
20711c1c25
Safeguard against NULL pointers
2023-02-01 22:35:01 +01:00
Holger Vogt
49b7cb85db
Add a shunt resistor of 1e15 Ohms to any X (subcircuit call) line
...
when the node name contain 'unconnected' and .probe alli is called.
2023-01-15 13:38:15 +01:00
Holger Vogt
ebd430e51b
A preliminary fix to bug report 612
...
Don't set series voltage sources when flag probe_alli_nox
is set in .spiceinit
2023-01-09 16:32:00 +01:00
Holger Vogt
9613625840
Prevent seg fault after strange input like
...
*no circuit
.save all
.probe alli
.op
.end
2022-12-11 15:36:22 +01:00
Holger Vogt
d39c60542d
Enable power measurement for W switch
2022-10-07 13:18:51 +02:00
Holger Vogt
79bb8edc90
Allow individual current measurements in switches or
...
linear dependent sources.
2022-10-07 13:18:15 +02:00
Holger Vogt
7e610c8487
.probe alli improved:
...
* Enable current mesurement for I source
* Look at only the first 2 nodes of S and W switches
and F and G controlled current sources, measure current
with = voltage source added to second node. So we get
I(Fx), I(Gx), I(Sx), and I(Wx).
2022-10-07 13:17:30 +02:00
Holger Vogt
fc0bf595f2
Update to .probe command:
...
If no .save or save command given by the user, add '.save all' internally.
To do so, check for .save or save.
Update to the .probe p command (power measurement)
Add probe_int_ to internal nodes and instance names, where appropriate.
These nodes will be disregarded when setting up the plot structure.
2022-10-07 13:11:42 +02:00
Holger Vogt
fc83328952
Rename the internal circuit nodes generated by .probe
...
to probe_int_xxx to make it probe specific.
Don't save these nodes.
2022-10-07 11:34:04 +02:00
Holger Vogt
6153f2c887
Remove the special handling of X... device names.
...
Subcircuit devices are saved with leading X in their names.
2022-04-26 10:37:03 +02:00
Holger Vogt
08a12b5355
Add a function itoa10 and use it
...
instead of non-standard itoa.
2022-04-26 10:36:10 +02:00
Holger Vogt
d04445e085
When calculating power, we need to exclude thermal nodes
...
of devices like diodes (d) and MOS (m)
2022-04-26 10:35:56 +02:00
Holger Vogt
2fabc53f4f
Add flag 'power' to fcn setallvsources()
...
Add code to calculate the power dissipation in a device
(top level instances, including X (subcircuit) invocations).
2022-04-26 10:35:44 +02:00
Holger Vogt
a165556088
revert polarity of current mesurements:
...
current positive when flowing into device, e.g.
Ic, Ib of a positively biased npn.
Add current measurement for all nodes of a device,
e.g. .probe i(Q1) will measure Ic, Ib, Ie (and Is)
2022-04-26 10:35:29 +02:00
Holger Vogt
56a3771d9a
.probe: replace (all) by alli (we only measure all currents)
2022-04-25 21:29:39 +02:00
Carsten Schoenert
486dd587d0
spelling: Fix misspelled word Instnace
2022-01-02 13:51:44 +01:00
Holger Vogt
4f73c27d86
Memory access error: don't free GENinst->GENname.
...
Use memcpy to overwrite old name by a (shorter) new name.
Compiler warnings are thus removed.
2021-12-16 08:04:54 +01:00
Holger Vogt
5adbfc1c86
Remove compiler warnings associated with snprintf()
...
Use memory allocated on the heap instead.
2021-12-16 08:04:20 +01:00
Holger Vogt
3bac1ffabe
Allow adequate size for copying.
...
Add the missing character string to fprintf.
2021-12-13 22:31:19 +01:00
Holger Vogt
11117912f9
typos
2021-12-13 21:50:20 +01:00
Holger Vogt
aaf586ae83
.probe: Add more safeguards to prevent crashes
...
in case of wrong user input
due to obtain empty lines in shared ngspice
2021-12-13 21:48:21 +01:00
Holger Vogt
951be0ddb0
New dot command .probe:
...
Code to enable current measurements at all top level
device pins and to enable differential voltage measurements
between two (arbitrary, top level) device nodes.
Adds 0 V voltage sources for current measurements to selected or all
device nodes at top level (including X lines)
Adds an E source excited by two arbitrary nodes for differential
potential (aka voltage) measurements between these nodes
Function inp_probe() is called from inpcom.c
2021-12-13 21:46:57 +01:00