Skip to content

capopaul/SystemC-Environment

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

Test-SystemC

Based on this tutorial : https://medium.com/@techAsthetic/getting-started-with-systemc-setup-code-and-run-baad1943ec4b

Install on LNIS server

Part 1. Setting Up SystenC

Step 1: Download SystemC

git clone https://github.com/accellera-official/systemc.git
cd systemc

Step 2: Build and Install SystemC

mkdir build
cd build

Configure the build:

# Force use of your current g++ (7.3.0)
cmake .. \
  -DCMAKE_CXX_COMPILER=g++ \
  -DCMAKE_C_COMPILER=gcc \
  -DCMAKE_CXX_STANDARD=17 \
  -DCMAKE_INSTALL_PREFIX=../install

Compile SystemC:

# make -j$(nproc)
make -j8

Install SystemC:

make install

Step 3: Set Up environment Variables

SYSTEMC_HOME: Path to the installed SystemC directory.

LD_LIBRARY_PATH: Path to the SystemC library files.

export SYSTEMC_HOME=/path/to/systemc/install
export LD_LIBRARY_PATH=$SYSTEMC_HOME/lib64:$LD_LIBRARY_PATH
setenv SYSTEMC_HOME /home/u6056664/Documents/test-systemc/systemc/install
setenv LD_LIBRARY_PATH /home/u6056664/Documents/test-systemc/systemc/install/lib64

Step 4: Verify Installation

ls $SYSTEMC_HOME
ls $LD_LIBRARY_PATH

Part 2. Writing and Running Your First Systemc Program

Step 1: Create a First SystemC Program

Create first_project/CMakeLists.txt and first_project/main.cpp

Step 2: Compile the SystemC Program

cd first_project
mkdir build
cd build
cmake ..
make

Step 3: Run the SystemC Program

./first_systemc

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published