In reply to atashinchi:
You can use a combination of ‘bin set’ expressions and ‘bin with’ expressions
int set1[] = {1,2,3};
int set2[] = {4,5,6};
int set3[] = {7,8,9};
int opcode;
covergroup cg;
cp_1 : coverpoint opcode {
bins cp_1_opcode[] = set1;
}
cp_2 : coverpoint opcode {
bins cp_2_opcode[] = set2;
}
cp_3 : coverpoint opcode {
bins cp_2_opcode[] = set2;
}
cp_total : coverpoint opcode {
bins cp_total_opcode[] = cp_total with (item inside {set1,set2,set3});
}
endgroup
See sections 19.5.1.1 Coverpoint bin with covergroup expressions and 19.5.1.2 Coverpoint bin set covergroup expressions