• 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. system verilog compilation with verilog files

Stats

  • Locked Locked
  • Replies 3
  • Subscribers 65
  • Views 18800
  • 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

system verilog compilation with verilog files

anshman
anshman over 16 years ago

I am compiling my system verilog based test bench, the design uses some old modules which have reserve keywords that are not reserved for verilog e.g. program, do, type etc. now when I am compiling it is showing that keywords used, is there any other way to resolve this problem rahter than changing the variable names, can I tell the ncverilog simulator that these are verilog files and hence dont check for the sv keywords in those files. 

 Regards

Anshuman 

  • Cancel
  • Mickey
    Mickey over 16 years ago

    Hi Anshuman,

    The easiest way to attack this issue is to give your systemverilog files a separate extension (.sv, for example) than your regular verilog files (use .v for regular verilog) and then use irun in place of ncverilog when executing the simulation.  irun accomodates systemverilog and regular verilog compiling by calling the appropriate compiler based on the extension of the file.  So if you have a systemverilog file named myfile.sv and a regular verilog file named somefile.v, you would execute them with irun as follows.

    irun somefile.v adifferentfile.sv

    btw, irun as a default recognizes .sv as a systemverilog file type and .v as regular verilog.

    Hope that helps.

    Best regards,

    Mickey

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Mickey
    Mickey over 16 years ago

    woops...  messed up on the example command line.  based on the example filenames that were indicated in the post, the command line should have read

    irun myfile.sv somefile.v

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • tpylant
    tpylant over 16 years ago

    You can also use the `begin_keywords compiler directive:

    `begin_keywords "1364-2001"
    module test1 (...);
      output priority; // Valid
      ...
    endmodule
    `end_keywords

    This directive is documented in the SystemVerilog Reference in the documentation.

    Tim

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel

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