# How to constrain 2 dynamic arrays to related to each other?

**URL:** <https://verificationacademy.com/forums/t/how-to-constrain-2-dynamic-arrays-to-related-to-each-other/34841>\
**Category:** SystemVerilog\
**Tags:** SystemVerilog, constraint-array\
**Created:** [August 9, 2018, 9:51pm UTC](https://verificationacademy.com/forums/t/how-to-constrain-2-dynamic-arrays-to-related-to-each-other/34841 "2018-08-09T21:51:29Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![mlsxdx](https://verificationacademy.com/forums/letter_avatar_proxy/v4/letter/m/ba9def/32.png) [@mlsxdx](https://verificationacademy.com/forums/u/mlsxdx)\
**Post date:** [August 9, 2018, 11:59pm UTC](https://verificationacademy.com/forums/t/how-to-constrain-2-dynamic-arrays-to-related-to-each-other/34841/4 "2018-08-09T23:59:00Z")

</div>

_In reply to [dave\_59](https://verificationacademy.com/forums/t/how-to-constrain-2-dynamic-arrays-to-related-to-each-other/34841/3):_

Dave, thanks for your reply.  
I have updated the code and comments after the variable declaration and constraints.

1. the number of names in c\_typ\_e and e\_typ\_e fixed at 2 and 4 respectively
2. arr\_sz mostly is 8_n, also could be 2_n (such as 2,4,6), if 2\*n, C requires to evenly distributed, E not required.

---

_[View the full topic](https://verificationacademy.com/forums/t/how-to-constrain-2-dynamic-arrays-to-related-to-each-other/34841)._
