• 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. C DPI compilation error

Stats

  • Locked Locked
  • Replies 3
  • Subscribers 65
  • Views 15286
  • 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

C DPI compilation error

abhingp01
abhingp01 over 15 years ago

Hi all,

 I am checking my OVC against existing eVC. My OVC has some DPI interfaces with C-code.

 C-Code is as follows:

#include<math.h>
#include"svdpi.h"

int ilog2_inC(int val)
{
   return (log2(val));
}


int ipow_inC(int val)
{
   return(pow(2,val));
}

I am using it in my monitor class of OVC.

Following statements imports it:

import "DPI-C" pure function int ilog2_inC(int logchk);
import "DPI-C" pure function int ipow_inC(int logchk);

 But on compiling I am getting following error:

ncsim: *F,NOLWSV: Unable to load the default library libdpi.
OSDLERROR: ./libdpi.so: cannot open shared object file: No such file or directory or file is not valid ELFCLASS32 library..

 

Kindly help for same.

 

Regards

Abhishek

  • Cancel
Parents
  • abhingp01
    abhingp01 over 15 years ago

    Hi steve,

    Here is the irun command.

    irun +access+rwc  +tcl+sim.tcl -ovm  -snvlog  -snpath /home/abhishek/project_mmbd/specman/phil_lib/phil_dtl/e  -snload /home/abhishek/project_mmbd/specman/phil_lib/dtl_mmbd_config.e  -incdir /home/abhishek/project_mmbd/dtl_param_saved/examples -incdir /home/abhishek/project_mmbd/dtl_param_saved/sv  /home/abhishek/project_mmbd/dtl_param_saved/sv/cprog.c  /home/abhishek/project_mmbd/dtl_param_saved/examples/dtl_mmbd_tb_top.sv +OVM_TESTNAME=test_read_modify_write -snprerun "set message FULL;test" +TEST_RUN_TIME=2000000

    Regards

    Abhishek

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • abhingp01
    abhingp01 over 15 years ago

    Hi steve,

    Here is the irun command.

    irun +access+rwc  +tcl+sim.tcl -ovm  -snvlog  -snpath /home/abhishek/project_mmbd/specman/phil_lib/phil_dtl/e  -snload /home/abhishek/project_mmbd/specman/phil_lib/dtl_mmbd_config.e  -incdir /home/abhishek/project_mmbd/dtl_param_saved/examples -incdir /home/abhishek/project_mmbd/dtl_param_saved/sv  /home/abhishek/project_mmbd/dtl_param_saved/sv/cprog.c  /home/abhishek/project_mmbd/dtl_param_saved/examples/dtl_mmbd_tb_top.sv +OVM_TESTNAME=test_read_modify_write -snprerun "set message FULL;test" +TEST_RUN_TIME=2000000

    Regards

    Abhishek

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Children
No Data

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