Home > Log > System C on Ubuntu – Installation

System C on Ubuntu – Installation

Installation of systemc-2.3.0.tgz is straight-forward.. Just follow the instructions in INSTALL file. This log is for systemc-2.2.0.tgz

I am looking towards learning systemC. So the first step is setting up one on my PC. It was not so straight-forward for somebody like me who has done only a few hours of research about systemC. So I thought of logging my experience setting up systemC in Ubuntu 11.04. (The best way to backup information is to make it public)

1.What is it

Initially I was thinking it is a new language all-together, with a different set of tool-chain. With a little bit of research, I came to the conclusion – “to the user, systemC is c++ library and header file collection, that can be linked to other c++ files using any c++ compiler & linker”.

2. Where to get it

According to the wikipedia page on systemC, it’s just an IEEE standard, which anybody can implement. So there will be multiple versions of the systemC. Luckily, Accellera has a proof of concept implementation, which is available for free from here. You need to register, providing your email id. After registration and logging in, the systemc-2.2.0.tgz (I am not very clear about the TLM stuff. Will first experiment with this and then the latest 2.3.0, with TLM)can be downloaded. If you directly go for systemc-2.3.0.tgz, some of the steps here may be irrelevant.

3. How to setup

Unzipped the file, and read the README and INSTALL. Followed the instructions in INTALL file. But got a compiler  error in sc_utils_ids.cpp, regarding some namespace issue while running make. As an embedded engineer, I am really bad at any language other than plain C. So did the searching, the following two links came up

Link1

Link2

Downloaded the 0001-missing-system-headers-function-qualification.patch file from the second link. Patched the original sc_utils_ids.cpp file with the patch using command

patch -i ~/Downloads/0001-missing-system-headers-function-qualification.patch ../src/sysc/utils/sc_utils_ids.cpp

Then did a make and make install again. This gave me the libraries and include files in /usr/local/systemc-2.2.0 (As I have used the ../configure –prefix=/usr/local/systemc-2.2.0 to do the configuration).

Advertisements
Categories: Log Tags: ,
  1. kode
    August 16, 2012 at 10:44 pm

    i got this error after the “make install” step. can you figure out what went wrong with the installation..

    /usr/bin/install: `./in_imag’ and `./in_imag’ are the same file
    /usr/bin/install: `./in_imag.1′ and `./in_imag.1′ are the same file
    /usr/bin/install: `./in_imag.2′ and `./in_imag.2′ are the same file
    /usr/bin/install: `./in_imag.3′ and `./in_imag.3′ are the same file
    /usr/bin/install: `./in_imag.4′ and `./in_imag.4′ are the same file
    /usr/bin/install: `./in_real’ and `./in_real’ are the same file
    /usr/bin/install: `./in_real.1′ and `./in_real.1′ are the same file
    /usr/bin/install: `./in_real.2′ and `./in_real.2′ are the same file
    /usr/bin/install: `./in_real.3′ and `./in_real.3′ are the same file
    /usr/bin/install: `./in_real.4′ and `./in_real.4′ are the same file
    /usr/bin/install: `./out_imag.1.golden’ and `./out_imag.1.golden’ are the same file
    /usr/bin/install: `./out_imag.2.golden’ and `./out_imag.2.golden’ are the same file
    /usr/bin/install: `./out_imag.3.golden’ and `./out_imag.3.golden’ are the same file
    /usr/bin/install: `./out_imag.4.golden’ and `./out_imag.4.golden’ are the same file
    /usr/bin/install: `./out_real.1.golden’ and `./out_real.1.golden’ are the same file
    /usr/bin/install: `./out_real.2.golden’ and `./out_real.2.golden’ are the same file
    /usr/bin/install: `./out_real.3.golden’ and `./out_real.3.golden’ are the same file
    /usr/bin/install: `./out_real.4.golden’ and `./out_real.4.golden’ are the same file
    /usr/bin/install: `./fft.cpp’ and `./fft.cpp’ are the same file
    /usr/bin/install: `./main.cpp’ and `./main.cpp’ are the same file
    /usr/bin/install: `./sink.cpp’ and `./sink.cpp’ are the same file
    /usr/bin/install: `./source.cpp’ and `./source.cpp’ are the same file
    /usr/bin/install: `./fft.h’ and `./fft.h’ are the same file
    /usr/bin/install: `./sink.h’ and `./sink.h’ are the same file
    /usr/bin/install: `./source.h’ and `./source.h’ are the same file
    make[5]: *** [install-data-local] Error 1
    make[5]: Leaving directory `/home/gari/Downloads/systemc-2.3.0/examples/sysc/fft/fft_flpt’
    make[4]: *** [install-am] Error 2
    make[4]: Leaving directory `/home/gari/Downloads/systemc-2.3.0/examples/sysc/fft/fft_flpt’
    make[3]: *** [install-recursive] Error 1
    make[3]: Leaving directory `/home/gari/Downloads/systemc-2.3.0/examples/sysc/fft’
    make[2]: *** [install-recursive] Error 1
    make[2]: Leaving directory `/home/gari/Downloads/systemc-2.3.0/examples/sysc’
    make[1]: *** [install-recursive] Error 1
    make[1]: Leaving directory `/home/gari/Downloads/systemc-2.3.0/examples’
    make: *** [install-recursive] Error 1

    • August 20, 2012 at 1:21 pm

      i have never encountered this error.. make sure /usr/bin/install directory exists; and you have write permissions on it.

  1. No trackbacks yet.

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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

%d bloggers like this: