Index: trunk/doc/user/07_io/export_spice/auto_bride.html =================================================================== --- trunk/doc/user/07_io/export_spice/auto_bride.html (nonexistent) +++ trunk/doc/user/07_io/export_spice/auto_bride.html (revision 7793) @@ -0,0 +1,38 @@ + + + +

target_spice: automatic bridge

+

+In some cases invisible bridges need to be inserted at ports. A typical +example is ngspice mixed mode simulation (releases before 2023) +where ADC or DAC components have to be applied in between the analog and +the digital side of the circuit. It would be possible to add these +converters manually on the schematics, but that'd clutter the drawing. +An alternative approach is using automatic bridges specified in +terminal attributes. +

+The relevant terminal attributes are spice/bridge/model and spice/bridge/dir. +When spice/bridge/model is present, it names a spice model (in +the sheet local spice lib or in the external spice lib) that is placed +at the port by target_spice. This placement happens in the abstract mode: +first the original network connection is cut at the port, then a new instance +of the converter is inserted, connected to the original network +and a new network segment is introduced to connect the other port of the +converter and the original port. +

+What instance really means depends on the spice dialect. For ngspice +it is enough to create one component per converter type and it acts as a +multi-slot or multi-port converter array with vector input and vector output. +For xyce a discrete converter needs to be placed. An user implemented converter +may be either way. By default the code assumes ngspice and array/vector +converters, but TODO. +

+The converter is assumed to have only 2 ports, one input and one output. +Order of the connections, or in other words direction of the converter +matters. This can be controlled by the optional spice/bridge/dir +terminal attribute, which should be either "n1p2" or "p1n2". The former +means "original network on port 1 of the converter, original port on +port 2 of the converter", the latter is the opposite. When spice/bridge/dir +is not specified, the code makes an educated guess by the model name, +which should contain either "adc" or "dac". +