# How to pass array wires from the design which will be by reference and not static?

**URL:** <https://verificationacademy.com/forums/t/how-to-pass-array-wires-from-the-design-which-will-be-by-reference-and-not-static/42757>\
**Category:** SystemVerilog\
**Tags:** logic-array-packed-unsigned, SystemVerilog, pass-argument-by-ref, wire-assign, fork-join\_none-and-automatic-variables, forksystemverilog\
**Created:** [November 26, 2023, 4:55pm UTC](https://verificationacademy.com/forums/t/how-to-pass-array-wires-from-the-design-which-will-be-by-reference-and-not-static/42757 "2023-11-26T16:55:37Z")\
**Posts on this page:** 1\
**Showing post:** 2

<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:** [November 28, 2023, 2:32pm UTC](https://verificationacademy.com/forums/t/how-to-pass-array-wires-from-the-design-which-will-be-by-reference-and-not-static/42757/2 "2023-11-28T14:32:40Z")

</div>

_In reply to [gabi0307](https://verificationacademy.com/forums/t/how-to-pass-array-wires-from-the-design-which-will-be-by-reference-and-not-static/42757):_

There are a couple of ways to handle this.

The straightforward approach might be to create an array of variables and use a continuous assignment from the array of wires to the array of variables, the call the task with the variable.

```verilog
  wire [7:0] W[10];
  logic [7:0] V[10];
  assign V = W;
  ...
  myrask(V);

```

But a better methodology might be to use a module instead of task to model your checks (or place your task inside this module). You can use the bind construct to instantiate your module. This simplifies the need to create a separate array variable and continuous assignment for each check.

---

_[View the full topic](https://verificationacademy.com/forums/t/how-to-pass-array-wires-from-the-design-which-will-be-by-reference-and-not-static/42757)._
