I have a script which get list of signals and create a covergroup, the covergroup declare a cverpoint to every signal, and now I want to add a cross between all the coverpoint with one of the coverpoint that will be defined by the user with `define statement.
for this I need to know if there a way to use generate statement into a covergroup and if there a way to ask if coverpoint is equal to other coverpoint.
that should be seems something like this:
`define user_cp cp_2
cp_1: coverpoint sig1;
cp_2: coverpoint sig2;
cp_3: coverpoint sig3;
generate if (`user_cp != cp_1) cross `user_cp, cp_1; endgenerate
generate if (`user_cp != cp_2) cross `user_cp, cp_2; endgenerate
generate if (`user_cp != cp_3) cross `user_cp, cp_3; endgenerate
Is there a way to implement something like this?
it include two questions.
1. use generate inside a covergroup
2. ask if coverpoint equal to the other
or Is there other way to declare cross coverage with condition.