Disabling illegal_bins using iffs

In reply to Cmdr_Vimes:
The iff clause is not be used to specify bin creation. It only affects which bins are hit during each sample by evaluating a guard expression each time the sample occurs.

bins          mode_a = {3'b100};
illegal_bins  no_a   = {3'b100} with (DISABLE);

The with clause gets evaluated when the covergroup gets constructed.

Unfortunately, transition bins have very limited functionality in SystemVerilog and you might be better off covering a sequence instead of using a covergroup.