Previous

Creating Custom Macros

A macro is any symbol defined by an underlying Viewlogic schematic. The Xilinx libraries contain several symbols that are macros. Macro schematics contain primitives and other macro symbols. When the software reads a schematic, it expands (flattens) the macro symbols into their underlying schematics. The components actually processed and reported by the software are the underlying primitives, referenced by their hierarchical instance names, after macro expansion.

You can create your own custom macro symbols to use in your designs. The procedure for creating a custom macro is the same for CPLDs and FPGAs. You can create and store your custom macro symbols and their underlying schematics in your local project directory, or you can create a custom library directory to store your custom macros for use in multiple projects. See the “Design and Simulation Techniques” chapter for instructions on creating a custom library. You should never add custom symbols or macros to the Xilinx library directories or modify any of the library symbols or macros. You can, however, copy any of the Xilinx-supplied macros from the library into your project or custom library directory and modify them to suit your design needs, saving the modified component to your local primary directory.


NOTE

When using a Xilinx library macro as a template for a new component, specify a new name when saving the component to avoid confusion.


When you create a custom macro symbol, you must set the Viewlogic block type to Composite, not Module. The Xilinx software for macro symbols does not require symbol attributes. However, if you copy a Xilinx-supplied primitive symbol from the library to use as the basis of your custom macro symbol, make sure you delete the LEVEL=XILINX and LIBVER=2.0.0 symbol attributes. You delete these symbol attributes because they mark the symbol as a primitive.

Next