The .PARAM statement defines the value of a parameter. A parameter name can be used in place of most numeric values in the circuit description or passed into a subcircuit. Parameters can be constants, or expressions involving constants, or a combination of these, and they can include other parameters.

The .PARAM statements are order independent but parameter values must be completely defined such that all expressions can be evaluated to a resultant numeric value.

Recursive parameter values are not allowed, for example .Param N = N+1.

A .PARAM statement can be used inside a subcircuit definition to establish local subcircuit parameters. Parameters defined in the main circuit file are applied to all subcircuits. Parameters defined in a subcircuit apply only within the subcircuit definition.

.PARAM < <name> = <value> >*
.PARAM < <name> = { <expression> } >*

Parameters

name

Cannot begin with a number.

value

Constants do not need braces { }.

expression

Can contain constants, parameters, or mathematical operators similar to the B element. The expressions must be enclosed in braces.

Examples

.PARAM K1 = 12, K2 = 20
.PARAM F = 10Khz, DF = { F * 2 }
.PARAM VALR2 = { 5 * K1 }

R2 1 2 {VALR2}   ; value of R2 resistance is 60 ohm

See also

Commands