For Loop for Devices
Use the For Loop for Devices node () to evaluate one or several ranges and set a local variable equal to each range’s value while looping over them. When using multiple ranges, all the ranges must have the same length.
There are several kinds of for loops and this particular kind called For Loop for Devices only applies to device and port models in a device hierarchy. It only allows the following device nodes to be part of the for loop: Device Equations, Port Connections. Explicit Device Events, Implicit Device Events, If-Sequence Condition for Devices, and other For Loop for Devices nodes.
To add a For Loop for Devices node, right-click a Device Model, Port Model, Device Package, or Device Model Feature node and choose For Loop for Devices from the Devices submenu.
To add a For Loop for Devices to a physics feature or physics property node, right-click the node and choose For Loop for Devices from the Devices submenu. If added under any of these nodes or a Component node, the for loop for devices belongs to the device models closest in the hierarchy. For most cases this will be the device model added by the physics interface.
The Settings window has the following section:
Loop Expressions
Enter the names of the loop variables in the Name column of the table, and enter the corresponding range expression in the Expression column. The range can either be a range using the range operator or an array variable. As an example, the expression range(1,2,5) loops over the numbers 1, 3, and 5. For a device parameter A of size 4, the loop will be over values of the parameter’s scalar components. You can also enter a vector-valued expression directly (for example, {1, 10, 100, 1000}). For multiple loop variables all range expressions must be of the same length. The loop expression must also only depend on device constants or device parameters.