# How to pass instance number in interface

**URL:** <https://verificationacademy.com/forums/t/how-to-pass-instance-number-in-interface/41913>\
**Category:** SystemVerilog\
**Tags:** System-verilog-interface, SystemVerilog, SystemVerilog-generate-assign\
**Created:** [July 10, 2023, 12:39pm UTC](https://verificationacademy.com/forums/t/how-to-pass-instance-number-in-interface/41913 "2023-07-10T12:39:51Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![cgales](https://verificationacademy.com/forums/letter_avatar_proxy/v4/letter/c/ccd318/32.png) [@cgales](https://verificationacademy.com/forums/u/cgales)\
**Post date:** [July 10, 2023, 1:20pm UTC](https://verificationacademy.com/forums/t/how-to-pass-instance-number-in-interface/41913/2 "2023-07-10T13:20:20Z")

</div>

_In reply to [Prashant Soni](https://verificationacademy.com/forums/t/how-to-pass-instance-number-in-interface/41913):_

Your code as written doesn’t compile in any of the four simulators on EDA Playground. Specifically, the arrays of verif\_if and chk\_intf in top\_if are incorrect as they should be arrays of instances, which is not what is written.

I recommend using a parameter to verif\_if to specify the instance\_num instead of an int, as a parameter is a constant while a variable is not.

---

_[View the full topic](https://verificationacademy.com/forums/t/how-to-pass-instance-number-in-interface/41913)._
