• 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. Hardware/Software Co-Development, Verification…
  3. Exporting task using DPI

Stats

  • Locked Locked
  • Replies 1
  • Subscribers 48
  • Views 13481
  • 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

Exporting task using DPI

alphaneo
alphaneo over 16 years ago
(First of all accept my apologies, if what I am trying is completely idiotic), I am a 100% newcomer to verification. I am trying to export a task using DPI like the following //////////////////////////////////////////////////////// //// From my verilog code //////////////////////////////////////////////////////// export "DPI" task reg_read; task reg_read; input int nAddr; output int nVal; //::: Actual reading ::: endtask Now in my C code, I just extern reg_read, something like //////////////////////////////////////////////////////// //// From my C code //////////////////////////////////////////////////////// extern void reg_read (int nAddr, int *nVal); void test_read (void) { int nRegVal; reg_read (0x200, &nRegVal); } And then invoked the function from the C source code. Again the in the RTL code, I also use something like import "DPI" contect function void test_read (); ---- This is not working ---- I am sure, I am missing something here. But I am not sure what. It will be nice if somebody can help me out.
  • Cancel
  • Mickey
    Mickey over 16 years ago

    Hi Alphaneo,

    Take a look at the example at the following location:  http://www.cadence.com/newsletters/incisiveplatform/incisive_sysverilog.pdf?cmp=nlc-hl3214535886

    I think that will help.

    Best regards,
    Mickey

    • 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