In reply to dave_59:
Hi Dave ,
Is the coverpoint label restricted to be used within the following 2 cases only ? :
- The same coverpoint ( Eg : cover_point_identifier with ( with_covergroup_expression ) )
- cross bin ( via binsof( cp_label ) .. )
I tried using it within a different coverpoint of same covergroup , however I observe a compilation error .
enum { SUB , ADD , MUL , DIV , POWER_OF } opcode ;
covergroup cg ;
cp_1 : coverpoint (opcode)
{
bins substract = { SUB };
bins addition = { ADD };
}
cp_2 : coverpoint (opcode)
{
bins multiply = { MUL };
bins divide = { DIV };
}
cp_3 : coverpoint (opcode)
{
bins powerof = { POWER_OF };
}
cp_total_equivalent : coverpoint (opcode)
{
bins sub = cp_1 with ( item inside { SUB } );
bins add = cp_1 with ( item inside { ADD } );
bins mul = cp_2 with ( item inside { MUL } );
bins div = cp_2 with ( item inside { DIV } );
bins power = cp_3 with ( item inside { POWER_OF } );
}
endgroup
Within coverpoint cp_total_equivalent if I replace labels cp_1 , cp_2 and cp_3 with cp_total_equivalent , it works