Mixed Mode - Analog/Digital Simulation

Currently there is not an extensive library of digital model parts, although very complex parts can indeed be created. There is no real major limit to the digital functionality of the XSpice engine, but SuperSpice has been optimized towards analog and mixed-mode designs rather then for pure digital designs.

There are two ways to do simulations that contain both analog and digital functions.

1 Use an analog circuit representation of digital functions. Simulations run slower then method two, but has the advantage of more accurately modeling the real circuit. If there are only a few digital functions required, this is a preferred method.

2 Use the direct digital components built into the XSpice engine. Simulations run faster then method 1, but can introduce some issues in convergence and issues in ac analysis.

Mixed Mode Simulation with Analog Parts

There are basic analog versions of digital components in the "Mixed Mode" symbol folder. Place these components in the same way as another components. Note that the power supplies pins must be connected. To make other models e.g. ones with different speed characteristics, copy the exiting models and adjust the mosfet parameters. Note that these analog versions of digital components have a low fan out. If they are to low loads, a buffer must be used.

Mixed Mode Simulation with Digital parts

1 Interfaces between analog and xspice digital components must be made. Basic XSpice digital parts are in the Digital component symbol folder. Refer to the XSpice manual for more information on setting up other digital parts.  

Either:

2 Enable the auto analogue to digital converters  Simulation Setup Output Tab "SS". This transparently, and automatically places the required a/d and d/a converters between the relevant nodes.

The system relies on the names in digital .subckts be formatted as follows

digital input         #any_name 

digital output      $any_name

That is digital names require either a $ or # as the first letter in their names. Analogue names must never have these special characters.

The digital voltage level is also set via the  Simulation Setup Output Tab "SS". dialog.

Or:

3 Between every connection between a digital and analog component place a digital d/a or digital a/d interface component, respectively. This also includes any ground/supply connection required to force a digital 0 or 1 on a digital input. A ground cannot be connected directly to a digital input. xspice digital pull-up and pull down components can be used instead.

The interface AD bridge parts  are the parts in the "Mixed Mode" symbol folder named A/D Interface and D/A Interface as are the other digital parts such as SR, JK and D type bistables. Note that there are no power supply pins for digital components.

There is also an "analogue" D/A and D/A as distinct from the digital a/d d/a described above. These components also interface the analogue signal to the digital signal, but have power supply pins to allow for programmability of the interface voltages levels. The Analogue interface components will switch at half the supply voltage applied to them. The digital versions are fixed by the xspice model that they are attached to.

Digital symbols may be created in the symbol editor and attach either digital xspice models or xspice subcircuits to them.

Digital Simulation Errors

One cause for error is due to SuperSpice's the automatic generation of voltage sources in the pins of .subckts so that pin currents can be probed. User digital models added with nominal analog pin names will generate a  voltage sensing source and will cause a conflict with the digital nodes. To avoid this, make sure that at least on pin name has "!" attached to it. This will prevent SuperSpice from generating the additional voltage sources. 

Digital Subcircuit Schematics

Make sure that subckt connectors for subckt schematics that connect to digital signal have either # or $ as the first letter of their names.

Single Run Types Only

Only a single run type can be enabled at a time with XSpice digital devices. That is, OP, AC, TRAN, DC types can only be enabled one at a time.

Contents