Getting Started with the Graphical Cell Compiler
The Graphical Cell Compiler (GCC) is a tool within Advanced Design System that makes the job of adding parameterized artwork to a layout an easy process. The GCC can benefit Productivity Engineers as well as Circuit Designers:
- For Productivity Engineers, the GCC greatly simplifies developing a library of parts for use by circuit designers. Various parts can be developed and debugged much faster by using the GCC than by developing the AEL macros themselves. Of course, if engineers do know how to program in AEL, they can use AEL to do further customization.
- Circuit Designers can use the GCC to create a special model quickly, without the need to know any AEL.
Parameterized Artwork Macro
A parameterized artwork macro (PAM) is a graphical layout model with specific parameters that define its form. These parameters can control the length or width of some or all of the shapes within the model, the repetition factors for the shapes, and so on can be customized each time you place the model in a layout.
The basic steps for creating and using a PAM are:
- Define the artwork graphically in a Layout window.
- Define parameters to effect the artwork.
- Compile the macro.
- Set the parameter default values and save the macro.
- Insert the new component (macro) in a layout.
- Edit the parameters for that instance of the new component.
For an example that illustrates the basic steps of creating and using a PAM, see Example: Creating a Multi-Coupled Line.
GCC Examples
In addition to the examples provided in this manual, several Graphical Cell Compiler examples are included in the program's examples directory. Examples are improved frequently and new ones are added to the examples directory, so the files in your program may differ from what is shown here. However, the basic path is the same.
To view the Examples directory:
- Select View Examples.
- Then select RF Board > gcc_examples.

Graphical Cell Compiler Flow Chart
The following figure provides a high-level overview of the way the parts of the Graphical Cell Compiler fit with the Advanced Design System to make a functional tool. The basic use-model is similar to that of a compiled language, such as Basic, Pascal or C. The source code is managed in the context of the Source Layout and is compiled into an executable that is stored in the Component Library. You execute (insert) the component in the context of a Destination Layout.
The two parts to the source for a PAM are graphical shapes and controls that operate on the graphical shapes. Graphical shapes are created in a Layout window using the Graphical Editor to insert, move, stretch, and otherwise manipulate the shapes. The result is a set of graphical data that represents the defined shapes. Then controls are defined from within the Layout window using the Macro menu commands (see Macro Menu). These controls are used to create a set of control data. All the graphical and control data is stored as part of the .dsn file when you save the design.
When you are satisfied with the source information, you compile it using the Macro Compiler (also known as the Graphical Cell Compiler). The output is a Parameterized Artwork Macro (an AEL Macro) that is saved on the disk.
Next, you define the parameter unit types, default values, and links (to simulation or schematic data), that complete the component definition. The component can then reside in a component library, ready for use.
When you insert a component created with the Graphical Cell Compiler in a schematic, the component appears the same as any other component in the program. You can set the component parameters using the standard component edit parameters dialog. What is different is that behind the scenes there is an Insertion Engine that processes the various control requests (such as stretch and repeat) to generate the requested graphical shapes. When finished, the generated component appears in the Destination Layout window.

GCC Flow Chart
Macro Menu
The Macro menu is accessed from the menu bar of a Layout window.

