# GO is an imported symbol from package op\_enum\_pkg and is not directly accessible through the package scope cal\_defines\_pkg:: in which it is imported in another .sv file

**URL:** <https://verificationacademy.com/forums/t/go-is-an-imported-symbol-from-package-op-enum-pkg-and-is-not-directly-accessible-through-the-package-scope-cal-defines-pkg-in-which-it-is-imported-in-another-sv-file/42602>\
**Category:** UVM\
**Tags:** UVM\
**Created:** [October 25, 2023, 10:11am UTC](https://verificationacademy.com/forums/t/go-is-an-imported-symbol-from-package-op-enum-pkg-and-is-not-directly-accessible-through-the-package-scope-cal-defines-pkg-in-which-it-is-imported-in-another-sv-file/42602 "2023-10-25T10:11:29Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ram130625](https://verificationacademy.com/forums/letter_avatar_proxy/v4/letter/r/53a042/32.png) [@Ram130625](https://verificationacademy.com/forums/u/Ram130625)\
**Post date:** [October 25, 2023, 10:11am UTC](https://verificationacademy.com/forums/t/go-is-an-imported-symbol-from-package-op-enum-pkg-and-is-not-directly-accessible-through-the-package-scope-cal-defines-pkg-in-which-it-is-imported-in-another-sv-file/42602/1 "2023-10-25T10:11:29Z")

</div>

GO is an imported symbol from package op\_enum\_pkg and is not directly accessible through the package scope cal\_defines\_pkg:: in which it is imported in another .sv file.

scenario:

here i have “GO” is a define in op\_enum\_pkg. op\_enum\_pkg is imported in cal\_defines\_pkg. if i want to get “GO” in another .sv file how can i get it?

I wrote like this: but showing warning for the below:

cal\_defines\_pkg::GO : cache\_mem = Invalid ;

How to get define of one package which is imported in another package. through the 2nd package?

---

<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:** [October 25, 2023, 4:06pm UTC](https://verificationacademy.com/forums/t/go-is-an-imported-symbol-from-package-op-enum-pkg-and-is-not-directly-accessible-through-the-package-scope-cal-defines-pkg-in-which-it-is-imported-in-another-sv-file/42602/2 "2023-10-25T16:06:51Z")

</div>

_In reply to [Ram130625@](https://verificationacademy.com/forums/t/go-is-an-imported-symbol-from-package-op-enum-pkg-and-is-not-directly-accessible-through-the-package-scope-cal-defines-pkg-in-which-it-is-imported-in-another-sv-file/42602):_  
Importing just makes identifiers visible to the scope where the import occurs. It does not move/copy the definition of the identifier. Doing that requires exporting the identifier.

```verilog
package op_enum_pkg;
  parameter GO = 1;
endpackage
package cal_defines_pkg;
  import op_enum_pkg::*; // import op_enum_pkg::GO;
  export op_enum_pkg::GO; // export op_enum_pkg::*
endpackage
module top;
  initial $display("GO: ",cal_defines_pkg::GO);
endmodule

```

Note that the identifiers you want exported must appear explicitly in the package; you cannot rely on wildcards ‘\*’.

See section 26.6 Exporting imported names from packages of the [IEEE 1800-2017 SystemVerilog LRM](https://ieeexplore.ieee.org/document/8299595)
