Holger Vogt
7d59ad2db7
Create extra name derived from node name, but with / replaced by _,
to become part of the new voltage source name: avoid names
which are not parsed correctly by the B source equation parser.
1 year ago
Holger Vogt
60ddad4983
Make the resistor name unique for a device with multiple unconnected nodes
1 year ago
Holger Vogt
4f8cfbf9f9
Update copyright
2 years ago
Holger Vogt
d61a728688
Add function check_for_nodes to
check if there are enough tokens in an instance line.
2 years ago
Holger Vogt
0e465068b0
Identifier 'card' may not be available or not useful when
netlist is loaded via circbyline().
2 years ago
Holger Vogt
c796171638
Add char *lineinfo to parameters of fcn insert_new_line
2 years ago
Holger Vogt
89b25c5d58
Do not add line number 0, but the number of the original
.probe command to linenum_orig.
2 years ago
Holger Vogt
f3eb46e76d
Fix bug in fprintf
3 years ago
Holger Vogt
b034332e84
Improve warning message during evaluating .probe
3 years ago
Holger Vogt
e834c89313
Prevent a crash when number of nodes differs in subckt and X call.
3 years ago
Holger Vogt
63d86f5af8
Prevent a crash in strchr
Reported by KiCad Sentry
3 years ago
Holger Vogt
8915d42241
Prevent crash during .probe p(...) when no subcircuits are given.
3 years ago
Holger Vogt
9c6fe3f8e4
Definitely exclude A devices from power probing (and others with less than 2 pins).
3 years ago
Holger Vogt
33a3557910
Safeguard against NULL pointers
3 years ago
Holger Vogt
20711c1c25
Safeguard against NULL pointers
3 years ago
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.
3 years ago
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
3 years ago
Holger Vogt
9613625840
Prevent seg fault after strange input like
*no circuit
.save all
.probe alli
.op
.end
3 years ago
Holger Vogt
d39c60542d
Enable power measurement for W switch
4 years ago
Holger Vogt
79bb8edc90
Allow individual current measurements in switches or
linear dependent sources.
4 years ago
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).
4 years ago
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.
4 years ago
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.
4 years ago
Holger Vogt
6153f2c887
Remove the special handling of X... device names.
Subcircuit devices are saved with leading X in their names.
4 years ago
Holger Vogt
08a12b5355
Add a function itoa10 and use it
instead of non-standard itoa.
4 years ago
Holger Vogt
d04445e085
When calculating power, we need to exclude thermal nodes
of devices like diodes (d) and MOS (m)
4 years ago
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).
4 years ago
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)
4 years ago
Holger Vogt
56a3771d9a
.probe: replace (all) by alli (we only measure all currents)
4 years ago
Carsten Schoenert
486dd587d0
spelling: Fix misspelled word Instnace
4 years ago
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.
4 years ago
Holger Vogt
5adbfc1c86
Remove compiler warnings associated with snprintf()
Use memory allocated on the heap instead.
4 years ago
Holger Vogt
3bac1ffabe
Allow adequate size for copying.
Add the missing character string to fprintf.
4 years ago
Holger Vogt
11117912f9
typos
4 years ago
Holger Vogt
aaf586ae83
.probe: Add more safeguards to prevent crashes
in case of wrong user input
due to obtain empty lines in shared ngspice
4 years ago
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
4 years ago