• 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. Ncverilog: Is there a predefined `define containing IUS...

Stats

  • Locked Locked
  • Replies 3
  • Subscribers 64
  • Views 2182
  • 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

Ncverilog: Is there a predefined `define containing IUS version number/string?

cubicle82
cubicle82 over 14 years ago

In C/C++ compilers, there are predefined macros which contain a version number/string ( example: __STDC_VERSION__ )  This enables source-code to enforce minimum version-checks (in some cases.)

Is there something similar irun, so my Systemveirlog-source files can check for a minimum version of IUS?

  • Cancel
Parents
  • StephenH
    StephenH over 14 years ago

    Unfortunately Verilog doesn't support conditional expressions, so there's no clean way to do this. For example the following would be nice, but Verilog won't let you do it:

    `if IUS_VERSION > 9.2
      `if IUS_PATCH > 25
        ....

    The only alternative would be to create a naming convention for defines, like:
    `define IUS_VERSION_09_20
    `define IUS_VERSION_09_20_OR_LATER

    etc. The problem then is that you get an ever-growing list of defines, which is not great.

    Also, Verilog has no way to abort the compilation, e.g. you cannot do anything like:

    `ifndef IUS_VERSION_09_20_025_OR_LATER
      `error "Upgrade your IUS version to use this code"

    Sorry to disappoint you!

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • StephenH
    StephenH over 14 years ago

    Unfortunately Verilog doesn't support conditional expressions, so there's no clean way to do this. For example the following would be nice, but Verilog won't let you do it:

    `if IUS_VERSION > 9.2
      `if IUS_PATCH > 25
        ....

    The only alternative would be to create a naming convention for defines, like:
    `define IUS_VERSION_09_20
    `define IUS_VERSION_09_20_OR_LATER

    etc. The problem then is that you get an ever-growing list of defines, which is not great.

    Also, Verilog has no way to abort the compilation, e.g. you cannot do anything like:

    `ifndef IUS_VERSION_09_20_025_OR_LATER
      `error "Upgrade your IUS version to use this code"

    Sorry to disappoint you!

    • 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