Defining Controls
After defining the artwork, you use the Graphical Cell Compiler to define the controls that are available on the finished Parameterized Artwork Macro (PAM).
The basic steps required to define a control are:
- Place and select a control (construction) line to act as the reference for the control.
- Select the shape(s) that the control applies to.
- Select the control (stretch, and so on).
- Define the control parameters.
This chapter provides details for control precedence, theory of operation, control lines, and the difference between control and component parameters.
Control Precedence
The order in which you define controls is important.
- You must define Stretch controls first, since Stretch controls operate on the original shape, not on copies of the shape.
- You can perform multiple operations on a given shape (such as changing both length and width), and then after the shape is correct, use Repeat and Polar controls to make copies of it.
- Rotate/Move/Mirror controls can operate on the original shape, and on copies; you can rotate/move/mirror the original shape, and you can rotate/move/mirror the results of copy operations.
Not all controls are required, but the suggested order of implementation is shown in the following figure.

Order of Control Precedence
Theory of Operation
To understand why controls act the way they do you must understand the different data variables allocated to each shape in a generated macro. Each shape has (at least) these variables assigned to it:
i_ < number >Initial Variable = shape's original data
p_ < number >Primitive Variable = shape's modified data
l_ < number >List Variable = list of generated shapes' data
r_ < number >Rotation Variable = shape's rotation value
w_ < number >Width Variable = shape's width or height
where:
< number > is a value assigned at compile time to create a unique name.
When the macro executes, the Initial and Primitive variables are assigned the shape's initial location data. For details, see the section Code Walkthrough.
- Initial Variable The Initial variable is never modified. It provides a reference so that controls can determine whether the original shape was cut by a control line and if so, where. This means that a shape's response to a control acting on it does not change when a previous control moves or rotates it on/off a control line. For example, if you define a Stretch control to modify the length of a shape, you can be sure that it stretches as defined even if a previous Mirror control moves it away from the stretch control line.
- Primitive Variable The Primitive variable is where all modifications to the shape take place. When a shape is resized, rotated, mirrored, moved, and so on, it is the points in the Primitive variable that get modified.
- List Variable The List variable contains the results of any copy operations as defined by a Repeat or Polar control. In other words, if a control makes copies of the shape defined in the Primitive variable, the original and the copies are placed in the List variable.
- Rotation Variable This variable contains the shape's rotation value for shapes like ports and text.
- Width Variable This variable contains the shape's width (for paths) or height (for text) and is only modified by the Width control.
What is Output
When it comes time to output the results of the macro, a test is performed on the List variable. If the List variable contains a list of shapes, the list is output to generate the shapes in the destination layout. If the List variable is empty, only the Primitive variable is output. The macro never outputs the contents of both variables. This explains why a Stretch performed on a shape after a Repeat does not appear to have any effect. The Stretch operates on the Primitive variable, but at output time, the program uses the List variable, which contains the copies created by the Repeat and a copy of the original shape. Any modifications made on the Primitive variable by the Stretch are lost.
Multiple Repeats
When you perform more than one repeat on the same shape, the Repeat controls use the Primitive variable as the source for the shape data, placing the results in the List variable. If the initial shape does not move between Repeats, multiple copies of the shape are made at the starting location. That is, if you perform a Repeat Parallel followed by a Repeat Perpendicular, two copies of the shape are made at the starting location: one generated from the Repeat Perpendicular and one generated from the Repeat Parallel.
Modifying Data Between Repeats A shape's data (in the Primitive variable) can be modified between Repeats. Repeats use the same source to copy, so if that source is changed (by a Stretch or Mirror control, for example) after one repeat, the next repeat makes copies of a different-looking shape.
Modifying the Contents of Primitive Variable & List Variable Data
The Rotate/Move/Mirror control operates on both the Primitive variable and the List variable. This means that you can modify a shape either before or after you copy it.
Rotating a shape and then repeating the shape:

Repeat a shape and then rotate the results of the repetition:

As the example shows, if you modify (rotate) the shape before you copy it, the Repeat control makes copies of the rotated shape. If you copy the shape before you rotate it, the Rotate control operates on the list of shapes as a unit. The Rotate control also modifies the Primitive variable, but because the List variable contains a list, the modification to the Primitive variable is not visible unless you do another Repeat on the same shape. In that case, you do see the modification in the results of the second Repeat.
Using Control Lines
Control lines (construction lines) provide the reference for Stretch, Repeat, and Polar controls. When you define one of these controls, you must select both the shape that you want to manipulate/copy and the control line that you want to use as a reference. If you forget to select a control line, the program prompts you to do so.

