# Using 'ref' with variables in interface

**URL:** <https://verificationacademy.com/forums/t/using-ref-with-variables-in-interface/27460>\
**Category:** SystemVerilog\
**Tags:** SystemVerilog\
**Created:** [July 25, 2011, 10:04pm UTC](https://verificationacademy.com/forums/t/using-ref-with-variables-in-interface/27460 "2011-07-25T22:04:45Z")\
**Posts on this page:** 1\
**Showing post:** 4

<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:** [July 26, 2011, 2:58am UTC](https://verificationacademy.com/forums/t/using-ref-with-variables-in-interface/27460/4 "2011-07-26T02:58:55Z")

</div>

_In reply to [Babu Raghunathan](https://verificationacademy.com/forums/t/using-ref-with-variables-in-interface/27460/3):_

When you say “Called from outside” where is that? A class method? or top-level module? How does task\_fileio send data to the scoreboard?

Instead of a task, could you make fileio another interface that is bound into your interface? The ports of that interface would be inputs and you could have an initial block execute the procedural code you had in the task.

Dave

---

_[View the full topic](https://verificationacademy.com/forums/t/using-ref-with-variables-in-interface/27460)._
