How to find the functional coverage of a signal which is declared in a module. This module is instantiated 256 times

Hi,

I have a module named sf which has a signal named max_payload_size. The module sf is instantiated 256 times. How can i find the functional coverage of signal “max_payload_size” for all 256 instances. I have a uvm testbench for it. The code for finding the functional coverage is written in a class extended from uvm_subscriber.

You’re missing a lot of details. You need to explain what condition would provide 100% coverage. When does this signal need to be sampled? Are you looking for coverage for each instance individually or collectively?

Ok. So 100% coverage is achieved when the three bins are hit for max_payload_size for all the 256 instances.

1. For max_payload_size <1500

2. For max_payload_size = 1500

3. For max_payload_size > 1500

I am looking for coverage collectively. But please suggest both methods

The brute force approach, based on the information you’ve provided, involves creating an array of 256 monitors equipped with analysis ports. These monitors will connect to 256 instances of your coverage collector. Each monitor can probe your modules’ signals using one of the methods outlined in this paper: Updated Example Code from DVCon Paper: The Missing Link: The Testbench to DUT Connection.

By default, the coverage you defined in your collector is collective. However, you can change this to individual by setting the option.per_instance=1 when declaring your covergroup.

Can I use only one monitor and a for loop inside the covergroup.

There are many different options, but there are no for loops inside a covergroup.

Hi Dave,

Please suggest some options.

Thanks