# How do I include a modport when I pass a part selected array of interfaces to a child module?

**URL:** <https://verificationacademy.com/forums/t/how-do-i-include-a-modport-when-i-pass-a-part-selected-array-of-interfaces-to-a-child-module/32444>\
**Category:** SystemVerilog\
**Tags:** SystemVerilog, modport, array-of-interfaces, part-select\
**Created:** [October 20, 2016, 11:22pm UTC](https://verificationacademy.com/forums/t/how-do-i-include-a-modport-when-i-pass-a-part-selected-array-of-interfaces-to-a-child-module/32444 "2016-10-20T23:22:26Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mandrews28316](https://verificationacademy.com/forums/letter_avatar_proxy/v4/letter/m/df705f/32.png) [@mandrews28316](https://verificationacademy.com/forums/u/mandrews28316)\
**Post date:** [October 20, 2016, 11:22pm UTC](https://verificationacademy.com/forums/t/how-do-i-include-a-modport-when-i-pass-a-part-selected-array-of-interfaces-to-a-child-module/32444/1 "2016-10-20T23:22:26Z")

</div>

I have an array of 16 interfaces…

```
myIf intf[16](CLK);

```

This array is split into 4 equal parts and passed to 4 child modules with each module taking a part selected sub section of the array. The child module port is defined as…

```
myIf.dst intf[4],

```

When I pass the part selected array to the module where it is instantiated without the modport, all the tools I have access to successfully parse the rtl.

```
  .intf(intf[s*4:s*4+3]), // s is a genvar (range 0 <= s <= 3)

```

If I try and add a modport to this line I run into problems. I’ve tried…

```
.intf(intf.dst[s*4:s*4+3]), // modport on part selected interface before []

```

and

```
.intf(intf[s*4:s*4+3].dst), // modport on part selected interface after []

```

It is not clear to me from 1800-2012 which version is correct. Some tools accept both versions, some accept only the first version (i.e. modport before the ), and other tools only accept the version without the modport.

What is the correct way to add the modport?

Mark

---

<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:** [October 20, 2016, 11:45pm UTC](https://verificationacademy.com/forums/t/how-do-i-include-a-modport-when-i-pass-a-part-selected-array-of-interfaces-to-a-child-module/32444/2 "2016-10-20T23:45:15Z")

</div>

_In reply to [mandrews28316](https://verificationacademy.com/forums/t/how-do-i-include-a-modport-when-i-pass-a-part-selected-array-of-interfaces-to-a-child-module/32444):_

This is a know issue with the LRM. [0002975: Connecting arrays of interface instances using a modport -- slice syntax - Accellera Mantis](https://accellera.mantishub.io/view.php?id=2975)

It’s best not to use the modport in this situation.