Stretch opens a dialog box for defining the controls that adjust how shapes are moved or stretched. See Stretch Control.
Rotate/Move/Mirror opens a dialog box for defining the controls rotate, move, and mirror shapes. See [Rotate/Move/Mirror Control.|Rotate/Move/Mirror Control]
Repeat opens a dialog box for defining the controls that set the number of copies of the graphical shapes that are inserted, and where the copies are placed. See Repeat Control.
Polar opens a dialog box for defining the controls that handle operations in the polar (angle, radius) coordinate system. See Polar Control.
Width opens a dialog box for defining the controls that handle width for the graphical shapes that support width. See Width Control.
User-Defined opens a dialog box for specifying a user-created AEL function to be used to modify or create graphical shapes. See User-Defined Control.
View/Edit opens the controls set for a given PAM, and enables you to reorder, modify, or delete those controls. See the section Viewing Controls.
Compile opens a dialog box for compiling the PAM and setting defaults and units, as well as other model parameters. See the section Compiling a Macro.
Defining Artwork
When you use the Graphical Cell Compiler (GCC), you start by creating the artwork by placing simple graphical shapes in a Layout window that the program uses to build an AEL macro. This section provides the basics on creating artwork, by placing components and working with the supported shapes. For details, refer to the Schematic Capture and Layout manual.
Supported Shapes
The supported shapes are: circle, polyline, path, rectangle (as a polygon), arc (as a polyline), and text. Although these are not shapes, Connectors are supported, so you can create components that have pins.
The shapes not supported are: construction line (except as a control line), trace, component, and wire. While construction lines are needed to define reference points for various controls, these are not included in the compiled output and are not displayed when the macro is used. Traces are not supported, since a trace is a path that has been turned into a component.
| Note It is not possible to include a component within a Parameterized Artwork Macro. |
Placing a Port or Shape
The menu and button locations for placing a port or shape are:

To place a port:
- Select Port from the Insert menu or click the Port button on the toolbar.
- Click in the Layout window to place the component.
- Define edge and area ports. See the Schematic Capture and Layout manual for more information.

Hint
You can save time and mouse-clicks by rotating ports during placement, so that each is properly oriented. If you find that a connector is not properly oriented, click Rotate before you place the port. The connector rotates −45° each time you click the button. When the port is oriented properly, drag it into position in the drawing area and click to place it.To place a shape:
- Select the shape name from the Insert menu or click the shape on the toolbar.
- Following the instructions that appear in the status bar at the bottom of the window, place the shape in the Layout window.
- Stretching a circle modifies its radius, making it larger or smaller. If you want to make an oval, convert the circle to a polygon before running the compiler ( Edit > Modify > Convert to Polygon ).
- Paths are supported only to the degree that they are like a polyline. Other path attributes (corner type, and so on) are not under parameterized control and are the same as that of the source shape.
- If you rotate a rectangle, or move any of its corners so that it is no longer a rectangle, the program converts it to a polygon. Therefore, the resulting AEL scripts treat rectangles as four-point polygons.
- Similarly, arcs are converted into a polyline.
Defining the Size of a Shape
When you place a shape, you can use the X,Y coordinates displayed in the status bar at the bottom of the Layout window to help you draw the shape to the size you want (View > Coordinate Readout). The two types of coordinates are: positional and differential.

- Positional coordinates display the X,Y coordinates of the cursor position in relation to the total window. By default, the large + in the center of the drawing area is 0,0.
- Differential coordinates display the distance in X,Y that the cursor has traveled since the last click. Set the starting point to 0,0 by clicking anywhere in the drawing area.
For example:
- Select the rectangle on the toolbar.
- Click in the Layout window to define the first point on the rectangle. The Differential X,Y coordinate display reads 0.00, 0.00.
- Move the cursor until the Differential X,Y coordinate display reads 200.0, 100.0.
- Click. A rectangle 200 by 100 mil is placed in the window.
Placing a Construction Line
To place a construction line in a Layout window, choose Insert > Construction Line, then click twice in the drawing area to provide two points along the line.
Editing Components
You can edit components in a Layout window (either before or after selecting the component you want to edit) by using an Edit menu command or by clicking the appropriate button on the toolbar.

Experiment with these commands and buttons until you feel comfortable with them.
Example: Creating a Multi-Coupled Line
The information in this example is presented with the assumption that you already know how to insert and work with shapes in a Layout window. If you do not, refer to the section Defining Artwork.
The Graphical Cell Compiler uses primitive graphical shapes to build AEL macros that create models. For this example, the source artwork comprises a rectangle and two pins (connectors). You add two control lines (construction lines) and define three controls:
- A stretch control for length that acts on the rectangle and the two pins.
- A stretch control for width that acts only on the rectangle.
- A repeat control for the number of lines to create that acts on the rectangle and the two pins.

