# Constraint Randomization question

**URL:** <https://verificationacademy.com/forums/t/constraint-randomization-question/39760>\
**Category:** SystemVerilog\
**Tags:** SystemVerilog, systemverilog-arrays-struct-constraint-randomization-indexes, constraint-randomization, systemverilog-Arrays-packedarrays-unpackedarrays\
**Created:** [October 29, 2021, 12:36am UTC](https://verificationacademy.com/forums/t/constraint-randomization-question/39760 "2021-10-29T00:36:27Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![sk7799](https://verificationacademy.com/forums/letter_avatar_proxy/v4/letter/s/b487fb/32.png) [@sk7799](https://verificationacademy.com/forums/u/sk7799)\
**Post date:** [October 29, 2021, 8:46pm UTC](https://verificationacademy.com/forums/t/constraint-randomization-question/39760/4 "2021-10-29T20:46:19Z")

</div>

Hi Dave,

The way I tried approaching the problem is to break it into multiple sub-problems.  
I did not copy-paste the snippets but translated the problem into comments and then substituted each comment with a constraint. Since I am in the learning stage, I did refer to multiple websites for syntax and working style of each constraint and kept working on the code in eda playground: [Edit code - EDA Playground](https://www.edaplayground.com/x/WLiT)

Please let me know if there’s a better approach to learn randomization.  
I am currently following multiple websites: [verificationguide.com/chipverify.com/siemens](http://verificationguide.com/chipverify.com/siemens) videos by chirs spear and system Verilog lrm.

Thanks,  
-s

---

_[View the full topic](https://verificationacademy.com/forums/t/constraint-randomization-question/39760)._
