How to generate a number with non-consecutive 1's

In reply to UVM_SV_101:

Your constraint didn’t allow consecutive 0’s or 1’s, which meant there had to be exactly 16 1’s for that to work.