Is there a way to enable or disable a coverage using the configuration class?
I want to use the same coverage class for block level verification and for system level verification but in system level I want to disable some coverage that are not applicable on that level.
If you can separate the functional coverage you want to collect into distinct covergroups, your coverage class can contain multiple covergroups. You can control which covergroups get constructed and sampled using your configuration class. Note that covergroups embedded in classes must be constructed inside the the embedding class’s constructor, so you need to make sure the configuration class is set up before the coverage class gets constructed.
If you can’t make distinct covergroups, your best options is to use your tool’s command line interface to exclude individual coverpoints and crosses.