Toggle coverage dor dynamic array

Hello,

I’m stuck with an issue.
There is a scenario where I have a register (say reg a) of some very big length. Out of all the bits only a few of them are used and the number of bits used are decided during the run-time.
Now I want to capture the toggle coverage of the bits used during the simulation.
What would be the appropriate way of writing the toggle coverage of the bits used.

Thanks
Nitin