Voltage Dependent Current Sources -- G Elements

G Element syntax statements are described in the following pages. The parameters are defined in the following section.

Voltage Controlled Current Source (VCCS)

Syntax
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

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

Voltage Controlled Resistor (VCR)

Syntax
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)

Syntax (Piecewise Linear)
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 is 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+).

Parameter Definitions

 

ABS

Output is absolute value if ABS=1.

CUR, VALUE

Current output that flows from n+ to n-. The equation that you define 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 macromodel process.
Note: Because DELAY is a Star-Hspice keyword, it should not be used as a node name.

DELTA

Used to control the curvature of the piecewise linear corners. The parameter defaults to 1/4 of the smallest breakpoint distances. The maximum is limited to 1/2 of the smallest breakpoint distances.

Gxxx

Voltage controlled element name. This parameter must begin with a "G" followed by up to 1023 alphanumeric characters.

gatetype(k)

Can be one of AND, NAND, OR, or NOR. The parameter (k) represents the number of inputs of the gate. The x's and y's 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, the default=0.0.

in +/-

Positive or negative controlling nodes. Specify one pair for each dimension.

M

Number of 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

NDIM

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

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 ...

The polynomial coefficients. When one coefficient is specified, Star-Hspice assumes it to be P1 (P0=0.0), and the element is linear. When more than one polynomial coefficient is specified, the element is nonlinear, and P0, P1, P2 ... represent them (see Polynomial Functions).

POLY

Polynomial keyword function

PWL

Piecewise linear keyword function

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, for example.

Choices for SMOOTH are 1 or 2:

1
Selects the smoothing method used in Hspice releases prior to release H93A. Use this method to maintain compatibility with simulations done using releases older than H93A.

2
Selects the smoothing method that uses data points you provide. This is the default for Hspice releases starting with H93A.

TC1,TC2

F irst and second order temperature coefficients. The SCALE is updated by temperature:

TD

Time delay keyword

transconductance

Voltage-to-current conversion factor

transfactor

Voltage-to-resistance conversion factor

VCCAP

Keyword for voltage controlled capacitance element. VCCAP is a reserved word and should not be used as a node name.

VCCS

Keyword for voltage controlled current source. VCCS is a reserved word and should not be used as a node name.

VCR

Keyword for voltage controlled resistor element. VCR is a reserved word 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 10 meg to 1 m ohms when voltage across nodes 1 and 0 varies between 0 and 1 volt. Beyond the voltage limits, the resistance remains at 10 meg and 1 m ohms, respectively.

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

Switch-Level MOSFET

Model a switch level n-channel MOSFET 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 1 p to 5 p when voltage across nodes (ctrl,0) varies between 2 v and 2.5 v. 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

Implement a two-input AND gate 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

Model forward bias diode characteristic from node 5 to ground with a runtime expression. The saturation current is 1e-14 amp, and the thermal voltage is
0.025 v.

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

Diode Breakdown

Model a diode breakdown region to forward region using the following example. When voltage across the 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

Triode

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