Conditional coverage

Though it’s not OVM related I thought it’s a better place to find answers for SV as well.

In SV is there any way by which I can create coverage bins for result of comparison ?
for example consider two variables a1,a2. I want to create bins like a1>a2,a1=a2 & a1<a2.
Can this be done ?

Sorry, guys … but I got that answer in a book by Chris Spear.
you can have expression while specifying coverpoints.
e.g.

covergroup CovLen;
len16: coverpoint (tr.hdr_len + tr.payload_len);
len32: coverpoint (tr.hdr_len + tr.payload_len + 5’b0);
endgroup