Intel® Quartus® Prime Software
Intel® Quartus® Prime Design Software, Design Entry, Synthesis, Simulation, Verification, Timing Analysis, System Design (Platform Designer, formerly Qsys)
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
17268 Discussions

How to add/include header file in a module containing just the parameters?

HUl_H
Beginner
1,120 Views

I have a parameters.v file which contains only the parameters. When i add this file inside a module like this,

 

module test();

include "parameters.v"

 

endmodule

 

Quartus is giving me error. Syntax error after " ".

Please guide me what is the proper way of adding a parameter header file in a module and is there any standard format of making a header file comaptibale with Quartus??

 

0 Kudos
2 Replies
sstrell
Honored Contributor III
928 Views

This is a compiler directive, so you need a "tick" (on the tilde key on US keyboards, not an apostrophe), and it should be before the module declaration, not after, and no quotes:

 

`include parameters.v

 

module test();

 

etc.

 

#iwork4intel

0 Kudos
AnandRaj_S_Intel
Employee
928 Views

Hi Haseeb,

 

Yes, you have to include `(tick) in front of include statement.

`include "parameters.v" with quotation.

 

without quotation we may see Error (10096): Verilog HDL Compiler Directive error at top.v(1): incorrect use of predefined text macro "include" -- expected macro field ""filename""

 

Regards

Anand

 

0 Kudos
Reply