Previous

Macro Operations in Design Mode

This section describes how macros are used when EPIC is in Design Mode. The following sections describe how these macro operations are performed.

Operating on Macro Components and Nets in Design Mode

Normally you place, route, unplace, and unroute a macro instance as a whole object, instead of performing these operations on the individual components and nets that comprise the macro. If a macro is instantiated from a completely placed and routed library file, these operations are always performed on the whole macro. However, because it is possible to define a macro that is not completely placed and routed, you must place and route those individual components and nets that do not have predefined placement and routing information. These rules govern a macro's internal components, nets, and pins.

Selecting Macros

To select a macro in Design Mode, use one of these methods.

Adding Macros

When you add a macro to the design, you are instantiating a macro; that is, you are bringing an instance of a library macro file into the design. A design can contain multiple instances of the same macro library file, and each will have a unique name within the design. A macro can only be added if the design file and the macro library file are of the same family. For example, if your design is an XC4000 part, you can only add an XC4000 macro library file.

The first time you instantiate a macro library file, a copy of the library file is placed into the design file. Any subsequent instantiations of the same library file into the design file will refer to this local copy, and will not be affected by changes in the external library file that was used for the original instantiation.

To add a macro to the design follow this procedure.

  1. If you want to place the macro when you add it, select a vacant site in which to place the macro.

    The site must match the reference component specified in the macro library file. For example, if the macro library file specifies an I/O component as the reference component, the selected site must be an I/O component site.

    If there is no reference component in the macro library file, the selected site is ignored and the macro is unplaced when it is instantiated. If you do not select a site, the macro will be unplaced when it is instantiated.

  2. Display the Add Macro dialog box in one of these ways.

  3. Fill in the dialog box fields and click OK.

    An instance of the macro library file is added to the design. If you selected a site in step 1, the macro's reference component is placed at the specified site, and any other placed components in the macro library file is placed relative to the reference component.

    When you close the Add Macro dialog box, a Macro Attributes dialog box may appear for the newly created macro. Whether the dialog box is displayed or not is controlled by the Automatic Post main window attribute. See the “Main Window Attributes” section of the “Using EPIC” chapter. Each dialog box displays the name of the new macro, the macro library file that defined the macro, and other information. You can edit the dialog boxes to modify component attributes or you remove the dialog box by clicking Cancel. See the “Viewing and Changing Macro Attributes” section.

Notes on Adding Macros

Deleting Macros

When you delete a macro, all of the macro's external pins are unrouted, all components and nets that are part of the macro are eliminated. And finally, the macro name is removed from the database.

To delete a macro follow this procedure.

  1. Display a list of macro names in the EPIC List dialog box.

  2. Select the macros to delete.

  3. Perform the delete command in one of the following ways.

The macros are eliminated from the database.

Viewing and Changing Macro Attributes

You can view or change macro attributes in the Macro Attributes dialog box. To view macro attributes, follow this procedure.

  1. In the EPIC List dialog box, display a list of macro names.

  2. Select the macro that you want to view or change its attributes.

  3. Display the Macro Attributes dialog box in one of the following ways.

The Macro Attributes dialog box appears.

Figure 5.17 Macro Attributes Dialog Box

Macro Name
Name of the macro. If you change the macro name, all of the names of the components, nets, and external pins which are part of the macro are updated automatically to reflect this change.
Macro Library File
Name of the macro library file that defined this macro instance.
Status
Indicates whether the macro is unplaced or placed. A macro is only shown as placed if all the components in the macro are placed.
Reference Comp
Indicates that the component is designated as a reference component. A macro with no pre-placed components does not have a reference component; a macro with at least one pre-placed component has one. The reference component is described in the “Reference Component in Macro Mode” section. This field holds up to 50 characters, is non-modifiable, and scrollable.
External Pins
Lists the pins that are defined as external pins. External pins are described in the “Adding External Pins in Macro Mode” section.
Show Constraints
When selected, displays a Macro Constraints dialog box, which displays the constraints that are applied to the macro.

If you select the Show Constraints command from the Macro Attributes dialog box, this dialog box appears.

Figure 5.18 Macro Constraints Dialog Box

