SystemC Installation and Hello world program in Ubuntu
SystemC is a set of C++ libraries, which enables a designer to perform concurrent simulation of system level model.
Follow these steps to install systemc –
1. Download the SystemC source from accellera.
2. Untar the packing using following command – tar -xzvf systemc-2.3.1.tgz
3. Create a directory – mkdir systemc
4. Move systemc-2.3.1 to systemc – mv systemc-2.3.1 systemc
5. cd systemc/systemc-2.3.1
6. Check your current directory path by – pwd
7.type – ./configure –prefix=’pwd’/system_build/
In place of ‘pwd’ provide the path you get in step 6
it will take around 5 minute to install.
9. Installation is DONE.
Hello World program in SystemC –
In the text editor or vim enter the following code –
[wpdm_package id=’1480′]
In my case, I can see in step 7, the path I provided for prefix.
11. Use the following command to compile the program –
g++ -I $SYSTEMC_HOME/include -L $SYSTEMC_HOME/lib-linux64 -Wl,-rpath=$SYSTEMC_HOME/lib-linux64 -o hello hello.cpp -lsystemc -lm
12. Run program – ./hello
Enjoy programming with SystemC. 🙂