Forum Discussion
when using quartus 18. Why I can't put all my global `define statement in a seperate file and use it as we do in old-version quartus?
- 7 years ago
Hmm.. okay, let me clear the air regarding this.
First the 3 versions are different in the way they handle include files.
Lite / Std : We need to add the include files (be it with .v / .inc / .svh extension ) to the project and designate the top-level file. Then just compile. The tool automatically includes the defines / parameters file during compilation and it goes through.
Pro version : This version is modeled just like the industry ASIC compilers/synthesis tools. Here, even after we include the files into the file list, we still need to manually mention this include file in the design file using the `include <> compiler directive. This instructs the compiler to search for this file and include it during the compile process.
@Kevin Hsing .. I suggest you just add the `include "define.v" statement to the start of your design file. Make sure the path to the file is correct. If the define.v file is in the same folder as the source file, then its okay as is.. `include "deinfe.v"
This will include the file during compilation and you should not see those errors/warning.
@Abe
IT'S NOT A BUG.
If you would tried the link which i have shared, It would have solved your problem.( we verify answer before providing it).
- Quartus pro 18.0 works well with macros in separate file or in same file.
- I have verified with your design in quartus version(17.1,18,18.1) and edition(Lite & pro) & It read the defines file and take in the value, but you have to add `include "define.v" line in it design.
Attached the documents with images.
Let me know if this has helped resolve the issue you are facing or if you need any further assistance.
Best Regards,
Anand
Well, I did noticed inserting `include define.v in each of my .v file can solve my problem.
My project has hundreds of .v, although I can complete the insertion task using a shell script, still I don't think it's a graceful solution, since all other eda tools I use don't require such coding style including quaruts 18.0 standard version, It seems it's a new requirement of quartus-pro series code parser.
If there is no other work-around such as using a global assignment to inform the tool such file should be read first and all the macros in it be considered global, I'll just add `include statement to continue my evaluation.
Still, I hope quartus pro's behavior is consistant with quartus standard series and other eda tools.
Thanks!