# How to export the dpi function between c and sv

**URL:** <https://verificationacademy.com/forums/t/how-to-export-the-dpi-function-between-c-and-sv/35493>\
**Category:** SystemVerilog\
**Tags:** SystemVerilog, DPI\
**Created:** [December 21, 2018, 1:58am UTC](https://verificationacademy.com/forums/t/how-to-export-the-dpi-function-between-c-and-sv/35493 "2018-12-21T01:58:41Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![dave\_59](https://verificationacademy.com/forums/user_avatar/verificationacademy.com/dave_59/32/4499_2.png) [@dave\_59](https://verificationacademy.com/forums/u/dave_59)\
**Post date:** [December 29, 2018, 4:12pm UTC](https://verificationacademy.com/forums/t/how-to-export-the-dpi-function-between-c-and-sv/35493/6 "2018-12-29T16:12:57Z")

</div>

_In reply to [zz8318](https://verificationacademy.com/forums/t/how-to-export-the-dpi-function-between-c-and-sv/35493/5):_

> _In reply to [dave\_59](https://verificationacademy.com/forums/t/how-to-export-the-dpi-function-between-c-and-sv/35493/5):_  
> Hi Dave,  
> The run task in your code is invoked in the top module. Shall I know the reason ?

I’m giving you a [minimal complete example](https://stackoverflow.com/help/mcve) that you can try yourself. You need to do the same, otherwise no one can help you.

---

_[View the full topic](https://verificationacademy.com/forums/t/how-to-export-the-dpi-function-between-c-and-sv/35493)._
