In reply to dave_59:
Thanks for your interest....
How to count the transitions:
If you start either from LSB or from MSB, start counting the transitions for every 0 to 1 and 1 to 0 till the end then the total count will be your number of transitions.
1) AA = 24'b0010_1011_1010;
Transitions means the bit transitions like 0 to 1 or 1 to 0. So from above we have 7 transitions in the example 1.
2) AA = 24'b101001010101;
Here the bit transitions are 10.
so, my requirement is these transitions in a randomized variable should not exceed the 16 that is violation.
see below example:
3) AA = 24'b0110_1001_1001_0010_0101_1010_1010_1010
This example contains 24 transitions which is greater than 16 transitions which need to be avoided in the randomization of AA by using the constraint.
Hope now you got my point......