Jump to content

Recommended Posts

Posted

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.

Posted

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

Posted

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,

Posted

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.

Posted

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

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...