Dependent Current Sources -- G Elements

Voltage Controlled Current Source (VCCS)

The syntax is:

Linear
Gxxx n+ n- <VCCS> in+ in- transconductance <MAX=val> <MIN=val>
+ <SCALE=val> <M=val> <TC1=val> <TC2=val> <ABS=1> <IC=val>
Polynomial
Gxxx n+ n- <VCCS> POLY(ndim) in1+ in1- ... <inndim+ inndim-> MAX=val>
+ <MIN=val> <SCALE=val> <M=val> <TC1=val> <TC2=val> <ABS=1> p0
+ <p1...> <IC=vals>
Piecewise Linear
Gxxx n+ n- <VCCS> PWL(1) in+ in- <DELTA=val> <SCALE=val> <M=val>
+ <TC1=val> <TC2=val> x1,y1 x2,y2 ... x100,y100 <IC=val> <SMOOTH=val>
Gxxx n+ n- <VCCS> NPWL(1) in+ in- <DELTA=val> <SCALE=val> <M=val>
+ <TC1=val> <TC2=val> x1,y1 x2,y2 ... x100,y100 <IC=val> <SMOOTH=val>
Gxxx n+ n- <VCCS> PPWL(1) in+ in- <DELTA=val> <SCALE=val> <M=val>
+ <TC1=val> <TC2=val> x1,y1 x2,y2 ... x100,y100 <IC=val> <SMOOTH=val>
Multi-Input Gates
Gxxx n+ n- <VCCS> gatetype(k) in1+ in1- ... ink+ ink- <DELTA=val> <TC1=val>
+ <TC2=val> <SCALE=val> <M=val> x1,y1 ... x100,y100<IC=val>
Delay Element
Gxxx n+ n- <VCCS> DELAY in+ in- TD=val <SCALE=val> <TC1=val> <TC2=val>
+ NPDELAY=val

Behavioral Current Source

The syntax is:

Gxxx n+ n- CUR='equation' <MAX>=val> <MIN=val>

Voltage Controlled Resistor (VCR)

The syntax is:

Linear
Gxxx n+ n- VCR in+ in- transfactor <MAX=val> <MIN=val> <SCALE=val>
+ <M=val> <TC1=val> <TC2=val> <IC=val>
Polynomial
Gxxx n+ n- VCR POLY(ndim) in1+ in1- ... <inndim+ inndim-> <MAX=val>
+ <MIN=val> <SCALE=val> <M=val> <TC1=val> <TC2=val> p0 <p1...>
+ <IC=vals>
Piecewise Linear
Gxxx n+ n- VCR PWL(1) in+ in- <DELTA=val> <SCALE=val> <M=val>
+ <TC1=val> <TC2=val> x1,y1 x2,y2 ... x100,y100 <IC=val> <SMOOTH=val>
Gxxx n+ n- VCR NPWL(1) in+ in- <DELTA=val> <SCALE=val> <M=val>
+ <TC1=val> <TC2=val> x1,y1 x2,y2 ... x100,y100 <IC=val> <SMOOTH=val>
Gxxx n+ n- VCR PPWL(1) in+ in- <DELTA=val> <SCALE=val> <M=val>
+ <TC1=val> <TC2=val> x1,y1 x2,y2 ... x100,y100 <IC=val> <SMOOTH=val>
Multi-Input Gates
Gxxx n+ n- VCR gatetype(k) in1+ in1- ... ink+ ink- <DELTA=val>
+ <TC1=val> <TC2=val> <SCALE=val> <M=val> x1,y1 ... x100,y100 <IC=val>

Voltage Controlled Capacitor (VCCAP)

The syntax is:

Gxxx n+ n- VCCAP PWL(1) in+ in- <DELTA=val> <SCALE=val> <M=val>
+ <TC1=val> <TC2=val> x1,y1 x2,y2 ... x100,y100 <IC=val >
+ <SMOOTH=val>

The two functions NPWL and PPWL allow the interchange of the `n+' and `n-' nodes while keeping the same transfer function. This action can be summarized as follows:

NPWL Function

For node `in-' connected to `n-';

If v(n+,n-) > 0, then the controlling voltage would be v(in+,in-). Otherwise, the controlling voltage is v(in+,n+)

For node `in-'connected to `n+';

If v(n+,n-) < 0, then the controlling voltage would be v(in+,in-). Otherwise, the controlling voltage is v(in+,n+)

PPWL Function

For node `in-'connected to `n-';

If v(n+,n-) < 0, then the controlling voltage would be v(in+,in1-). Otherwise, the controlling voltage is v(in+,n+)

For node `in-'connected to `n+';

If v(n+,n-) > 0, then the controlling voltage would be v(in+,in-). Otherwise, the controlling voltage is v(in+,n+)

G Element Parameters

ABS Output is absolute value if ABS=1.

CUR=equation Current output which flows from n+ to n-. The "equation", which is defined by the user, can be a function of node voltages, branch currents, TIME, temperature (TEMPER), and frequency (HERTZ).

DELAY Keyword for the delay element. The delay element is the same as voltage controlled current source except it is associated by a propagation delay TD. This element facilitates the adjustment of propagation delay in the subcircuit model process. DELAY is a Star-Hspice keyword and should not be used as a node name.

DELTA Used to control the curvature of the piecewise linear corners. Defaults to 1/4 of the smallest of the distances between breakpoints. The maximum is 1/2 of the smallest of the distances between breakpoints.

Gxxx Voltage controlled element name. Must begin with "G", which may be followed by up to 15 alphanumeric characters.

gatetype(k) May be AND, NAND, OR, or NOR. The value of k is the number of inputs of the gate. The x and y terms represent the piecewise linear variation of output as a function of input. In the multi-input gates only one input determines the state of the output.

