Generate 32 bits of data which will have 10% of bits (average) toggling over "n" number of transactions

In reply to sruthikrapa:

The problem statement is not very clear to me. As far as I got the issue, you can use the following constraint:

constraint dist {$countones(data) inside {[3:4]};}

Since 10% of 32 bits is 3.2, I have kept 3 to 4 bits as 1. In every randomization, 3-4 bits will be kept 1 and the subsequent randomization, some other set of bits will be set to 1. Thereby resulting in toggling of bits. You can also use dist operator as shown in the question sample as follows:

constraint dist {$countones(data) dist {3:= 70, 4:=30};}

Please elaborate if this is not your requirement.