How to create the cover group's bins that based on array's values

In reply to faigenboim:

You can move the covergroup definition outside the class. Everything it needs is being based as arguments and there is no more need to embed it in the class.