IC Initial condition. The initial estimate of the value(s) of the controlling voltage(s). If IC is not specified, Default=0.0.

in +/- Positive or negative controlling nodes. Specify one pair for each dimension.

M Number of replications of the element in parallel

MAX Maximum current or resistance value. The default is undefined, and sets no maximum value.

MIN Minimum current or resistance value. The default is undefined, and sets no minimum value.

n+/- Positive or negative node of controlled element

NPDELAY Sets the number of data points to be used in delay simulations. The default value is the larger of 10 or the smaller of TD/tstep and tstop/tstep. That is,

 

The values of tstep and tstop are specified in the .TRAN statement.

NPWL Models the symmetrical bidirectional switch or transfer gate, NMOS

p0, p1 ... Polynomial coefficients. When one coefficient is specified, Star-Hspice assumes it to be p1, with p0=0.0, and the element is linear. When more than one polynomial coefficient is specified by p0, p1, p2, ..., the element is nonlinear. See Polynomial Functions.

POLY Polynomial dimension. If POLY(ndim) is not specified, a one-dimensional polynomial is assumed. Ndim must be a positive number.

PWL Piecewise linear function keyword

PPWL Models the symmetrical bidirectional switch or transfer gate, PMOS

SCALE Element value multiplier

SMOOTH For piecewise linear dependent source elements, SMOOTH selects the curve smoothing method.

A curve smoothing method simulates exact data points you provide. This method can be used to make Star-Hspice simulate specific data points that correspond to measured data or data sheets.

Choices for SMOOTH are 1 or 2. Specifying 1 selects the smoothing method prior to Release H93A. Specifying 2 selects the smoothing method that uses data points you provide. This is the default method starting with release H93A.

TC1,TC2 First- and second-order temperature coefficients. The SCALE is updated by temperature:

TD Time delay keyword

transconductance Voltage to current conversion factor

transfacto r Voltage to resistance conversion factor

VCCAP Keyword for voltage controlled capacitance element. VCCAP is a Star-Hspice keyword and should not be used as a node name.

VCCS Keyword for voltage controlled current source. VCCS is a Star-Hspice keyword and should not be used as a node name.

VCR Keyword for voltage controlled resistor element. VCR is a Star-Hspice keyword and should not be used as a node name.

x1,... Controlling voltage across nodes in+ and in-. The x values must be in increasing order.

y1,... Corresponding element values of x

Example

Switch

A voltage controlled resistor represents a basic switch characteristic. The resistance between nodes 2 and 0 varies linearly from 10meg to 1m ohms when voltage across nodes 1 and 0 varies between 0 and 1 volt. Beyond the voltage limits, the resistance remains at 10meg and 1m ohms respectively.

Gswitch 2 0 VCR PWL(1) 1 0 0v,10meg 1v,1m

Switch-level MOSFET

A switch level n-channel MOSFET can be modelled by the N-piecewise linear resistance switch. The resistance value does not change when the node d and s positions are switched.

	Gnmos d s VCR NPWL(1) g s LEVEL=1 0.4v,150g 1v,10meg 2v,50k
+ 3v,4k			 5v,2k

Voltage Controlled Capacitor

The capacitance value across nodes (out,0) varies linearly from 1p to 5p when voltage across nodes (ctrl,0) varies between 2v and 2.5v. Beyond the voltage limits, the capacitance value remains constant at 1 picofarad and 5 picofarads respectively.

	Gcap out 0 VCCAP PWL(1) ctrl 0  2v,1p 2.5v,5p

Zero Delay Gate

A two-input AND gate can be implemented using an expression and a piecewise linear table. The inputs are voltages at nodes a and b, and the output is the current flow from node out to 0. The current is multiplied by the SCALE value, which, in this example, is specified as the inverse of the load resistance connected across the nodes (out,0).

	Gand out 0 AND(2) a 0 b 0 SCALE='1/rload' 0v,0a 1v,.5a 
	+ 4v,4.5a 5v,5a

Delay Element

A delay is a low-pass filter type delay similar to that of an opamp. A transmission line, on the other hand, has an infinite frequency response. A glitch input to a G delay is attenuated similarly to a buffer circuit. In this example, the output of the delay element is the current flow from node out to node 1 with a value equal to the voltage across nodes ( in , 0 ) multiplied by SCALE value and delayed by TD value.

	Gdel out 0 DELAY in 0 TD=5ns SCALE=2 NPDELAY=25

Diode Equation

A forward bias diode characteristic from node 5 to ground can be modelled with a run time expression. The saturation current is 1e-14 amp, and the thermal voltage is 0.025v.

	Gdio 5 0 CUR='1e-14*(EXP(V(5)/0.025)-1.0)'

Diode Breakdown

Diode breakdown region to forward region can be modelled. When voltage across diode goes beyond the piecewise linear limit values (-2.2v, 2v), the diode current remains at the corresponding limit values (-1a, 1.2a).

	Gdiode 1 0 PWL(1) 1 0 -2.2v,-1a -2v,-1pa .3v,.15pa	.6v,10ua
+ 1v,1a 2v,1.2a

Triodes

Both the following voltage controlled current sources implement a basic triode. The first uses the poly(2) operator to multiply the anode and grid voltages together and scale by .02. The next example uses the explicit behavioral algebraic description.

	gt i_anode cathode poly(2) anode,cathode grid,cathode 0 0
	0 0 .02 gt i_anode cathode cur='20m*v(anode,cathode)
	*v(grid,cathode)'
 
Star-Hspice Manual - Release 2001.2 - June 2001