Handling env specific coverage with per_unit_instance option in specman e

Let’s say we have the following scenario: An eVC, that is used in multiple environments, has a functional coverage implementation. We want to see that coverage filled, but also we want to see how it was filled by each environment that used that agent. 

Handling env specific coverage with per_unit_instance option in specman e
  1. This is where the per_unit_instance option of the specman e coverage comes in handy. Below, you can see an example of the usage of that option in specman e code.

That way, every instance of the unit struct example_env_u will create a standalone instance of the coverage of the example_cg_ev covergroup, which will also be reflected in a tool that can show us the collected coverage (imc, vmanager)

Now, the problem that may occur with the above implementation is that every instance will have that coverage, which in some cases may be unwanted. In order to have specific instances of a unit include the above coverage, we need to use an additional option along with the per_unit_instance, called instance_no_collect. This option lets us exclude specific unit instances that satisfy a certain logical expression. 

So, in order to use that we can take the below steps:

    1. Add in our coverage file an extension of that env or go straight into the env file and add a boolean variable with a meaningful name, as seen below. Constraint it softly to TRUE.
Handling env specific coverage with per_unit_instance option in specman e

           2. Use the newly created variable along with the instance_no_collect                 option, as seen below.

        3. Set the variable to FALSE for each instance that is present in our full             environment and for which we want to collect the above coverage. In             the below example, the coverage will be collected and shown only for             unit instance ex_env_unit_3.

Handling env specific coverage with per_unit_instance option in specman e

Contact Us

Please, enter your details below. We will get back to you as fast as we can.

This website uses cookies to ensure you get the best experience on our website.

Get Cogita

Please, enter your details below. We will get back to you as fast as we can.

Thank you!

We will get in touch soon.

Get a Quote

Please, enter your details below. We will get back to you as fast as we can.