FPGA, SoC, And CPLD Boards And Kits
FPGA Evaluation and Development Kits
Announcements
Intel Support hours are Monday-Fridays, 8am-5pm PST, except Holidays. Thanks to our community members who provide support during our down time or before we get to your questions. We appreciate you!

Need Forum Guidance? Click here
Search our FPGA Knowledge Articles here.
5283 Discussions

Is there a way to include file with macros and small modules without having to use `include in every file?

Luis_R_Intel
Employee
1,108 Views

Using the Quartus Prime software during the analysis and sythesis stage, we get compilation issues due to undefined text macros. The text macros are declared in their own file and used in other files of our design. The file is included in the project and looks to be analyzed before the other files which use the macros, yet there are still errors saying undefined text macro.

0 Kudos
3 Replies
AnandRaj_S_Intel
Employee
682 Views

Hi Luis,

 

  1. We need to add the include (macro)files to the project and just compile for Quartus STD & LITE.
  2. For Quartus Pro, the compiler to search for macro file and include it during the compile process. No need to use `include in Verilog module. Please check the attached image

 

We recommend user to just add the `include "define.v" statement to the start of your design file and add macro file in file list.

 

Hope it helps! Let me know if you need any further assistance.

 

Regards

Anand

 promacro.JPG

ak6dn
Valued Contributor III
682 Views

No. There is no implicit INCLUDE capability in verilog. You need to use `include <file> in each separately compiled verilog module.

AnandRaj_S_Intel
Employee
682 Views

 

Yes, We can use by including the macro files into the file list. If we don't include macro files in file list than we have to `include <file> in each Verilog module. 

Please check the attached image.

macropro.JPGmacrostd.JPG

Reply