# Applying unique to random variables

**URL:** <https://verificationacademy.com/forums/t/applying-unique-to-random-variables/35572>\
**Category:** SystemVerilog\
**Tags:** SystemVerilog, constraint, associative-array\
**Created:** [January 5, 2019, 11:45pm UTC](https://verificationacademy.com/forums/t/applying-unique-to-random-variables/35572 "2019-01-05T23:45:36Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![dave\_59](https://verificationacademy.com/forums/user_avatar/verificationacademy.com/dave_59/32/4499_2.png) [@dave\_59](https://verificationacademy.com/forums/u/dave_59)\
**Post date:** [January 6, 2019, 8:27am UTC](https://verificationacademy.com/forums/t/applying-unique-to-random-variables/35572/4 "2019-01-06T08:27:23Z")

</div>

_In reply to [kernalmode1](https://verificationacademy.com/forums/t/applying-unique-to-random-variables/35572/3):_  
Your problem has nothing to do with unique constraints. The problem is as I noted above, the LRM does not allow size constraints on an associative arrays. (See section 18.4 Random Variables). What would be the behavior if the array was already populated with random index values?

---

_[View the full topic](https://verificationacademy.com/forums/t/applying-unique-to-random-variables/35572)._
