Intel® Quartus® Prime Software
Intel® Quartus® Prime Design Software, Design Entry, Synthesis, Simulation, Verification, Timing Analysis, System Design (Platform Designer, formerly Qsys)
16545 Discussions

Need help with Quartus + Altera-ModelSim

Altera_Forum
Honored Contributor II
1,534 Views

I'm new to Quartus and Altera-ModelSim. I'm having problems getting the complete system working. 

 

I can compile in Quartus but I can't simulate the .vho file in ModelSim. I can simulate a VHDL file in ModelSim that was NOT compiled in Quartus. 

 

Could I get a simple VHDL design file and a Testbench file that is known to work with this system. It could be as simple as an and-gate function.
0 Kudos
3 Replies
Altera_Forum
Honored Contributor II
683 Views

Hi, 

 

--- Quote Start ---  

I can compile in Quartus but I can't simulate the .vho file in ModelSim 

--- Quote End ---  

 

A successful compilation in Quartus is a great thing for someone new to Quartus. (and even robust designers).  

 

to simulate .vho file, You must compiile it in ModelSim, I think, and simulate with menu Simulate...>Start Simulation...> Resolution = "ps". 

.vho are VHDL file generated by Quartus with all delays which make simulation very long (huge calculation) and it usually doesn't help. 

 

 

--- Quote Start ---  

I can simulate a VHDL file in ModelSim that was NOT compiled in Quartus./QUOTE] 

Quartus only compiles "synthetisable" design. "after" clauses are ignored... Are you new to VHDL ? 

 

In my opinion, you will find some great "getting started" and tutorial guides, examples over the web. Go on www.altera.com/literatures. 

This is for simulation only. 

 

Later,  

For a design to be implemanted, you have to assign pins of the FPGA (or CPLD) and others thing. 

I advice you to use "Inputs tri-stated" for pins that do not drive logic (project settings). 

 

Good luck.
0 Kudos
Altera_Forum
Honored Contributor II
683 Views

Dear Marlboro, 

 

In order to use VHO file in Modelsim, you need to do the follwoing: 

 

1. Open the .vho file in modelsim (after adding it to the relevant project). 

2. Look at the first VHDL files, you will probably notice some Libraries Quartus added. For example if you are using Cyclone III, you will see: Library cycloneiii; 

Use cycloneiii.components.all; 

 

You may see more libraries like Altera, Altera_mf, LPM,etc. 

In order to compile this file, Modelsim must have these libraries or a reference to them. So, to verify you have them, you can click in ModelSim at the library tab and then look for these library names. If you cant find them then see step 3. If you find them you will be able to compile vho file. 

Please note that if you declared any input/output in your entity as Integer, it appears in the VHO file as STD_LOGIC_VECTOR, and thats ok since after synthesis there is only 0/1 and not integer anymore. Thats mean you will need to change your testbench to match vho file entity ! 

 

3. If you cant find these libraries then you probably dont use modelsim_altera but the full version. In that case you need to open new project for any library you would like to add to Modelsim. For example, if you would like to add cycloneiii library then close your current project and open a new one. Then add to this project existing files from: D:\Altera\90sp2\quartus\eda\sim_lib (this is an example from my computer of course). In this folder you will find all relevant libraries for simulation. Take as example the cycloneiii_atoms.vhd and cycloneiii_components.vhd to your new project, compile them and close the project. Open your original project, go to new-> library --> add new library. Then give the library name (the same name as appears in vho file !) and provide the physical path to work library (the library where you have just compiled cycloneiii vhd files). 

Compile the design and you done !
0 Kudos
Altera_Forum
Honored Contributor II
683 Views

 

--- Quote Start ---  

I'm new to Quartus and Altera-ModelSim. I'm having problems getting the complete system working. 

 

I can compile in Quartus but I can't simulate the .vho file in ModelSim. I can simulate a VHDL file in ModelSim that was NOT compiled in Quartus. 

 

Could I get a simple VHDL design file and a Testbench file that is known to work with this system. It could be as simple as an and-gate function. 

--- Quote End ---  

 

 

Hi Marlboro I am still relatively new to Quartus and Altera-ModelSim... 

 

Looking at it from the point of view of someone who has only recently picked it up. I found the easiest way to get the complete system to work, was to use quartus to create a .vht testbench template, which you can change to carry out whatever simulations you need. I am going to assume you have Altera ModelSim set up as your EDA simulation tool in settings etc. 

 

The easiest way to create a testbench is to just go to Processing>>Start>>Start Test Bench Template Writer 

 

Once this says complete, you can open the test bench template for editing in either the quartus or Model Sim text editors, add in you stimuli etc. 

 

Once you have the test bench that you are happy with, I usually go Tools>>Run EDA Simulation Tool>> EDA RTL Simulation  

 

or  

 

Tools>>Run EDA Simulation Tool>> EDA Gate Level Simulation  

 

depending on the level of simulation you want. 

 

Once ModelSim opens, just choose compile and find your .vht file 

 

When this is compiled go to simulate, and select your compiled testbench from the work library. Then add the signals you want "To Wave" and run the simulation for the required duration... 

 

This is probably a very basic way of doing things, but as I said I have just got to grips with it myself... just play around with the tools and it should all come good! 

 

Cheers, 

 

Lee H
0 Kudos
Reply