In reply to dave_59:
In reply to avpchandra:
I think what you are asking is to look at a series of randomizations, and you are defining a transition as a change from one randomization to the next. Then what you want is
class A;
rand bit [23:0] AA;
constraint AA_C { $countones(const'(AA) ^ AA) == 16;}
endclass // A
Hi Dave,
what you gave is transitions of series of randomization, but i want the variable AA shall not have more than 16 transitions. This is my restriction on variable AA so i mean, whatever the value it takes in randomization but the value should not exceed 16 transitions in it.
Thanking you,