.PARAM Statement
Parameters are named values that you can use throughout your netlist. They make your circuits more readable and easier to modify by allowing you to define values in one place and reference them everywhere.
.PARAM p1=val1 <p2=val2 <...>>
Where:
p1, p2, ...- Parameter namesval1, val2, ...- Parameter values (Constants or Expressions in curly braces)
Parameters and Functions should not depend on themselves in infinite loops. For clarity, we recommend to name nodes, parameters and functions differently. The names of Predefined Parameters and Functions must not be used as function name.
Parameters defined after PARAMS: in the current Subcircuit or the X Statement creating the instance of the current subcircuit are treated like parameters defined via .PARAM.
In particular, they can not be redefined.
Parameters may contain Circuit State Access as long as they are only evaluated in function based source expressions. The curly braces around expressions are optional as long as the equals sign is present. Equal signs are optional as long as expressions are wrapped in curly braces.
.PARAM a = sin(V(n1)+I(V1)) b = 10
.PARAM a {1+2} b 3
V1 n1 0 1
B1 n 0 V=a+b ; V={sin(V(n1)+I(V1))+10}
Note
Defining a parameter, e.g. .PARAM IS=1e-9, does not automatically set the device-specific parameter IS for .MODEL statements to 1e-9.
The parameter needs to be passed explicitly after the desired .MODEL via IS={IS}.
Examples
.PARAM a=1 b={2*3}
.PARAM c={a+b}
.FUNC f(x)={2*x}
.PARAM d={f(5)}
R1 n 0 {c} ; 1+2*3
R2 n 0 {d} ; 2*5