# 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:** 4

<div class="post-metadata">

**Author:** ![Vanshlata\_cdac](https://verificationacademy.com/forums/letter_avatar_proxy/v4/letter/v/ba8739/32.png) [@Vanshlata\_cdac](https://verificationacademy.com/forums/u/Vanshlata_cdac)\
**Post date:** [November 18, 2015, 11:03am UTC](https://verificationacademy.com/forums/t/package-doubt/29126/4 "2015-11-18T11:03:01Z")

</div>

_In reply to [logie](https://verificationacademy.com/forums/t/package-doubt/29126/3):_

I have a similar issue and when I follow your solution, I get another error :  
–Compiling package eth\_env\_pkg  
\*\* Error: \*\* while parsing file included at /home/user1/Vansh/1118asrt/eth\_top.sv(6)  
\*\* while parsing file included at eth\_env.sv(8)  
\*\* at eth\_pkt\_pkg.sv(1): near “package”: syntax error, unexpected package, expecting class

eth\_top.sv(6): `include "eth_env.sv" // Contains Top module and imports required files and packages eth_env.sv(8): `include “eth\_pkt\_pkg.sv” // Contains a package “eth\_env\_pkg” which contains the class “eth\_env\_c”  
eth\_pkt\_pkg.sv(1): `include “eth\_pkt.sv” // Contains just this line, eth\_pkt.sv contains definition of the class “eth\_pkt”  
Same error even if I try declaring the class inside the package in the same file too.

What am I doing wrong?  
Why does it expect a class when I want to define a package?  
Even if I define the class inside the package, then also it expects a class. Why is it so?

---

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