Note
The section Code Walkthrough contains a walkthrough of the code that is generated to produce this model.The steps to create a multi-coupled line are:
Step 1 Defining the Artwork
Step 2 Defining the First Stretch Control
Step 3 Defining the Second Stretch Control
Step 4 Defining a Repeat Control
Step 5 Viewing the Defined Controls
Step 6 Compiling the Macro
Step 7 Defining Parameter Default Values
Step 8 Using the New Component
Step 1 Defining the Artwork
The first step in the process is to define the source artwork.
- In the Main window, open a new project ( File > New Project ).
- In the new project, open a Layout window ( Window > Layout ).
- Using the relative cursor readout (Differential coordinates) displayed at the bottom of the Layout window, insert a 100 x 50 mil rectangle ( Insert > Rectangle ).
- Add two ports, one at the each end of the rectangle ( Insert > Component > Port ) and place two construction lines through the center of the rectangle, one horizontal and one vertical ( Insert > Construction Line ). Construction lines provide a reference for the controls that you define.

Step 2 Defining the First Stretch Control
Next, define a stretch control for length that acts on the rectangle and the two pins.
- Select the rectangle, both ports, and the vertical construction line.

- Select Macro > Stretch to open the Stretch Control Definition dialog box. Notice that the Stretch Orientation is shown as Positive, with respect to the vertical reference line.

- Select Both so that the stretch orientation goes both positive and negative. This produces a symmetrical stretch on each side of the reference line.

- In the Distance field, enter the word length to define the name of the component parameter that adjusts the symmetrical stretch of the rectangle.

- In the Offset field, enter 100.0 mil.

Offset compensates for the original size of the shape, making it possible for you to create a PAM using a shape with some size (so it is easy to work with), and then use the PAM without needing to know the initial size of the shape. In this example, you are creating a PAM using a rectangle of length 100. When you set the offset at 100, you are offsetting the original length. Then when you use the PAM and enter a length of 50, you get a rectangle with a total length of 50 rather than 150. - Click OK to accept the settings.
!gcc-02-1-14.gif!
Note
For details on the Stretch control, see Stretch Control.
Step 3 Defining the Second Stretch Control
- Select the rectangle and the horizontal construction line.

- Select Macro > Stretch.
- Choose the Stretch direction Both to produce a symmetrical stretch on each side of the reference line.

- In the Distance field, enter the word width.

- In the Offset field, enter 50.0 mil.

- Click OK to accept the settings.

Step 4 Defining a Repeat Control
Now you set a repeat control for the number of lines to create for acting on the rectangle and the two pins.
- Select the rectangle, both connectors, and the vertical construction line.

- Select Macro > Repeat to open the Repeat Control dialog.

Using the Repeat Control Definition dialog, you can define parameters that duplicate the shape. The selections in the Repeat Direction area define the direction in which copies of the shape are placed:- Parallel places copies parallel to the selected reference line.
- Perpendicular places copies perpendicular to the selected reference line.
In this case, leave Parallel selected.

- In the Number of Components field, enter the word number to define the component parameter that controls the number of times the shape is duplicated.

- In the Repeat distance field, enter width+space to create the component parameter space.

The repeat distance is the distance from the beginning of one copy of the shape to the beginning of the next (including the space between the shapes).

Caution
When defining a component parameter, do not use the word step or any other word that AEL recognizes as a variable/reserved word. Using such a word generates an error when you try to use the PAM. For more information, see the sections GCC Error Messages and the "List of Functions" in the AEL manual. - Click OK to accept the settings .


Note
For details on this control, see Repeat Control.
Step 5 Viewing the Defined Controls
You can view the contents of the controls that you defined, as well as the detail of each control.
- Select Macro > View/Edit to open the View Controls dialog box.

The three controls you set in the previous steps are displayed in the View Controls dialog: two stretches in both directions (with respect to the reference line) and a repeat in the Parallel direction (with respect to the reference line).
The program executes the controls in the order in which these are listed in this dialog. Selecting a control activates the editing capabilities. In this example, leave the controls as set. - Select Detail to open the Detail window. Each control is listed, along with the defined parameters.

