Some devices are implemented as part of the XSPICE 'code modelling' framework. This framework introduces some new features at the netlist level not supported by standard SPICE devices. These new features are described in this section.
All but one of these devices that use this framework are digital or mixed signal devices and the reference for these can be found at Digital/Mixed Signal Device Reference.
The exception is the S-domain Transfer Function Block which is a pure analog part.
In this topic:
Some models feature an arbitrary number of inputs or/and outputs. For example, an AND gate can have any number of inputs. It would be inflexible to have a separate model for every configuration of AND gate so a method of grouping connections together has been devised. These are known as vector connections. Vector connections are enclosed in square brackets. E.g. the netlist entry for an AND gate is:
Axxxx [ in_0 in_1 .. in_n ] out model_name
The pins in_0 in_1 to in_n form a single vector connection. Any number of pins may be placed inside the square brackets, in fact the same model may be used for devices with different numbers of inputs.
Some devices have a minimum and/or maximum number of pins that may be used in a vector connection. This is known as vector bounds and if they apply will be listed in the vector bounds column of the Connection Details table provided with every device definition.
In the device references that follow, each has a table titled Connection Details. Each table has a "Type" column and some have an "Allowed types" column. The type referred to here is the type of electrical connection e.g. voltage, current, differential or single-ended. Some devices allow some or all of their connections to be specified with a range of types. For example, the analog-digital converter has a single ended voltage input by default. However, using a simple modification to the netlist entry, an ADC can be specified with a differential voltage input or even a differential current. Changing the type of connection involves no changes to the .MODEL statement, only to the netlist entry.
The following table lists all the available types. The modifier is the text used to alter a connection type at the netlist level. This is explained below
Description | Modifier |
Single ended voltage | %v |
Single ended current | %i |
Differential voltage | %vd |
Differential current | %id |
Digital | %d |
Grounded conductance (voltage input current output) | %g |
Grounded resistance (current input, voltage output) | %h |
Differential conductance (voltage input current output) | %gd |
Differential resistance (voltage input current output) | %hd |
As well as type, all connections also have a flow referring to the direction of the signal flow. This can be in, out or inout. Voltage, current and digital connections may be in or out while the conductance and resistance connections may only be inout. Voltage inputs are always open circuit, current inputs are always short circuit, voltage outputs always have zero output impedance and current outputs always have infinite output impedance.
The conductance connections are a combined voltage input and current output connected in parallel. If the output is made to be proportional to the input, the connection would be a conductor with a constant of proportionality equal to its conductance, hence the name.
Similarly, the resistance connections are a combined current input and voltage output connected in series. If the output is made to be proportional to the input, the connection would be a resistor with a constant of proportionality equal to its resistance.
If a model allows one or more of its connections to be given a different type, this can be done by preceding the connection entry with the appropriate modifier listed in the table above. For example if you wish to specify a 4 bit ADC with a differential voltage input, the netlist entry would be something like:
A1 %vd ANALOG_INP ANALOG_INN CLOCK_IN [ DATA_OUT_0 DATA_OUT_1 DATA_OUT_2 DATA_OUT_3 ] DATA_VALID ADC_4
◄ Overview | Using Expressions ▶ |