Constraint

In reply to avpchandra:

In reply to srikanth_6313:
Hi Srikanth,
Please explain in detail your solution…? Your solution is working
Thanks,

This constraint is not valid for all conditions. Consider a 4 bit number, AA = 4’b0011; Then, $countones((0011 ^ 0001) - 1) is 0. But number of bit transition is 1.