• 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. Doubt in SV

Stats

  • Locked Locked
  • Replies 2
  • Subscribers 64
  • Views 15364
  • 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

Doubt in SV

archive
archive over 18 years ago

Hi Friends! I've doubt in SV regarding enum datatype. pls check the statements below. ncelab: *W,ENUMERR : This assignment is a violation of SystemVerilog strong typing rules for enumeration datatypes. My code for this goes here for the reference: typedef enum bit { PASSIVE=0, ACTIVE=1 } active_passive_e; parameter active_passive_e masters_active_passive = {ACTIVE}; defparam master.active_passive = masters_active_passive// My error is in this line //Code ends here Can anyone help me in resolving the issue? What is the error and how shud I solve my problem? Thanks in advance! Regards, Raghavendra


Originally posted in cdnusers.org by raghavendrap
  • Cancel
Parents
  • archive
    archive over 18 years ago

    Please note that it is a warning and not an error and therefore your code will still work.

    However, to get rid of the warning, you can either remove the {} surrounding the assignment:

    parameter active_passive_e masters_active_passive = ACTIVE;

    or remove the type definition:

    parameter masters_active_passive = {ACTIVE};

    Tim


    Originally posted in cdnusers.org by tpylant
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • archive
    archive over 18 years ago

    Please note that it is a warning and not an error and therefore your code will still work.

    However, to get rid of the warning, you can either remove the {} surrounding the assignment:

    parameter active_passive_e masters_active_passive = ACTIVE;

    or remove the type definition:

    parameter masters_active_passive = {ACTIVE};

    Tim


    Originally posted in cdnusers.org by tpylant
    • 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