I want to define a coverpoint outside class in sv file.
In class a covergroup/coverpoints can be defined.
In multiple cover groups one coverpoint is repeating. so in order to avoid multiple declaration in covergroups.
Is any method available.
I tried in sv file, it is working
Ex:
`define coverpoint_abc: coverpoint xyz
{
option.comment = “xyz”;
option.weight = 0;
bins P_4 = {4’b0001};
bins P_8 = {4’b0010};
}
You can easily define a covergroup outside a class; there is no need to use a `define macro. See section 19.3 of the IEEE 1800-2012 LRM. You will need to create arguments to your covergroup to pass in different variables you want to be covered.
Hi Dave_59,
Thanks for your reply.
I want to define a coverpoint not covergroup in Class based environment.
Coverpoint is repeated in multiple covergroups. So want avoid coverpoint is defined in each covergroup.
As `define or any other way we can define.
PLease helpme.
*In reply to mohan_cvr:*You need to explain further what your requirements are for the same coverpoint in multiple covergroups is. Are you trying to do a cross? Unfortunately there is no way to share a coverpoint definition other by sharing the whole covergroup.