# Dynamic array randomization

**URL:** <https://verificationacademy.com/forums/t/dynamic-array-randomization/35915>\
**Category:** SystemVerilog\
**Tags:** SystemVerilog, constraint, Dynamic-Array, array-sum\
**Created:** [March 29, 2019, 11:53pm UTC](https://verificationacademy.com/forums/t/dynamic-array-randomization/35915 "2019-03-29T23:53:08Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![sharatk](https://verificationacademy.com/forums/letter_avatar_proxy/v4/letter/s/e0b2c6/32.png) [@sharatk](https://verificationacademy.com/forums/u/sharatk)\
**Post date:** [March 30, 2019, 1:28am UTC](https://verificationacademy.com/forums/t/dynamic-array-randomization/35915/3 "2019-03-30T01:28:39Z")

</div>

_In reply to [dave\_59](https://verificationacademy.com/forums/t/dynamic-array-randomization/35915/2):_

Thanks Dave,  
“You will see that only solutions choosing a size of 4 succeed.”  
Even a size of 14, will succeed, isnt it?

I added  
constraint C3 { arr.size \>= 4; arr.size \<= 14; }  
and now it seems to work.  
Thanks for all your help.

How do we know this? Is it an arcane interpretation of LRM?  
“The value for the size of an array gets chosen and becomes a state variable”

---

_[View the full topic](https://verificationacademy.com/forums/t/dynamic-array-randomization/35915)._
