# PACKAGE doubt

**URL:** <https://verificationacademy.com/forums/t/package-doubt/29126>\
**Category:** SystemVerilog\
**Tags:** SystemVerilog, Package\
**Created:** [January 31, 2014, 7:35pm UTC](https://verificationacademy.com/forums/t/package-doubt/29126 "2014-01-31T19:35:04Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![logie](https://verificationacademy.com/forums/letter_avatar_proxy/v4/letter/l/74df32/32.png) [@logie](https://verificationacademy.com/forums/u/logie)\
**Post date:** [February 1, 2014, 7:41am UTC](https://verificationacademy.com/forums/t/package-doubt/29126/3 "2014-02-01T07:41:37Z")

</div>

You have included generator\_class.sv twice; once in the program file and once in the driver class. Both these are also defined in the same root scope. Hence you are seeing multiple definitions.

As Dave (dave\_59) suggest you need to use packages. You would need to define generator class inside a package and import the package in the scope where you need it. This will eliminate your symbol clashes.

```verilog
package MyPackage; 

   class generator_t; 
    ... 
    ...
   endclass 

endpackage 

```

Import using

```verilog
import MyPackage::*;

```

in any scope;

Refer to Section 26 of the 1800-2012 SystemVerilog reference manual for detailed instructions.

---

_[View the full topic](https://verificationacademy.com/forums/t/package-doubt/29126)._
