Email

* Required Fields

Recipients email * (separate multiple addresses with commas)

Your name *

Your email *

Message *

Contact Us

* Required Fields
First Name *

Last Name *

Email *

Company / Institution *

Comments: *

 Exporting task using DPI 

Last post Wed, Apr 8 2009 6:50 AM by Mickey. 1 replies.
Started by alphaneo 07 Apr 2009 05:55 PM. Topic has 1 replies and 2923 views
Page 1 of 1 (2 items)
Sort Posts:
  • Tue, Apr 7 2009 5:55 PM

    • alphaneo
    • Not Ranked
    • Joined on Tue, Apr 7 2009
    • ??, Japan
    • Posts 4
    • Points 35
    Exporting task using DPI Reply
    (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.
    Filed under: ,
    • Post Points: 20
  • Wed, Apr 8 2009 6:50 AM

    • Mickey
    • Top 100 Contributor
    • Joined on Mon, Oct 13 2008
    • Austin, TX
    • Posts 77
    • Points 1,315
    Re: Exporting task using DPI Reply

    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

    • Post Points: 5
Page 1 of 1 (2 items)
Sort Posts:
Started by alphaneo at 07 Apr 2009 05:55 PM. Topic has 1 replies.