Installing SystemC can be a difficult task if you are not familiar with installing softwares from source. But if you are familiar with installing softwares from source, this tutorial can be extremely easy for you.
First of all you need to download the systemc source code packaged in a tar ball from the internet or copy it from some of your friend or download it here.
Also make sure that you have installed 'build-essential' using your package manager as :
sudo apt-get install build-essential
in case of ubuntu. This downloads all essential packages needed by systemc.
The package can be extracted using following command :
tar xf systemc-2.3.0.tgz
where the x.x.x is the version of your package.
But before this you need to create another directory in /usr/local with the name of systemc. To do so enter command as :
sudo mkdir /usr/local/systemc-2.3.0
Note that you typed this command with sudo prefixed to it because you need sudo access to create a directory in /usr/local
Now go back to the directory where you extracted the tar-ball. You will see that there is another directory created in the that directory with the name of 'systemc-x.x.x' Just go to this directory as :
and then create another directory in this as :
Go into this directory again as :
Now you will run the configure script provided in the systemc-x.x.x directory.
Now make sure that you are currently in objdir directory. If not, cd to that directory and after that run following command :
This script will check your system for various packages. If you have already downloaded this 'build-essential' package as mentioned previously, you should not have any problem upto this point.
Now we will compile the systemc library. To do so just type :
and then hit enter. This might take some time depending on your system. After this finishes, you have to install the systemc as :
sudo make install
This will install the systemc.
After this you can do additional checks as :
If everything goes fine you will see that all the tests will pass and systemc will be installed on your PC.
Now you can use the systemc library by including a header file as :
and write your systemc programs easily and compile it like this.
You can find tutorials, books and other resources here.