Posted By davyzhu on 4/26/2007 7:22 PM
//-- C++ compile makefile
g++ adder.cpp -fPIC -shared -o libdpi.so -I $CDS_INST_DIR/tools/inca/include
//-- switch add to ncsim
Run simulation and output:
ncsim: 05.83-s003: (c) Copyright 1995-2007 Cadence Design Systems, Inc.
snapshot worklib.top:module (SSS) is up to date (no update required).
Loading snapshot worklib.top:module .................... Done
ncsim: *W,NOLDPI: Unable to load ./src/test_sv/libdpi.so.
OSDLERROR: /cad/cadence/IUS583-s003-linux/tools.lnx86/lib/libgcc_s.so.1: version cannot open shared object file: No such file or directory or file is not valid ELFCLASS32 library..
ncsim: *F,NOFDPI: Function sum not found in any of the shared object specified with -SV_LIB switch.
ncsim: Memory Usage - 17.9M program + 10.4M data = 28.3M total
ncsim: CPU Usage - 0.0s system + 0.1s user = 0.2s total (1.0s, 15.8% cpu)
>> g++ adder.cpp -fPIC -shared -o libdpi.so -I $CDS_INST_DIR/tools/inca/include
Did you check to see that this step was successful? Do a find . -name "libdpi.so" to see if this file got created.
>> -sv_lib ./src/test_sv/libdpi.so
This seems to suggest that you are running the simulation in a dir different than the SO file got created. To make things simple, I would try running this in same dir or create a "link" to the SO file in current dir.
>> ncsim: *W,NOLDPI: Unable to load ./src/test_sv/libdpi.so.
cannot open shared object file: No such file or directory or
The "find" command should be tried first to see if this file exists.
>> file is
not valid ELFCLASS32 library..
Or this may also be an issue - are you running things on same machine? Say linux or Solaris?
Originally posted in cdnusers.org by ajeetha