• 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. SystemVerilog DPI in NCSim?

Stats

  • Locked Locked
  • Replies 13
  • Subscribers 64
  • Views 25018
  • 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

SystemVerilog DPI in NCSim?

archive
archive over 18 years ago

Hi all, Because it will take some time waiting download IUS583, I tried to use SystemVerilog DPI (mostly imported functions). I heard that Synopsys can simply include C file in file list with SystemVerilog file and run simulation. But Cadence NC seems need C code compile and link to a lib. I have read the NCsim document and find a switch "-sv_lib". But I cannot find a simple example. Is there any step by step tutorial about how to compile, link and run SystemVerilog DPI C file in NCsim? Best regards, Davy


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

    Hi,

    You may want to try and use "ncsc_run" utility. This is primarily used for compiling systemc c code and creating a simulator. This utility when used with -dynamic and "-stop link" would create a shared library for you. It takes a list of all your C/C++ files as input, automatically generate the Makefile, compiles all the files as neccesary and than links them.

    This is what we use in our environment and it really simplifies the process as we no longer have to maintain the Makefiles. In our environment we have systemc and DPI both compiled in a same shared library and we use "ncsc_run" to compile it. It works great.

    In order to link systemc and dpi together, compile them using ncsc_run (it takes care of linking systemc and other housekeeping stuff) as I describe above. Then specify the same shared file at -load_sc command line option at ncelab time and -sv_lib option at ncsim time and it should work.

    Nitin

    Nitin


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

    Hi,

    You may want to try and use "ncsc_run" utility. This is primarily used for compiling systemc c code and creating a simulator. This utility when used with -dynamic and "-stop link" would create a shared library for you. It takes a list of all your C/C++ files as input, automatically generate the Makefile, compiles all the files as neccesary and than links them.

    This is what we use in our environment and it really simplifies the process as we no longer have to maintain the Makefiles. In our environment we have systemc and DPI both compiled in a same shared library and we use "ncsc_run" to compile it. It works great.

    In order to link systemc and dpi together, compile them using ncsc_run (it takes care of linking systemc and other housekeeping stuff) as I describe above. Then specify the same shared file at -load_sc command line option at ncelab time and -sv_lib option at ncsim time and it should work.

    Nitin

    Nitin


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