• 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. Getting error while running dpi-c functions with SV cod...

Stats

  • Locked Locked
  • Replies 9
  • Subscribers 65
  • Views 20853
  • 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

Getting error while running dpi-c functions with SV code

chauhan
chauhan over 8 years ago

Hi all,

I am first time using dpi-c functions in my sv code.When I am trying to call dpi-c functions within sv code using irun command(irun -sv test_c.c test.sv).I have tried ncverilog,ncelab,ncsim also but I m getting same like this error,

make: *** [INCA_libs/irun.lnx86.15.10.nc/ncsc_run/ncsc_obj/test_c_0.o] Error 1
In file included from /usr/include/features.h:385,
                 from /usr/include/stdio.h:28,
                 from $TESTDIR/test_c.c:1:

/usr/include/gnu/stubs.h:7:27: error: gnu/stubs-32.h: No such file or directory

ncsc_run: *E,TBBLDF: Failed to generate object ./INCA_libs/irun.lnx86.15.10.nc/ncsc_run/ncsc_obj/test_c_0.o

irun: *E,CCERR: Error during cc compilation (status 1), exiting.

Please can anyone  help me to know why this error is coming and what wrong I m doing. And can anyone tell me what are the commands and step by step process to run this two files. 

Below is my C and SV code :

//sv code

1>

module main;
import "DPI-C" function void hello();

initial
begin
print();
end

endmodule

2>

//c code

#include <stdio.h>

void hello() {
printf("hello from c");
}

thanks,

JAY

  • Cancel
Parents
  • chauhan
    chauhan over 8 years ago
    can u mention that two steps ? I have tried using file list & -f option also..
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • chauhan
    chauhan over 8 years ago
    can u mention that two steps ? I have tried using file list & -f option also..
    • 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