Building & Configuring Coverage Model – VMM Style – Part-I
Posted by paragg on 24th June 2011

Parag Goel, Senior Corporate Application Engineer, Synopsys
“To minimize wasted effort, coverage is used as a guide for directing verification resources by identifying tested and untested portions of the design.”
- IEEE Standard for System Verilog (IEEE Std. 1800-2009)
Configurability & reusability are the buzz^^^ words in the verification of chips and this are enabled to a big extent by the present day verification methodologies. Through a set of blogs, I plan to show how we can create configurable coverage models in VMM based environments. Given that, AMBA – AXI is one of the most commonly used protocols in industry for communication amongst the SOC peripherals, I chose protocol AXI based framework for my case study.
The idea here is to create a configurable coverage model leveraging some of the base classes provided in the methodology so that we can make it completely reusable as we move from the block to system level or as we move across projects. Once, we enable that, we can move the coverage model inside the Sub-environment modeled by vmm_group or vmm_subenv which are the units of reuse.
Primary Requirements of Configuration Control:
Two important requirements that are needed to be met to ensure that the coverage model is made a part of reusable components are:
1. Ability to enable/disable the coverage model whenever required.
2. Ability to Turn ON/OFF different subgroups at the desired granularity. For example, an user may not always want the Error Coverage to be enabled, unless under specific circumstances.
To meet the above requirements, we make use of the VMM Global and Hierarchical Configurations
Through the vmm_opts base classes, VMM provides a mechanism to control the configuration parameters of a verification environment. This can be done in a hierarchical as well as in a global manner. These options are summarized below:
In the environment, the coverage_enable is by default set to 0, i.e. disabled.
coverage_enable = vmm_opts::get_int(“coverage_enable”, 0);
Now, the user can enable the coverage via either of the two mechanisms.
1. From user code using vmm_opts.
The basic rule is that you need to ‘set’ it *before* the ’get’ is invoked and during the time where the construction of the components take place. As a general recommendation, for the construction of structural configuration, the build phase is the most appropriate place.
function axi_test::build_ph();
// Enable Coverage.
vmm_opts::set_int(“@%*:axi_subenv:enable_coverage”, 1);
endfunction
2. From command line or external option file. The option is specified using the command-line +vmm_name or +vmm_opts+name.
./simv +vmm_opts+enable_coverage=1@axi_env.axi_subenv
The command line supersedes the option set within code as shown in 1.
User can also specify options for specific instances or hierarchically using regular expressions.
Now let’s look at the typical classification of a coverage model.
From the perspective of AXI protocol, we can look at the 4 sub-sections.
Transaction coverage: coverage definition on the user-controlled parameters usually defined in the transaction class & controlled through sequences.
Error coverage: coverage definition on the pre-defined error injection scenarios
Protocol coverage: This is protocol specific ((AXI Handshake coverage)). In case of AXI, it is mainly for coverage on the handshake signals i.e. READY & VALID on all the 5 channels.
Flow coverage: This is again protocol specific and for AXI it covers various features like, outstanding, inter-leaving, write data before write address etc…
At this point, let’s look at how these different sub-groups with the complete coverage model can be enabled or disabled. Once the coverage configuration class is built and passed on to the main coverage model, we need a fine grain control to enable/disable individual coverage models. The code shows how the user can control all the coverage models in the build phase of the main coverage class.
Here too, we can see how we use vmm_opts comes to meet the requirements of controlling individual parameters.
vmm_opts::set_int(“@%*:disable_transaction_coverage”, 0);
vmm_opts::set_int(“@%*:disable_error_coverage”, 0);
vmm_opts::set_int(“@%*:disable_axi_handshake_coverage”, 0);
vmm_opts::set_int(“@%*:disable_flow_coverage”, 0);
In my next blog, I show how the hierarchical VMM Configurations is used to dynamically pass on signal level and other configuration related information to the coverage model. Also, we shall discuss the usage of VMM TLM feature, towards fulfilling the goal of configurable coverage model. Stay tuned!
Posted in Configuration, Coverage, Metrics, Organization, Reuse, SystemVerilog, Uncategorized, VMM, VMM 1.2, VMM infrastructure | No Comments »









Srinivasan Venkataramanan & Bagath Singh, CVC Pvt. Ltd. Jaya Chelani, Quartics Technologies
Nasib Naser, Phd, CAE, Synopsys