Answers Database


Foundation: How to use a library macro as a template for a user-defined macro


Record #1657

Product Family: Software

Product Line: Aldec

Product Part: Foundation Schematic Capture

Problem Title:
Foundation: How to use a library macro as a template for a user-defined macro


Problem Description:
There may be some problems with simulating a macro created by
copying a Xilinx Library macro using the File -> Save As
command, then editing the macro to customize it.

This solution record outlines the recommended method of
creating a user-defined macro by copying part or all of an
existing library macro.


Solution 1:

1. From the Foundation Schematic Editor, open up a sheet
     (you can open an existing sheet, or create a new sheet).
     This will be your "scratch pad".
2. Select File -> New Sheet to open up a new sheet (the
     default name will be <design_name>2.SCH).
3. In the scratch pad, add the library macro you wish to use
     as a template and push down into its schematic.
4. Using the mouse, select the part of the schematic you
     want to copy.
5. Select Edit -> Copy to copy the selected logic.
6. Select the <design_name>2 Window and select Edit ->
     Paste. Place the copied logic onto the schematic.
7. Edit the <design_name)2 schematic (add logic, nets,
     attributes, etc.)
8. Select File -> Save As and enter the name for the new
     macro (do not use the same name as any Xilinx Library
     macro).
9. Select Hierarchy -> Create Macro Symbol from Current
     Sheet. This will make a symbol and link the symbol to
     the schematic as a user-defined macro.
10. In the Create Symbol dialog, change the Symbol Name field
     to match the name of the edited schematic.
11. Edit the symbol if desired.
12. Save and close the symbol and the edited schematic.
13. Now the newly created macro will show up in the SC
     Symbols list when you want to add a component. If the
     macro does not appear in the list, select File -> Update
     Libraries.




End of Record #1657 - Last Modified: 05/21/99 15:16

For the latest news, design tips, and patch information on the Xilinx design environment, check out the Technical Tips!