From 8111d5d4fc1f35a66ebbee22844a385dc87221d4 Mon Sep 17 00:00:00 2001 From: Florian Ballenegger Date: Thu, 17 Sep 2020 17:13:39 +0200 Subject: [PATCH] add to README.loop --- README.loop | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/README.loop b/README.loop index e0dd83d18..bea9dc1f9 100644 --- a/README.loop +++ b/README.loop @@ -18,7 +18,7 @@ Syntax General form: .loop dec/oct/lin = ... -: the probe device name. It could be a voltage source or any other device in the circuit. In the latter case, a terminal of the probe must be specified. Use syntax / for , where is a device name and is the terminal name of where the voltage source probe must be inserted. could also be a number specifying the terminal index of the device (e.g. 2 for gate of mosfet). must be a leaf device and can't be a subcircuit. +: the probe device name. It could be a voltage source or any other device in the circuit. In the latter case, a terminal of the probe must be specified. Use syntax / for , where is a device name and is the terminal name of where the voltage source probe must be inserted. could also be a number specifying the terminal index of the device (e.g. #2 for gate of mosfet). must be a leaf device and can't be a subcircuit. dec/oct/lin: specify the kind of sweep for frequency, similar to the AC analysis. @@ -78,3 +78,17 @@ In addition to the above output vectors, the loop gain T is analyzed for calcula phase margin: the phase margin of the loop in degrees. gain margin: the gain margin of the loop in dB. The gain margin is found only if the phase of T go through 180 degrees (in-phase positive feedback). The corresponding frequency is also printed. unity gain frequency: the frequency at which the loop gain T go below 1. + +Differential loop +----------------- +Differential loops are usually split into a differential loop and a common-mode loop. Such split can be accomplished by two ideal balun devices with two voltage source probes in between (one for the differential loop and one for the common-mode loop), as set in the example found in examples/loop/diffpair.cir. +A new ideal balun device was conviently added to ngspice as auxiliary to the loop analysis. +An example circuit simulation with a differential loop is found in examples/loop/diffpair.cir + +New syntax for netlist instances +-------------------------------- +As all the alphabet was already reserved for device prefix codes in ngspice, a special new syntax was introduced in the parser which works as: +# .. = .. = + can be any name, its first letter has no special significance. + is case insensitive and corresponds to the code name of the device type as set in the SPICEdev structure in each device source code. +Examples are: Resistor, Capacitor, Inductor, CCCS, CCVS, Diode, Vsource, etc.