• 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. Importing C Function into System Verilog using Incisive...

Stats

  • Locked Locked
  • Replies 1
  • Subscribers 65
  • Views 13939
  • 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

Importing C Function into System Verilog using Incisive DPI

random
random over 15 years ago

The SV Reference manual only gives the list of commands using the irun process but the 3 step process isn't clear.

The steps given in the manual are as follows:

1) ncvlog -sv design_files

ncvlog -sv top.v

 2) ncelab ...

3) ncsim

It is not clear how the C files are complied and how does the ncvlog know about the compiled C executable? 

I greatly appreciate any help regarding this.

 

Regards

Keerthi

  • Cancel
  • TAM1
    TAM1 over 15 years ago

    If you can, I'd really recommend using the "irun" flow. For this simple example, you need only enter the command line:

    irun testit.sv mydpi.c

     

    If you must use the 3-step process, you need to compile your DPI application into a shared library. The default one that ncsim looks for is called "libdpi.so". (If you want to give it a different name, you'll need to use the -sv_lib option to ncsim.)

    gcc -shared -I$ldvhome/tools/inca/include -o libdpi.so mydpi.c
    ncvlog -sv testit.sv
    ncelab testit
    ncsim testit

    • 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