Functional coverage

what is the use of “option.per_instance” in functional coverage ??

In reply to surya narayana Gutha:

Each instance contributes to the overall coverage information for the covergroup type. When true, coverage information for this covergroup instance shall be saved in the coverage database and included in the coverage report. When false, implementations are not required to save instance-specific information.

In reply to surya narayana Gutha:
The choice of how you use option.per_instance usually depends on how you sample each coverage instance.

When you have a stream of transactions, you typically sample each transaction object once. If your transaction object has 5 different modes, you would want to aggregate coverage over all instances with the default per_instance=0. You achieve 100% coverage when all 5 modes have been hit amongst all the different instances.

But now you have 10 interfaces using these same transactions, and you want to cover that each interface instances hits the 5 modes. Now you need to create 10 covergroup instances for each interface instances with per_instance=1. You can only achieve 100% coverage when all 10 covergroup instances have hit all 5 modes.

Thank you dave…

thank you kumar