# Hierarchy of files in Systemverilog Package

**URL:** <https://verificationacademy.com/forums/t/hierarchy-of-files-in-systemverilog-package/31521>\
**Category:** UVM\
**Tags:** UVM, unexpected-IDENTIFIER\
**Created:** [February 18, 2016, 12:39pm UTC](https://verificationacademy.com/forums/t/hierarchy-of-files-in-systemverilog-package/31521 "2016-02-18T12:39:04Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![sunils](https://verificationacademy.com/forums/letter_avatar_proxy/v4/letter/s/df705f/32.png) [@sunils](https://verificationacademy.com/forums/u/sunils)\
**Post date:** [February 18, 2016, 12:39pm UTC](https://verificationacademy.com/forums/t/hierarchy-of-files-in-systemverilog-package/31521/1 "2016-02-18T12:39:04Z")

</div>

Hello all,

I need help in knowing the correct hierarchy of files in system verilog package. My scenario is:

1. one.svh file contains ten “.sv” files.

2. two.svh file contains twelve “.sv” files.

3. Two interface is there.

4. One top.sv file.

5. pack.sv package is there.

```verilog
 `include "uvm_macros.svh"
   package pack;
    import uvm_pkg::*;

     `include "one.svh"
     `include "two.svh" 
   endpackage  

```

It is giving error:

```
1. near "interafce[1]": syntax error, unexpected IDENTIFIER, expecting class.
2. near "module[1]": syntax error, unexpected module, expecting class.

```

Please help and suggest in this regard.

Regards  
Sunil

---

<div class="post-metadata">

**Author:** ![chr\_sue](https://verificationacademy.com/forums/user_avatar/verificationacademy.com/chr_sue/32/1199_2.png) [@chr\_sue](https://verificationacademy.com/forums/u/chr_sue)\
**Post date:** [February 18, 2016, 2:26pm UTC](https://verificationacademy.com/forums/t/hierarchy-of-files-in-systemverilog-package/31521/2 "2016-02-18T14:26:46Z")

</div>

_In reply to [sunils](https://verificationacademy.com/forums/t/hierarchy-of-files-in-systemverilog-package/31521):_

Static constructs like modules or interfaces provide a local namespace to their declarations. Identifiers declared in these constructs are local to them and do not conflict with other declarations. Packages are providing also a namespace. For this reason it is not allowed to have modules, interfaces, programs and checkers in packages.  
See chapter 3.9 Packages in the SV standard (2012).
