# Randomization method call failing for random seeds

**URL:** <https://verificationacademy.com/forums/t/randomization-method-call-failing-for-random-seeds/32159>\
**Category:** SystemVerilog\
**Tags:** SystemVerilog, system-verilog-constraints\
**Created:** [August 16, 2016, 11:23pm UTC](https://verificationacademy.com/forums/t/randomization-method-call-failing-for-random-seeds/32159 "2016-08-16T23:23:31Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![szy0014](https://verificationacademy.com/forums/letter_avatar_proxy/v4/letter/s/ad7895/32.png) [@szy0014](https://verificationacademy.com/forums/u/szy0014)\
**Post date:** [August 17, 2016, 6:01am UTC](https://verificationacademy.com/forums/t/randomization-method-call-failing-for-random-seeds/32159/5 "2016-08-17T06:01:53Z")

</div>

_In reply to [szy0014](https://verificationacademy.com/forums/t/randomization-method-call-failing-for-random-seeds/32159/4):_

Actually, extending from the same idea, I think for 2 hot bits we can modify the constraint as follows:

```verilog
constraint c_numb{
  (numb & (numb-1) & (numb-2)) == 0;
}

```

So, I agree that this could be used in general.

But still please let me know if it is possible using the function. I curious to see if there is a solution for that.

Thanks

---

_[View the full topic](https://verificationacademy.com/forums/t/randomization-method-call-failing-for-random-seeds/32159)._
