Home > Community > Forums > Hardware/Software Co-Development, Verification and Integration > acc_fetch_paramval_str() support in xsim/xtreme

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: *

 acc_fetch_paramval_str() support in xsim/xtreme 

Last post Wed, Sep 20 2006 5:10 PM by archive. 0 replies.
Started by archive 20 Sep 2006 05:10 PM. Topic has 0 replies and 1457 views
Page 1 of 1 (1 items)
Sort Posts:
  • Wed, Sep 20 2006 5:10 PM

    • archive
    • Top 75 Contributor
    • Joined on Fri, Jul 4 2008
    • Posts 88
    • Points 4,930
    acc_fetch_paramval_str() support in xsim/xtreme Reply

    Currently xsim does not support PLI function acc_fetch_paramval_str(). The work around is to write your own C code. Since we know it functions in a manner similar to acc_fetch_paramval() except that it returns a char*, we can use acc_fetch_paramval() and cast it to char *, something like this:

    #include "veriuser.h"
    #include "acc_user.h"
    char *acc_fetch_paramval_str(handle h)
    {
    return((char *) (unsigned long) acc_fetch_paramval(h));
    }

    Compile this code from a C file such as:

    gcc -c -I$AXIS_HOME/include mypli.c

    Once you have compiled this file, link the .o object using "-pl mypli.o" option in xsim.

    acc_fetch_paramval() cannot be used on 64-bit platforms to fetch a string value of a parameter, while acc_fetch_paramval_str() can be used on all platforms.


    Originally posted in cdnusers.org by ashvarma
    • Post Points: 0
Page 1 of 1 (1 items)
Sort Posts:
Started by archive at 20 Sep 2006 05:10 PM. Topic has 0 replies.