# 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:** 6

<div class="post-metadata">

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

</div>

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

That’s correct! But the problem here is, as Srini explained, function call inside constraint will force dependent variables to be solved first and this can generate conflicting conditions.

There won’t be parallelism if functions are used in constraint… So, that restricts the use i guess.

Best way is,

```verilog
constraint c1{
  $countones(numb) == 1;
}

```

---

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