- In the Detail dialog, click OK to dismiss the dialog.
- In the View Controls Dialog box, click OK to dismiss the dialog.

Caution
Always define Stretch controls first, then define Repeat controls. After you have completed this example, go back and switch the order of the controls (using Cut/Paste in the View Controls dialog). Then recompile and experiment with the modified component to see what happens when a shape is repeated before it is resized (stretched). Because of the way the program handles copies, you can see duplicates of the original rectangle. To stretch duplicates, stretch the original, then duplicate the stretched original. For more information, see Defining Controls.
Note
For details on the View Control dialog box, see the section Viewing Controls.
Step 6 Compiling the Macro
After you have defined the controls, you can compile the macro.
Several names are associated with a PAM:
Design name is the name of the source design; that is, the name of the layout in which you create the source artwork.
Output file name is the name used for the AEL file that defines the macro. The default name is < design name >_art.ael.
Model name is the name that you select from a library to use the macro in a new layout. The default model name is < design name >.
To compile a macro:
- Select File > Save Design to save the source design in the Layout window.

Note that this does not save the PAM. The Compile Messages area displays the message:Design saved as: < path >/< design name >.dsn.
- Select Macro > Compile to open the Graphical Cell Compiler dialog .
- Select Compile.

The Compile Messages area displays the progress and results as the PAM compiles.

Note
For details on this dialog box, see the section Compiling a Macro.
Step 7 Defining Parameter Default Values
After you have compiled the macro, you can set the parameter default values and save the macro.
- In the Graphical Cell Compiler dialog box, select Design/Parameters to open the Design Definition dialog.

The Model Name that you defined in the PAM Compiler dialog box appears as the Name and as the Component Instance Name. A description is provided automatically, as is the default library name for PAMs. The name and type of artwork are entered automatically under Artwork. - Select the Parameters tab. The parameters you defined in a previous step are listed in the Select Parameter field.

- The length parameter is selected. In the Default Value field, enter 100.0 mil.

- Select the parameter width, and in the Default Value field, enter 40.0 mil.

- Select the parameter number, and in the Default Value field, enter 2.
- In the Parameter Type field, select Unitless from the drop-down list.

Note
If this field is not specified as unitless, the model may not appear when you try to use the PAM. - Select the parameter space, and in the Default Value field, enter 25.0 mil.

- Select Save AEL file, then click OK to save the AEL file.

- Click OK to close the Design Definition dialog box.
- Click OK to close the Graphical Cell Compiler dialog box.

Note
For details on this dialog box, see the section Compiling a Macro.
Step 8 Using the New Component
Now that you have created the new component (PAM), you can use it in a layout.
- In the Main window, open a new layout window ( Window > New Layout ).
- In the new Layout window, choose Insert > Component > Component Library.
- In the Library List dialog box, select Compiled Artwork Macros to view the Component Library List. The component you have just defined is listed.

Hint
For a shortcut, you can type the component name into the component history pulldown on the toolbar. - Select the component. If the Edit Component Parameters dialog opens, click OK to accept the default parameters.

- Move the cursor to the Layout window and place the component. Then cancel the command by clicking the Cancel Command button on the tool bar.

- Close the Component Library dialog.
Experimenting with Parameter Values
To better understand how you can use your new component, try these experiments.
- Try to select one of the rectangles in the component you have just inserted. See that you used one rectangle (in the original artwork) to create a component that contains two rectangles.

- Open the Component Parameters dialog box ( Edit > Component > Edit Component Parameters ) and reset the parameters to these new values:
length = 100 mil
width = 25 mil
number = 3
space = 25 mil
Click Apply to see how the component changes.

- Reset the parameters to these new values:
length = 100 mil
width = 15 mil
number = 5
space = 10 mil
Click Apply to see how the component changes.

- Try other settings to see how different settings change the component.
Privacy
Statement
|
Terms of Use
|
Legal |
Contact Us
|
© Agilent 2000-2008 ![]()