Sunday, 27 September 2015

How coverage tracking helps in verification with Questa-Sim

This blog talks about the tracking of the functional coverage through Questa-Sim which helps users during verification. In verification, code coverage and functional coverage are a very important part and without it verification cannot be closed. With Questa-Sim, user can track the functional coverage report with respect to section of the specification.

Each protocol specification contains basic, intermediate and advanced information related to protocol in different sections. In the starting of any verification, basic functionality is checked and then moved on to intermediate and advanced functionality checking. Here there is a possibility to miss any verification of some basic functionality which creates architecture brake later on and that will create a big hurdle in verification as well as in RTL.

To handle this kind of problem, coverage tracking will be useful. For tracking, xml sheet is provided with each QUESTA VIP which contains information of different coverpoint and crosses covers from different section of specification and it shall be coded in the covergroup. It contains following information:
  1. Section number, indicates section number from the specification
  2. Title of the section, indicates title of the section
  3. Description related to particular section, indicates description of the section
  4. Link, Type, Weight and Goal
    • Link indicates the coverpoint/cross name with covergroup name to which it belongs,
    • Type indicates coverpoint or cross,
    • Weight indicates the weightage of that coverpoint/cross in the Covergroup,
    • Goal indicates the target goal for a covergroup instance
Below is the snapshot of the xml sheet: 
Figure 1 Functional Coverage XML Plan
Figure 1 indicates the header of the functional coverage xml plan in which there are different columns for section, Title, Description, Link, Type, Weight and Goal are reside.

Figure 2 indicates the coverpoint and cross inside the Link column. Its goal is 100% in coverage and weightage is 1 for that covergroup. 
Figure 2 Functional Coverage XML Plan
How to use:
  • Command to generate UCDB from xml: 
          xml2ucdb -format Excel functional_coverage_plan.xml testplan.ucdb
          (which creates “testplan.ucdb”)
  • Command to merge all coverage:
          vcover merge coverage_merge.ucdb testplan.ucdb merged_test_coverage.ucdb
         (which creates “coverage_merge.ucdb” from testplan.ucdb and   merged_test_coverage.ucdb)
  • Open Questa-Sim using “vsim &” command
  • Open “coverage” window through Layout=>Coverage
  • Open coverage_merge.ucdb file through “open” toolbar.
  • Open coverage tracker through View=>Verification Management=>Tracker
How it helps in verification:

Let’s take example of UFS v2.0 specification. It contains total 15 sections.
Section 10 describes the packet type transmitted by UFS host and UFS device.
Section 11 describes different commands driven with command type packet.
Section 12 and 13 describes the various functionalities of UFS
Section 14 describes supported attributes, flags and descriptors.

Now during verification, the basic requirement is to check the transmission and reception of all packet types are supported or not by any IP. So, user can write tests and generate coverage report. Through coverage tracker, it is easy to find weather any packet transmission test is missed out or not.

If these kind of basic functionality is missed then it is good to cover it before checking any intermediate or advanced functionality. Because to cover most of the scenarios, it requires to transmits the different packets in specific manner. From the tracker, it is easy to track weather read/write operation is performed or no on attribute or flags.

Figure 3 Coverage Tracking Report
Figure 3 shows the coverage tracker. There is no coverpoint or cross for chapter 1 to 9. So they are seen disabled in the tracker. 56.85% functionality of section 10 is covered. It also shows each sub-section and its coverage.

Thanks to "Mentor Graphics" and "Mr. Yogesh Chaudhary (Mentor Graphics)" for helping in this blog.

  1. Questa Sim User Manual
  2. JESD220B, Universal Flash Storage (UFS) v2.0