The Include Statement allows you to import text from an AHDL
Include File (.inc) into the current file. The following example shows an
Include Statement:
INCLUDE "const.inc";
The Include Statement has the following characteristics:
- The Include Statement begins with the keyword INCLUDE, followed by
the name of the file to be included, enclosed in double quotation marks
(").
- If you do not specify a file name extension, the Compiler assumes the extension
.inc.
- The statement ends with a semicolon (;).
- When the Compiler processes the project, the text from the AHDL Include File is
substituted for the Include Statement. In the example shown above, the file
const.inc is substituted for the text INCLUDE
"const.inc";.
Note: Refer to Include Statement & AHDL Include File Rules for additional information
on using AHDL Include Files and Include Statements.
Include Statements are often used to include Function Prototypes for a lower-level
design file in a Text Design File (.tdf). You can then
insert an instance of the logic function with an Instance Declaration or an in-line
logic function reference.
When you compile a file, the Compiler searches for AHDL Include Files in the following
order:
- The project directory.
- Any user libraries specified with the Settings dialog
box.
- The \quartus\libraries\megafunctions and
\quartus\libraries\others\maxplus2 directories created during
installation.
If you change a TDF that includes an AHDL Include File, perform analysis and elaboration
or Hierarchy tab of the Project Navigator.