UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

AR# 37747

14.7 XST - How do I define Verilog macros in XST and Project Navigator?

Description

How do I define Verilog macros in XST and Project Navigator?

Solution

There are several ways to define macro or use include file for XST in Project Navigator.

  • Use the -define option in XST command line mode.
  • Place the values inside {braces). Separate each macro with spaces.

    Example: -define {WIDE=16 DEPTH=1024 DEBUG_CODE}

  • Use Verilog macros (-define) property in Synthesis Properties in Project Navigator.
  • Do not use {braces}. Use the pipe ( | ) symbol to separate each macro.

    Example: WIDE=16 | DEPTH=1024 | DEBUG_CODE

  • Define macros in one file, and use 'include for sources which need these definitions.
  • When an 'include statement references a file, XST searches for the file in the following order:

    1. Present working directory.
    2. -vlgincdir option of XST.
    3. Current file location that has 'include. (In this method make sure compile order is set correctly if there are different macro definitions for different files.)
  • Set the macro define file as one Global file in Compile List. Thus you need not use 'include in source file.
  • Right-click the macro define file, and choose Source Properties. And then check "Include as Global file in Compile List".

AR# 37747
Date Created 03/15/2011
Last Updated 02/14/2014
Status Active
Type General Article
Tools
  • ISE Design Suite