In addition to simple arithmetic operations (+, -, *, /), Star-Hspice provides a number of built-in functions that you can use in expressions. The Star-Hspice built-in functions are listed in Star-Hspice Built-in Functions.
Returns the square root of the absolute value of x: sqrt(-x) = -sqrt(|x|) |
|||
Returns the value of x raised to the integer part of y: x(integer part of y) |
|||
Returns the absolute value of x raised to the y power, with the sign of x: (sign of x)|x|y |
|||
Returns the natural logarithm of the absolute value of x, with the sign of x: (sign of x)log(|x|) |
|||
Returns the base 10 logarithm of the absolute value of x, with the sign of x: (sign of x)log10(|x|) |
|||
Returns the base 10 logarithm of the absolute value of x, multiplied by 20, with the sign of x: |
|||
Returns the integer portion of x. The fractional portion of the number is lost. |
|||
Returns -1 if x is less than 0, 0 if x is equal to 0, and 1 if x is greater than 0 |
|||
Returns the absolute value of x, with the sign of y: (sign of y)|x| |
|||
Returns various element values during simulation. See "Element Template Output" in Chapter 7 for more information. |
|||
Returns various circuit values during simulation. See DC and Transient Output Variables for more information. |
Star-Hspice reserves the variable names listed in Star-Hspice Special Variables for use in elements such as E, G, R, C, and L. You cannot use them for any other purpose in your netlist (in .PARAM statements, for example) .
Parameterizes the current simulation time during transient analysis. |
|||
Parameterizes the current simulation temperature during transient/temperature analysis. |
|||
An expression can contain parameters that have not yet been defined. A function must have at least one argument, and not more than two. Functions can be redefined.
fname1 (arg1, arg2) = expr1 (fname2 (arg1, ...) = expr2) off
Specifies function name. This parameter must be distinct from array names and built-in functions. Subsequently defined functions must have all their embedded functions previously defined. |
|
f(a,b) = POW(a,2)+a*b g(d) = SQRT(d) h(e) = e*f(1,2)-g(3)
Star-Hspice Manual - Release 2001.2 - June 2001