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

How do get code coverage to work on modelsim 6.4a

Altera_Forum
Honored Contributor II
3,202 Views

Hello, 

 

This concerns getting code coverage to work in modelsim Altera starter edition 6.4a. Do I need license in order to get anything meaningful out of the coverage feature ? 

 

Here are the steps I followed in modelsim GUI, but did not have much luck. 

 

1. Once modelsim is invoked by double clicking the testbech.v, I went into compile options, and selected 'coverage'. In that I selected the standard code coverage options....Enable Statement, Branch, Condition, Expression etc, and Hit OK. 

 

2. I Compiled the design (after making sure that the original work directory is deleted).  

 

3. Next, I simulated the design in work (after selecting the usual libraries - altera_mf_ver, lpm_ver, etc), but did not start the run command.  

 

4. Once the design was elaborated, and ready to be simulated....I selected Tools->Coverage Report->text format. I typed in my_coverage.txt. If all goes well this is the text file (as opposed to the coverage database file) in which all necessary info should be available for viewing. 

 

5. Next...Tools->Coverage Save. I specified my_cov_data_base.UCDB as the coverage database file (This is in encrypted format I take it). 

 

6. Changed the layout to Coverage (Layout->Coverage). 

 

7. Ran the design. 

 

8. In the main area I could have the main coverage metrics displayed by selecting 'Files' tab under the main display area. Other selections are Libraries, Sim, Memories, etc. So if all goes well, when the simulation is over then all the displayed metrics should be filled in upon simulation completion (Stmt Count, Stmt %, Branch Count, Branch %, Condition Count, Condition Hits, etc) 

 

9. But when I run I don't see any metrics being displayed at all. 

 

10. On completion the .txt file (in step 4) is empty (0 size), and the UCDB file contained something (non-zero size) 

 

11. From File->open menu, I selected the UCDB option of File Open, and read in the UCDB file created in step 5. In the main window I see the following ...'Workspace (Local Coverage Aggregation..) 

 

Am I missing something 

 

Thanks 

 

--itsfun2learn
0 Kudos
1 Reply
Altera_Forum
Honored Contributor II
2,265 Views

The starter edition doesn't support code coverage, you need to buy an extra license for that. 

I don't know why the menu option is there though. I'm guessing it is a marketing tactic to make you want to buy a license ;)
0 Kudos
Reply