Can we do coverage for Configuration class object containing configurations knobs?

Hi,

I am currently working on SPI VIP development. I have my testbench env setup (configuring spi transfer modes) done through configuration knobs declared in the configuration class object. I will have them defined in my test and set-get the config object in my agents where it is needed.

So if i want cover the modes as a part of my functional coverage, How can i do that.?

Thanks in advance.

In reply to adharshh:

You can collect coverage on anything you want. SystemVerilog covergroups have no idea what the data it’s covering represents.

You can construct covergroups in your configuration class. You just need to make sure to sample them after the knobs have been set, which could be the end_of_elaboration_phase. If the knobs change during the test, you need to sample them after each change.