• 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. compile SystemVerilog and Verilog separately?

Stats

  • Locked Locked
  • Replies 8
  • Subscribers 64
  • Views 18156
  • 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

compile SystemVerilog and Verilog separately?

archive
archive over 18 years ago

Hi all, Happy New Year! I always use ncvlog –sv –f file_list to compile the SystemVerilog file in file_list. But sometimes, my RTL code is Verilog2001 compatible and my TB code is SystemVerilog compatible. Question is: Can I compile SystemVerilog and Verilog separately? Best regards, Davy


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

    Hi Davy.

    You could use two ncvlog commands, one for the RTL files and one for the SV files.
    If for some reason you must compile everything in one command, then there is a useful trick that you can do.
    The SV LRM defines two pragmas to control the SV parser - one pragma turns off the SV keywords and the other turns them back on.
    If you put these pragmas into two files, you can import them in your file_list file surrounding the RTL (non-SV) files.


    // keywords_2001.v
    ‘begin_keywords "1364-2001"

    // end_keywords.v
    ‘end_keywords

    // file_list
    // starts in SV mode
    keywords_2001.v
      // now in v2001 (no SV keywords)
      my_rtl_dut.v
    end_keywords.v
      // now back to SV mode
      my_testbench.sv

    Compile with:
        ncvlog -sv -f file_list


    Steve.


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

    Hi Davy.

    You could use two ncvlog commands, one for the RTL files and one for the SV files.
    If for some reason you must compile everything in one command, then there is a useful trick that you can do.
    The SV LRM defines two pragmas to control the SV parser - one pragma turns off the SV keywords and the other turns them back on.
    If you put these pragmas into two files, you can import them in your file_list file surrounding the RTL (non-SV) files.


    // keywords_2001.v
    ‘begin_keywords "1364-2001"

    // end_keywords.v
    ‘end_keywords

    // file_list
    // starts in SV mode
    keywords_2001.v
      // now in v2001 (no SV keywords)
      my_rtl_dut.v
    end_keywords.v
      // now back to SV mode
      my_testbench.sv

    Compile with:
        ncvlog -sv -f file_list


    Steve.


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