With a Stretch control, you choose whether you want the stretch to be in the positive or negative direction with respect to the reference line.
With a Repeat control, you choose whether you want the repeat to be parallel or perpendicular to the reference line.
With a Polar control, a control line defines where a polyline or path is cut for a stretch-like operation. It does not have any effect on the rotation angle (0° is still the x-axis) or the rotation origin (which is 0,0).
A control line does not have to intersect a shape.
For example, if a shape is to one side of the control line and is included in a stretch, the entire shape moves by the stretch amount, rather than being stretched (see Stretch Control).
A control line can be at any angle; a control line is not limited to 90° angles.
Positive and Negative Stretch Directions
When you select a control line, you use the Stretch Control Definition dialog box to indicate the direction (positive or negative) in which you expect the stretch to occur relative to the selected line.
- For a horizontal control line, positive = up
- For a vertical control line, positive = to the right
The following figure illustrates stretch direction with respect to the horizontal or vertical control lines.

Determining Stretch Direction
The point at which the program sees a line as moving from horizontal (positive = up) to vertical (positive = right) is when the angle of the line is greater than 45°.
The stretch direction for a line between 45° and 90° can appear to be backward, as shown below. Just remember that the line is at an angle greater than 45°, even though it may be hard to see the slight difference.

Parallel and Perpendicular Repeat Directions
When you select a control line, you use the Repeat Control Definition dialog box to indicate the direction (parallel or perpendicular) in which you can expect the copy to occur relative to the selected line.
- Parallel = parallel to the control line
- Perpendicular = perpendicular to the control line
- Both = an array-like grid
As with a Stretch control (see Positive and Negative Stretch Directions):
- For a horizontal control line, positive = up
- For a vertical control line, positive = to the right
- And vertical is > 45°
Entering a positive or negative number determines the direction in which the copy is placed along the selected axis.

If the control line is horizontal: Parallel goes left/right; Perpendicular goes up/down.

If the control line is vertical: Parallel goes up/down; Perpendicular goes right/left.

When the control line is at an angle: Parallel is still parallel to the control line and Perpendicular is still perpendicular to it.

Repeating Both combines a parallel and a perpendicular copy, even at an angle.

Defining Parameters
When using the Graphical Cell Compiler, you work with Control Parameters and Component (model) Parameters.
Control Parameters
Control parameters are the fields within a control dialog box. For example, in the Stretch Control Definition dialog box, the control parameters are Distance and Offset.

You can use any one of the parameters listed in a control parameter field:
- Constant
Example: 100
Comments: This value can not be edited when you use the macro. - Variable
Example: length
Comments: A variable appears as a component parameter; its actual value is supplied by the user. - Expression
Example: size*100
Comments: Any undefined values appear as component parameters (size, in this example). The actual value is supplied by the user. Expressions enable you to associate component parameters.
Example: sin(angle)
Can include AEL function calls. - AEL code fragment using the ?: syntax from C (also available in AEL)
Example: size < 100 ? 100 : size * 100
which is approximately equivalent to:if \(size < 100\) then length = 100; else length = size \* 100;
but because it does not require a temporary variable length it is an expression that can be used as a control parameter.
Comments: Any undefined values appear as component parameters (size, in this example). The actual value is supplied by the user. Enables complicated calculations. See the AEL manual for syntax. - User-Defined Function
Example: build_shape(length, width);
Comments: A user-written AEL function to support calculations more complicated than can fit in a field of a control dialog. See User-Defined Control for more information about including a user-defined function.
Component Parameters
Component (or model) parameters are the parameters you edit to customize an instance of a given component or model. These parameters appear in these locations.
- In the Component Parameters dialog box ( Edit > Component > Edit Component Parameters ).
- In the Compiler dialog message area.

- In the Design Definition dialog box Select Parameters list (in the Parameters panel, where you set default values and units when creating a PAM).

Controlling Multiple Shapes on Different Layers
If you select a shape to be included in a control, it does not matter what layer the shape is on. A control operates on any number of shapes, on any combination of layers.
In the original design, the three shapes selected for a Stretch control are on three different layers. The control is defined with a length of 100 mil and an offset of 100 mil.

When the model is used and the length reduced to 50 mil, the top shape is moved (because the control line did not touch the original shape), and the other two shapes are stretched back.

When the length is increased to 150 mil, the top shape is moved again, and the other two shapes are stretched.

For details on using a Stretch control, refer to the section Stretch Control.
Privacy
Statement
|
Terms of Use
|
Legal |
Contact Us
|
© Agilent 2000-2008 ![]()