Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Altera_Forum
Honored Contributor I
1,788 Views

Quartus workflow

Hi,  

 

My project keeps growing and I am having some difficulties to keep all source files in one place. Other thing what bothers me is constantly switching between modelsim and Quartus. For now I create separate projects for modelsim(functional simulation, testbench) and Quartus (synthesis, testing on hardware, signaltap). 

 

Can someone share what workflow you use? 

What structure do you have for project files?  

What is the best workflow for creating testbech files and simulating complex designs?  

 

Thanks
0 Kudos
18 Replies
Altera_Forum
Honored Contributor I
124 Views

I don't simulate a full FPGA design but only separate modules with well defined interfaces. So I have separate projects for simulation and synthesis/test/debug. I never call modelsim from Quartus. 

As for my project structure, we heavily use version control at my job (Subversion... I'd like to move to Mercurial but it has been hard enough to make everyone move from "cp -r" to subversion already ;) ). So I have even separate folders for source code between simulation and synthesis. My Quartus project uses subversion externals to point to each module I use and I use Subversion to synchronize between my simulation and synthesis folders. It needs some getting used to but I have a lot better control now over module versions and update. It makes it also easier to work on a new version of a module in Modelsim without disturbing an ongoing Quartus project.
Altera_Forum
Honored Contributor I
124 Views

I am a bit dissapointed that i have to create two separate projects one for Quartus and one for Modelsim and add same files to each projects. I create and edit files using quartus because for me Modelsim text editor is ugly and there are no features to help type code faster. Quartus atleast has autocomplete, but still im missing some features in quartus text editor to navigate through code also.

Altera_Forum
Honored Contributor I
124 Views

 

--- Quote Start ---  

I am a bit dissapointed that i have to create two separate projects one for Quartus and one for Modelsim and add same files to each projects. I create and edit files using quartus because for me Modelsim text editor is ugly and there are no features to help type code faster. Quartus atleast has autocomplete, but still im missing some features in quartus text editor to navigate through code also. 

--- Quote End ---  

 

 

You dont 

We dont do it. We just have a working folder with all the source in different folders for each module. Each module has "syn", "src" and "sim" folders, with scripts for synthesis and simultion in the syn and sim folder. That way youcan synth or sim each module on it's own, with a top level folder to bring it all together. 

Everything is script driven so we dont need to manage projects. The scripts will build you a project so you can investigate it when finished
Altera_Forum
Honored Contributor I
124 Views

Also - modelsim and quartus are terrible text editors. Use something usefull like notepad++ instead!

Altera_Forum
Honored Contributor I
124 Views

 

--- Quote Start ---  

Also - modelsim and quartus are terrible text editors. Use something usefull like notepad++ instead! 

--- Quote End ---  

 

 

Do you use some plugin for Notepad++?
Altera_Forum
Honored Contributor I
124 Views

 

--- Quote Start ---  

Do you use some plugin for Notepad++? 

--- Quote End ---  

 

 

I use fingertext which allows you define templates, but thats it. 

Otherwise just raw notepad++. It does have autocomplete by default but I dont use it.
Altera_Forum
Honored Contributor I
124 Views

 

--- Quote Start ---  

You dont 

We dont do it. We just have a working folder with all the source in different folders for each module. Each module has "syn", "src" and "sim" folders, with scripts for synthesis and simultion in the syn and sim folder. That way youcan synth or sim each module on it's own, with a top level folder to bring it all together. 

Everything is script driven so we dont need to manage projects. The scripts will build you a project so you can investigate it when finished 

--- Quote End ---  

 

 

That's funny - I do the exact same thing including the same folder names. A trickier thing to handle is sharing source code between multiple projects. Most of my customers prefer to keep all projects completely separate, even if that requires a lot of file duplication. Wasteful I suppose but in some ways it does keep things simpler.
Altera_Forum
Honored Contributor I
124 Views

 

--- Quote Start ---  

I use fingertext which allows you define templates, but thats it. 

Otherwise just raw notepad++. It does have autocomplete by default but I dont use it. 

--- Quote End ---  

 

 

So what is the big difference between raw Notepad++ and quartus tex editor? I dont see how raw notepad could help to type and navigate trough code faster. What about syntax check and source compilation? 

What i want from text editor: 

  • Autocomplete 

 

  • Some outline view - for example if i have some process in my code compute_xor: process (b,c) begin a<=b xor c; end process; 

     

    I would like to jump to this process insted of scroling through hundreds of lines. Same to component instantiations, declared signals ect.  

    I know that Sigasi has such feature but it is not free as i know. 

 

  • Syntax check 

Altera_Forum
Honored Contributor I
124 Views

 

--- Quote Start ---  

So what is the big difference between raw Notepad++ and quartus tex editor?  

--- Quote End ---  

 

 

Other than column edit mode, and the massive bulk of quartus, not alot. 

 

But everyone has their personal preference. Personally, I'm happy to use the free software as I know I'll be able to use it in any company.
Altera_Forum
Honored Contributor I
124 Views

 

--- Quote Start ---  

Other than column edit mode, and the massive bulk of quartus, not alot. 

 

But everyone has their personal preference. Personally, I'm happy to use the free software as I know I'll be able to use it in any company. 

--- Quote End ---  

 

 

I agree with your statement about free software. Ok so I will write my code with Notepad++, what next? How do you check your syntax and other compilation errors? 

 

Thank you for your time
Altera_Forum
Honored Contributor I
124 Views

 

--- Quote Start ---  

I agree with your statement about free software. Ok so I will write my code with Notepad++, what next? How do you check your syntax and other compilation errors? 

 

Thank you for your time 

--- Quote End ---  

 

 

I usually just use vcom in modelsim or "analysis and elaboration" in quartus. Modelsim more often though.  

 

You can grab modelsim output console into notepad++ but I haven't done that...
Altera_Forum
Honored Contributor I
124 Views

By the way quartus text editor also has column edit mode (Alt+mouse right click). 

 

 

--- Quote Start ---  

I usually just use vcom in modelsim 

--- Quote End ---  

 

 

Can you explain that? What I do not understand how you locate errors in yor code? So you write your code in notepad++. Compile with modelsim and there is error in your code. How do you locate which line or file causes error?
Altera_Forum
Honored Contributor I
124 Views

 

--- Quote Start ---  

By the way quartus text editor also has column edit mode (Alt+mouse right click). 

 

 

 

Can you explain that? What I do not understand how you locate errors in yor code? So you write your code in notepad++. Compile with modelsim and there is error in your code. How do you locate which line or file causes error? 

--- Quote End ---  

 

 

Vcom and the quartus compiler tell you the line number of syntax error. 

Most of our development time is spent writing the code and in simulation - so there is no need for the quartus gui. Hence the use of notepad++
Altera_Forum
Honored Contributor I
124 Views

Could you help me to run modelsim compilation from command line or atleast from where to start?

Altera_Forum
Honored Contributor I
124 Views

You can run the commands inside modelsim in the console, or you can run them from command line if your add the modelsim folder to your path. 

 

# first of all create a library Vlib work # compile a vhdl Vcom myvhdl.vhd
Altera_Forum
Honored Contributor I
124 Views

Thank you.  

 

I was able to compile single files from notepad++ NppExec plugin, by running vcom command.  

 

Do i have to compile each file one by one? Lets say I have hierarchy something like this: 

 

-|top_tb 

--|top 

---|inst0 

---|inst1 

----|inst0
Altera_Forum
Honored Contributor I
124 Views

Yes, or you could write a .Do file to compile them all. .Do is just a script file containing all the vcom commands

Altera_Forum
Honored Contributor I
124 Views

I have created .tcl file to compile my source files. I would like to modify that it would compile all *.vhd files into work library, but there is a problem with compilation order. All files have to be compiled in right order. Is there a way to automaticaly resolve compilation order like Modelsim gui does?

Reply