Name
Macro name.
Lock
If enabled, indicates a lock macro or global lock placement constraint is applied. If a macro is locked, all macro components that were pre-placed that is, components that were placed in the macro's library file are locked. The macro cannot be unplaced.
Locate
If enabled, indicates a locate macro constraint is applied. This constraint places the macro's reference component at a specified site, places all of the macro's pre-placed components (that is, all components that were placed in the macro's library file) in sites relative to the reference component, and locks all of these placed components at their sites.
None/Soft/Hard
Specifies whether the value in the Range field is an absolute requirement (hard) or not (soft) for the placement tools.
Level
Sets up a priority for the placement tools to resolve constraint conflicts.
Range
Specifies the location of the site or range of sites for the placement tools.
Block
Use this timing constraint to block the enumeration of all timing paths that go through this macro.
TSid
Assigns a timing period or frequency to a timing specification.

Moving Macros

To move a macro with placed components to an unused group of sites, use the Swap command. When you move a placed macro by swapping, you save a step compared to unplacing the macro then placing it at the new location.

To move a macro to an unused group of sites follow this procedure.

  1. Select the macro to move.

  2. Select an unused site to which you will move the macro's reference component.

    The reference component and the selected site must be the same type of block that is, I/O block and I/O block, or logic block and logic block.

  3. Perform the Swap command in one of the following ways.

Copying Macros

When you copy a macro, you add a duplicate of the macro instance to the design. The source is a placed or unplaced macro. The target is a vacant site in which to place the reference component of the copy.

To copy a macro follow this procedure.

  1. In the EPIC List dialog box, display a list of macro names.

  2. Select the macro to copy.

    The selected macro is the source macro.

  3. Select the vacant site or target into which you want to copy the source macro's reference component.

  4. Invoke the Copy command in one of the following ways.

The reference component of the source macro is copied to the selected site, and the other components in the macro are copied in positions relative to the reference component.

If you do not specify a name for the copy, the name assigned to the new macro is in the format: $libfile_number, where libfile is the name of the macro library file of the source macro and number is a number assigned to each new copy of the source. Numbering starts at 0, and increases by one for each new copy of the macro. For example, if you make multiple copies of a macro called add, which is an instantiation of macro library file adder, the first copy will be called $adder_0, the second will be called $adder_1, and so on.

Unbinding Macros

When you unbind a macro, you disassociate the macro's components and nets from the macro. The macro name disappears from the design's database. After unbinding, all of the components and nets are treated as separate components and nets. Also, component names and net names are changed, replacing the forward slash (/) that indicates the macro's library file with an underscore (_).

To unbind a macro follow these steps.

  1. In the EPIC List dialog box, display a list of macro names.

  2. Select the macros to unbind.

  3. Perform the Unbind command in one of these ways.

For each of the selected macros, the included components and nets no longer are associated with the macro, and the macro name disappears from the EPIC List dialog box.

Placing and Unplacing Macros

Macros can be placed in the editing area either automatically or manually. When you use automatic placement (AutoPlace), the system selects an appropriate site or sites for each macro you select. When you use manual placement, you select both a macro and a site in which to place the macro's reference component.

When you manually place a macro, you only place the pre-placed components in the macro that is, those components which were placed in the macro library file that defined this macro instance. You must place any unplaced components in the macro's library file in a separate operation.

When you automatically place a macro, the system tries to place all of the macro components, whether they are pre-placed or not.

You can also unplace macros. Unplacing a macro unroutes each of the macro's external pins, then removes the macro from the editing area and adds the macro to the list of the design's unplaced macros.

The following sections describe placing and unplacing macros.

AutoPlacing Macros

You can place macros automatically by invoking the Autoplace command.

  1. In the EPIC List dialog box, display a list of unplaced macros.

  2. Select the macros to automatically place.

  3. Perform the Autoplace command in one of these ways.

The macros you selected are automatically placed in vacant sites in the editing area. For each macro, any connections that were unrouted in the macro's library file are routed when the macro is placed.

If the Automatic Routing Option is On, each macro's external pins are routed after the macro is placed. Also, any non-prerouted macro nets are automatically routed.

Manually Placing Macros

There are two macro manual placement procedures.

To manually place an unplaced macro follow this procedure.

  1. In the EPIC List dialog box, display a list of unplaced macros.

  2. Select one name from the list of unplaced macros.

  3. Select a vacant site in the editing area in which to place the macro's reference component.

    The macro's reference component and the selected site must be the same type of block (I/O component and I/O component or logic component and logic component).

    The first two steps can be performed in reverse order.

  4. Invoke the Place command in one of these ways.

To move a macro, follow the procedure described in the “Moving Macros” section.

Unplacing

The Unplace command removes selected macros from their current sites and puts them into the unplaced macros list. The list of unplaced macros can be viewed in the EPIC List dialog box. Unplaced macros can be re-placed.

Before unplacing a macro, the system unroutes each external pin on the macro.


NOTE

Locked macros cannot be unplaced.


To unplace selected macros follow this procedure.

  1. Select the macros to unplace by displaying the list of placed macros in the EPIC List dialog box, then click on the macro names.

  2. Unplace the macros in one of these ways.

Routing and Unrouting Macros

Routing and unrouting macros is similar to routing and unrouting components. These operations are described in the “Routing and Unrouting” section of the “Using EPIC” chapter.

Notes on Routing and Unrouting Macros

Macro External Pins

In Design Mode, external macro pins are treated as other pins in the design. You can add them to nets in the design, if these nets are external to the macro, route and unroute them, and find them with the Find command.

Some differences exist between external pins in Macro Mode and in Design Mode. You cannot add or delete external pins in Design Mode. In Macro Mode, you can change an external pin name, in Design Mode, you cannot.

Macro DRC Checks

There are a number of physical DRC checks that test macros in Design Mode. You can execute these tests during your EPIC session.

To run the macro DRC check follow these steps.

  1. Make sure nothing is selected in the editing area or the EPIC List dialog box. If necessary, select the Clear push button to deselect any selected objects.

  2. Perform the DRC command in one of these ways.

Next