Intel® Quartus® Prime Software
Intel® Quartus® Prime Design Software, Design Entry, Synthesis, Simulation, Verification, Timing Analysis, System Design (Platform Designer, formerly Qsys)
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.
15339 Discussions

Including files in Quartus II 14.x Project without compiling

New Contributor II

I can include Verilog code within a Verilog file (e.g. using the following:


`include ""


Unfortunately, if I have the above file in the Files tree of Project Navigator, Quartus will try and compile it.


How can I add a file to my project so that it will not compile? (I only want it to be included and compiled within and I would like to keep as a seperate file to make the code easier to manage)

0 Kudos
5 Replies
Honored Contributor III

If code in is needed for the design, then it needs to be compiled. I'm not sure what you're trying to accomplish. You can select what files are part of the project from Project menu -> Add/remove files in project.



New Contributor II

If is included in the Project tree, then it will be compiled when is compiled (because includes and then it will also be individually compiled again as by itself which will fail.


I am trying to break down a big module into 2 files for easier navigation. In my case, my module has 2 state machines. To make it easier to work on, I have one state machine inside and the other inside (they are not really called File1 and Files - these are just example names).


At the moment, is not part of my Project tree (even though it is in the same file folder/directory) and it compiles fine as part of


I would like it to also appear on the Project tree so I can easily open it if I want to.


Having said this, I have started to use Notepad++ lately for both Modelsim and Quartus since it provides time-saving features a software developer expects such as keyboard macros.


I don't think there is an option to compile selected files. Quartus will compile all the files in the project navigator. What I can think of is go to File > Open > to view the file without adding it into the project navigator.


May I know from your experience in using Notepad++, any keyboard macros that you think is good to have but not currently available in Quartus/Modelsim?

New Contributor II

@ShyanYewT_Intel​ I'm used to using IDEs such as MS Visual Studio and even ancient editors such as Emacs. They have "keyboard macros" which allow you to record a sequence of keystrokes and play them back. (Ctrl-Shift-R to start/stop recording and Ctrl-Shift-P to playback recording). Imagine you have a load of port/variable defiintions nicely vertically aligned and you want to move the second columns of words over by 3 characters. You could do this by frantically pressing the space 3 times, moving left 3 times and then moving down one line and doing it all over again. With keyboard macros you just record the sequence and playback - so you can hold Ctrl-Shift down and press P for 10 times for 10 lines of change. And keyboard macros can also playback copy and pasting actions too.


Another simple thing I miss in both Quartus/Modelsim editors is the abilty to highlight a black and press Tab (or Shift-Tab) to move the entire block of lines a tab to the right or left. I'm so used to using this that I highilght a block of text in Quartus/Modelsim, press Tab and accidentally delete/replace the highlighted code with a tab character. :-)


Something I haven't tried is whether or not Quartus would allow me to include a file with an unknown extension. For example, it would be useful to be able to includes .txt or .doc files in the Project tree - these would be related files but not files you would want to compile. I could do something silly such as renaming my to File2.paulsv and then tell Notepad++ that a .paulsv file should be syntax highlighted the same as Verilog file.


Thanks for the feedback. Very interesting indeed.


For the tab, I think the best way is to click and drag (or shift + up/down arrow) the line number on the left to highlight the required line/block so you would not accidentally delete/replace it. Let me know if it helps.


You can actually add any type of file extension in Quartus by select All Files when you adding a file in the project navigator. I checked and Quartus does not compile it if it does not recognize the file but I don't think there is a syntax highlight feature available in Quartus. I recommend Open the file to view as to keep the correct file extension (you do not need to change it back) and you can still save the changes on the file.


I will feedback on the keyboard macro to the team so to evaluate whether this could be added in the future Quartus release. Hope to get your understanding that this may takes some time as it does not impact most customer thus the priority will be low.


Let me know if you need any further assistance.