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?
When we use old-version quaruts, say 15.0, we can put all the global `define statement in a seperate file , such as define.v ,add it to the file list, ant put it at first place to make sure it's seen by tool before it can see other .v files.
But when I tried to do the same thing in quartus 18, it doesn't work, quaruts keeps telling me my macros are not defined. unless i include my define.v in each .v file, which is ugly.
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.