Constraint

Constraint to limit the transitions in 24bit register

class A;
rand bit [23:0] AA;
constraint AA_C {  
                 ($countones( AA ^ (AA>>1)) - 1) <= 16;
             
                }
endclass

In reply to avpchandra: