• 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. DPI Calls

Stats

  • Locked Locked
  • Replies 5
  • Subscribers 65
  • Views 9121
  • 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

DPI Calls

pradeep14JP
pradeep14JP over 2 years ago

Hi, I have a question regarding DPI calls. I read that always_ff is modelled as a thread. so If I have two always_ff calling the same DPI function on same clk, will it behave like multithread on C/CPP side? I ask this to know If have to do thread safe. 

  • Cancel
  • StephenH
    StephenH over 2 years ago

    SV always / always_ff / always_comb are modelled as parallel processes, but in reality event-driven simulation is single-threaded by nature and the simulator kernel takes care of the SV process "threading" for you, it does not use OS threads for this. Thus your DPI-C code will not have to worry about being thread-safe in a SV simulation.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • pradeep14JP
    pradeep14JP over 2 years ago in reply to StephenH

    what about emulation? no need to worry on emulation too?

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • StephenH
    StephenH over 2 years ago in reply to pradeep14JP

    Not normally because the emulator interfaces to the user via the same simulator kernel.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • pradeep14JP
    pradeep14JP over 2 years ago in reply to StephenH

    Thanks Stephen, any link or reference to read about the same?

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • StephenH
    StephenH over 2 years ago in reply to pradeep14JP

    Well, login to support.cadence.com and you'll find a ton of material about how DPI works in simulation and emulation...

    • Cancel
    • Vote Up +1 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