Hello,

In this distribution constraint, I am not getting 50% of time exactly 5 bits are set and remaining 50% of time number of bits set are not 5

```
/*
Write a constraint in systemverilog
----------------------------
1. In a given array N, 5 bits are set 50% of the time
2. 5 bits are not set remaining 50% of the time
*/
class AC;
rand bit[9:0] N;
constraint c1 { N dist { $countones(N)==5 := 50, $countones(N)!=5 := 50 }; }
endclass
module TB;
AC ac;
initial
begin
repeat(10)
begin
ac = new();
ac.randomize();
$display("N is %b", ac.N);
end
end
endmodule
```

```
N is 0000000000
N is 0000000000
N is 0000000001
N is 0000000000
N is 0000000001
N is 0000000001
N is 0000000000
N is 0000000001
N is 0000000000
N is 0000000001
```

Is there any problem with the code

Thanks,

JeffD