# How to use packages in class

**URL:** <https://verificationacademy.com/forums/t/how-to-use-packages-in-class/42174>\
**Category:** SystemVerilog\
**Tags:** SystemVerilog, class, Package\
**Created:** [August 21, 2023, 9:51pm UTC](https://verificationacademy.com/forums/t/how-to-use-packages-in-class/42174 "2023-08-21T21:51:47Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![atashinchi](https://verificationacademy.com/forums/letter_avatar_proxy/v4/letter/a/eb8c5e/32.png) [@atashinchi](https://verificationacademy.com/forums/u/atashinchi)\
**Post date:** [August 22, 2023, 12:53am UTC](https://verificationacademy.com/forums/t/how-to-use-packages-in-class/42174/3 "2023-08-22T00:53:50Z")

</div>

Thanks Dave. In a somewhat related note: I have a .svh file with interfaces. I will

```verilog
`include

```

this file in some other .sv file (since I cannot put interfaces in packages). If an interface itself references an enum from another package, do I import the package inside the interface or outside?

```verilog
interface my_intf_i;
   import some_pkg::*; // is this allowed?
   some_enum_from_pkg_e my_enum;
   // other interface stuff
   // modport stuff
endinterface

```

---

_[View the full topic](https://verificationacademy.com/forums/t/how-to-use-packages-in-class/42174)._
