.alter
.alter
Description
The .alter statement is used to repeat simulations under different conditions by modifying parameters, temperatures, models, circuit topology (different elements and subcircuit definitions), and analysis statements. You can use multiple .alter statements in a netlist file, which is divided into several sections. The part before the first .alter statement is called the main block. Subsequent .alter statements and those between .alter and .end statements are referred to as alter blocks. When simulating an alter block, the information in the alter block is added to the main block where conditions with identical names (for example, parameters, elements, subcircuits, and models) are replaced with those in the alter block. Analysis statements are also treated in the same way.
Arguments
Examples
In the following example, the value of the capacitor in the first simulation run is 1pf. In the second and third simulation runs, the values change to 100pf and 10fF respectively.
V0 (net5 0) vsource type=pulse val0=0.0 val1=1 period=40n rise=10p \
fall=10p width=20n
C0 (cnode 0) capacitor c=cValue
R0 (net5 cnode) resistor r=1K ....
.alter
.param Cvalue=1pF
.alter
.param Cvalue=100pF
.alter
.param Cvalue=10fF
.end
In the following example, the first simulation is run at 25 C and the second simulation is run at 50 C:
.temp 25
.alter
.temp 50
Return to top