ciccio.greco88 Posted November 12, 2012 Report Posted November 12, 2012 Hi guys, i've a problem with the simulation of my SystemC code using Cadence's NC-SC Simulator. The error is the following: make: *** [iNCA_libs/ncsc_obj/main.o] Error 1 "/usr/include/gentoo-multilib/amd64/bits/waitstatus.h", line 67: error: invalid redeclaration of type name "wait" (declared at line 67 of "/usr/include/gentoo-multilib/x86/bits/waitstatus.h") union wait ^ "/usr/include/gentoo-multilib/amd64/bits/sched.h", line 24: catastrophic error: #error directive: "Never include <bits/sched.h> directly; use <sched.h> instead." # error "Never include <bits/sched.h> directly; use <sched.h> instead." ^ ncsc: Error executing: $CDSROOT/tools/systemc/gcc/4.1-x86_64/bin/g++ -DNCSC -DCADENCE -DLNX86 -I$CDSROOT/tools/systemc/include_pch/64bit -o INCA_libs/ncsc_obj/main.o -I$CDSROOT/tools/systemc/include/tlm2 -DNCSC -I$CDSROOT/tools/systemc/include_pch -I$CDSROOT/tools/tbsc/include -I$CDSROOT/tools/vic/include -I$CDSROOT/tools/ovm/sc/src -I$CDSROOT/tools/systemc/include/tlm -fPIC -c -x c++ -Wall -O0 -g $TESTDIR/main.cpp ncsc_run: *E,TBBLDF: Failed to generate object INCA_libs/ncsc_obj/main.o I don't know what is referred to it!Help me, please! :-) Thanks. Quote
apfitch Posted November 13, 2012 Report Posted November 13, 2012 Weird. Try replacing any calls to wait() in your SystemC code with sc_core::wait(). If that doesn't help, it looks like you're using an unsupported operating system (gentoo), so try using a supported OS. regards Alan ciccio.greco88 and sumit_tuwien 2 Quote
Philipp A Hartmann Posted November 13, 2012 Report Posted November 13, 2012 You're including internal system headers twice, and those are (deliberately) not protected against that. Moreover, the inclusions differ in the platform selection (amd64 vs x86). So, your installation and/or platform configuration is almost certainly messed up. On a closer look at the command-line you posted, I noticed that you include pre-compiled headers for 64-bit and 32-bit: ... -DLNX86 -I$CDSROOT/tools/systemc/include_pch/64bit -o INCA_libs/ncsc_obj/main.o -I$CDSROOT/tools/systemc/include/tlm2 -DNCSC -I$CDSROOT/tools/systemc/include_pch ... This may be related to your problems. You should try to compile your model without using the pre-compiled headers (...systemc/include) first. You also need to check, if the define LNX86 is correct/sufficient for building on a 64-bit system. After all, if you want to avoid such problems, you may need to use a vendor-supported OS as Alan pointed out. Greetings from Oldenburg, Philipp sumit_tuwien and ciccio.greco88 2 Quote
ciccio.greco88 Posted November 13, 2012 Author Report Posted November 13, 2012 Alan i've tried your suggestion, but the result is the same. So i think that the problem may be that described by Philipp but i don't understand very well what is it because i'm not a very expert user, sorry! :-) Thanks at everyone! Quote
sumit_tuwien Posted November 13, 2012 Report Posted November 13, 2012 Dear ciccio.greco88, What Philipp said is that, the nc-toolset has been installed over unsupported operating system. Also Philipp said that you are trying to link libraries/objects which are compiled for different bit options (some for 32-bit binary and some for 64-bit binary). Things are messed up, for the time being for a short survey, you might want to try ncsc_run once with -64bit and the -32bit option and check what happened. What Alan said - you might need to call big daddy (your system admin or cadence). Of course you will not get help from Cadence because they will stick to their OS option logic. So, you might have to change to RHEL to run nc-toolset. Regards, ciccio.greco88 1 Quote
ciccio.greco88 Posted November 13, 2012 Author Report Posted November 13, 2012 Okkkkk!!! Thank you so much Sumit, you have been very useful to clarify my ideas! Ciao! :-) Quote
Ahmed Posted November 14, 2012 Report Posted November 14, 2012 Did you try nchelp. In your case try the command: nchelp ncsc (Error code) if you have an error code for this. Quote
ciccio.greco88 Posted November 19, 2012 Author Report Posted November 19, 2012 Hi guys, i've another question about a compilation error of my code that i don't able to solve in any way! i think it is a stupid problem related to class inclusion, but i don't understand why it is present! First of all suppose i have a class in a file called axi_master_top.h: #include "systemc.h" #include "axi_master_transactor.h" #include "axi_traffic_generator.h" #include <stdint.h> using namespace axi; class axi_master_top : public sc_module { public: axi_master_transactor<> amt("amt"); axi_traffic_generator<> atg("atg", 2, 4, 0x0000000000000100, 1, 0, 8 ); ............. }; axi_master_transactor and axi_traffic_generator are two classes defined inside a namespace called axi and each of them have some template parameter but in the declaration of an object of their type i use the default parameter ( <> ). Then the error that i obtain at compilation time is: ./axi_master_top.h:25: error: expected identifier before string constant ./axi_master_top.h:25: error: expected ',' or '...' before string constant ./axi_master_top.h:26: error: expected identifier before string constant ./axi_master_top.h:26: error: expected ',' or '...' before string constant line 25 and 26 are those in which i declare the axi_master_transactor and the axi_traffic_generator. Help me, please! Francesco. Quote
Philipp A Hartmann Posted November 19, 2012 Report Posted November 19, 2012 axi_master_transactor<> amt("amt"); axi_traffic_generator<> atg("atg", 2, 4, 0x0000000000000100, 1, 0, 8 ); You can't call constructors in the class definition directly. You need to initialise members in the constructor: axi_master_transactor<> amt; axi_traffic_generator<> atg; SC_CTOR(axi_master_top) : amt("amt") , atg("atg", 2, 4, 0x0000000000000100, 1, 0, 8 ) { /* ... */ } Greetiings from Oldenburg, Philipp ciccio.greco88 1 Quote
ciccio.greco88 Posted November 19, 2012 Author Report Posted November 19, 2012 thank you so much! !! ! good observation!!!! Greetings. Francesco. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.