Hi there
Your code creates 16 bins at all times, but only SAMPLES a certain number of them, according to your config.
This means that if you configure for 2 bins, then the other 14 bins will never be sampled, which is not your intention of the other 14 bins never being created.
You could instead assign an option.weight to each coverpoint, using the configuration value to set the weight to 1 for values you want to be sampled, and 0 for values you want to ignore.
The coverpoints / bins will still be created, but with a weight of 0, meaning that unwanted bins will not adversely affect your coverage.
Because option.weight can only be used at covergroup or coverpoint level, you would rephrase your code so that instead of one covergroup with one coverpoint and lots of bins, you would still have a single covergroup, but instantiating 1 coverpoint of various weights per possible configuration option, each coverpoint having a single “hit” bin for when a hit occurs.