• Skip to main content
  • Skip to search
  • Skip to footer
Cadence Home
  • This search text may be transcribed, used, stored, or accessed by our third-party service providers per our Cookie Policy and Privacy Policy.

  1. Community Forums
  2. Functional Verification
  3. Class definition outside module and package

Stats

  • Locked Locked
  • Replies 3
  • Subscribers 65
  • Views 17245
  • Members are here 0
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Class definition outside module and package

Rama Kishore
Rama Kishore over 10 years ago

Hi,

I'm new to SV verfication and hence appreciate your help on this.

Usually I've seen SV class definitions inside a module / package . I remember having read before that class definitions cannot exist outside these, and as such cannot be compiled standalone.

But strangely, I've seen IUS14.1 successfully compiling a  .sv file which contains only class definition. Do not see module/package constructs inside the file.

Am I missing something in my understanding? Thanks for your suggestions and help in advance.

Regards

Kishore

  • Cancel
Parents
  • Rama Kishore
    Rama Kishore over 10 years ago

    Thanks Stephen, for the very good explanation. That really helped my understanding.

     

    So, can I assume CU scope as analogous to Global scope in C/C++ ? Also, can you please elaborate a bit on "type is visible in all files that are compiled at the same time". What do you mean by the phrase "same time" in this context  - same .sv file that includes other .sv/.svh files  or  one compilation-tool invocation?

     

    Regards

    Kishore

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • Rama Kishore
    Rama Kishore over 10 years ago

    Thanks Stephen, for the very good explanation. That really helped my understanding.

     

    So, can I assume CU scope as analogous to Global scope in C/C++ ? Also, can you please elaborate a bit on "type is visible in all files that are compiled at the same time". What do you mean by the phrase "same time" in this context  - same .sv file that includes other .sv/.svh files  or  one compilation-tool invocation?

     

    Regards

    Kishore

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Children
No Data

Community Guidelines

The Cadence Design Communities support Cadence users and technologists interacting to exchange ideas, news, technical information, and best practices to solve problems and get the most from Cadence technology. The community is open to everyone, and to provide the most value, we require participants to follow our Community Guidelines that facilitate a quality exchange of ideas and information. By accessing, contributing, using or downloading any materials from the site, you agree to be bound by the full Community Guidelines.

© 2025 Cadence Design Systems, Inc. All Rights Reserved.

  • Terms of Use
  • Privacy
  • Cookie Policy
  • US Trademarks
  • Do Not Sell or Share My Personal Information