SystemC setup on F16 x86_64

SystemC is required by one of the courses I attend this semester. Though I’ve already setup SystemC on my Laptop and Desktop’s Linux, SystemC under windows is not so easy to use, and BTW, I’d like to practice the usage of make and some other Linux development tools, so I decide to setup SystemC(2.2.0) in the virtual machine, newly released F16 x86_64, again.

1. Download the latest SystemC package on the website

2. Unzip the package just downloaded

tar -xvf systemc-2.2.0.tgz

3. follow the file “INSTALL” to do configuration

mkdir objdir

cd objdir

../configure –prefix=/eda/systemc/2.2.0

4. in case of using gcc 4.6.x, there’s something need to be changed in the source code to avoid errors

* open src/sysc/datatypes/bit/sc_bit_proxies.h and search for “mutable” keyword, remove all the “mutable” keyword before a reference member.

* open src/sysc/utils/sc_utils_ids.cpp and following lines after the first include line.

    #include <cstdlib>

    using std::getenv;

    #include <cstring>

    using std::strcmp;

* now, run `gmake`

5. run `gmake install`

6. go to the examples folder, run `gmake check` to compile and run the examples, if everything is okay, output will be like this


7. Now ready to go with SystemC, headers files are in the include folder, library files are in lib-linux64 folder. Better to set an Environment Variable SYSTEMC point to the systemc root folder, so that $(SYSTEMC)/include and $(SYSTEMC)/lib-linux64 are valid systemc folders mentioned above.


SCV setup (Tricky one)

1. download&unzip the package

2. follow the INSTALL file to do configuration, as using x86_64 version, configure will fail as x86_64 is not recognized by the configure script.

* open the config.sub, and around line 883, add





      echo  …..

* and when using systemc, the configure script doesn’t understand the library files in a folder named lib-linux 64, so open configure script and change as

   line 3501


   line 5532


   line 5642

       #include <sstream>

   line 5654

       std::ostringstream outString;

   line 5872(3)


   some other changes due to test C++ code legacy problem. see attached patch file for detailed. for the sake of simplicity, if it’s certain the c++ compile is working properly, replace all the c++ test code in the configure script with  < int main(void) {return 0;} > 

../configure –with-systemc=/eda/systemc/2.2.0

3. change the config.h as in INSTALL

4. run `gmake`

   * to solve compile like “ambiguous operation<< overload in file scv_constraint_range.cpp”, just comment the line 46 in config.h as //#define _USE_UNIT64_WRITE as _GLIBCXX_USE_LONG_LONG in file ostream line 200 is defined as default when compiling which will make the definition of operator<<(unsigned long long __n) available

   * to solve relocation error like “relocation R_X86_64)32 against `a local symbol’ can’t be used when making a shared object” run `gmake –eval=”CXXFLAGS=$CXXFLAGS -fPIC”` instead of `gmake`. This is weird as change in Makefile can’t solve this problem. Need to check this later.

5. Finally `gmake install`


TLM setup

just unzip the package.


Add the RC script to set Environment Variables


something like this.


Okay, everything’s done.

Next step will be coding using SystemC.


patch link 1 : scv configuration files :

patch link 2 : systemc : 



if make opt version of the packages (scv), need to change the Makefile mannually to add -fPIC option in the target opt’s make rule.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s