Hi There,
I have a rand variable called instruction this variable can get values like ADD, MUL, OR, and SUB in constraints, it is based on the distribution but sometimes they override the constraint distribution probability to zero for some of the values.
rand int instruction;
constraint inst {instruction dist { ADD := 5, MUL := 8, SUB := 12, OR := 7 };} // this is actual constraint
//some times they modified to this type also
constraint inst {instruction dist { ADD := 0, MUL := 8, SUB := 12, OR := 7};}
In the coverage file coverage for this instruction is hardcoded.
coverpoint instruction {
bins a = {ADD}; //whenever add dist makes to zero in testcase creation we don't get add at that time we don't get 100 percent coverage
//is there any possibility to disable the bin when add instruction probability is zero
bins m = {MUL};
bins s = {SUB};
bins o = {OR};
}
Whenever some of the instruction value probability is zero, I am not getting 100 percent coverage. Is there any possibility of allocating the bins on the fly?