Binsof in Coverage

Hello,

This my covergroup sample example,
It includes two data of 2 bits in a class that i have not mention in code sample.In that I have to make sure that cross coverage of both data must ignores the bins whenever the data2 is ‘1’. Means there are 4 cases 0-1,1-1,2-1,3-1. But in my case it just ignores any one of the above case because i have generated 1 ‘lo’ ignore bins .

So what to modify in these to have all four cases get ignored ?



covergroup cvp;
	coverpoint obj1.data1;
	coverpoint obj1.data2;
	cross obj1.data1,obj1.data2
	{
		ignore_bins lo  = binsof(obj1.data1) intersect{1};
		
	}
endgroup


In reply to Huzefa Halolwala:
I think you want

		ignore_bins lo  = binsof(obj1.data2) intersect{1};

In reply to dave_59:

No I want the following data to be ignored :
data1 = 0 data2=1;
data1 = 1 data2=1;
data1 = 2 data2=1;
data1 = 3 data2=1;

But instead of this in my program it ignores only 1 case from the above 4.

I agree with Dave.

If you want to ignore cross coverage bins when data2=1 then you should modify your code as Dave suggested.

ignore_bins lo = binsof(obj1.data2) intersect{1};

I tried and its give me a expected output.

Thanks,
Paresh

In reply to Paresh:

Thanks Paresh and Dave.