Linux系統(tǒng)下SystemC環(huán)境配置方法
以下為centos7下配置方法
下載systemc源碼包:SystemC (accellera.org)

將壓縮包放置到用戶目錄下,并解壓
tar -zxvf systemc-2.3.3.tar.gz
進入到systemc-2.3.3文件夾
cd systemc-2.3.3
新建臨時文件夾tmp,并進入其中
mkdir tmpcd tmp
運行如下命令
../configure make make install
至此,文件夾中生成include與lib-linux64兩個文件夾
設(shè)置環(huán)境變量
export LD_LIBRARY_PATH=home/centos7/systemc-2.3.3/lib-linux64 //其中/home/cnetos7/為文件解壓路徑,根據(jù)自身情況確定
執(zhí)行該命令只在當前可用,重啟后即失效,若需要長期可用,建議在用戶目錄下的.bashrc下添加該條命令,并需要執(zhí)行以下命令,重啟終端生效。
source .bashrc
運行一個systemc程序進行測試。
test.cpp
//all systemc modules should include systemc.h header file
#inlcude"systemc.h"
//hello_world is module name
SC_MODULE(hello_world){
SC_CTOR(hello_world){
//nothing in constructor
}
void say_hello(){
//Print "Hello world!!!" to the console.
cout<<"Hello World!!!"<<endl;
}
}; //此處分號不要忘了
//sc_main in top level function like in C++ main
int sc_main(int argc, char* argv[]){
hello_world hello("HELLO");
return 0;
}
編譯并運行
g++ test.cpp -I/home/cp/Simulator/systemc/include -L/home/cp/Simulator/systemc/lib-linux64 -o test -lsystemc ./test
屏幕上將會顯示

makefile
LIBDIR=-L/home/cp/Simulator/systemc/lib-linux64 INCDIR=-I/home/cp/Simulator/systemc/include LIB=-lsystemc all: g++ -o test test.cpp $(LIBDIR) $(INCDIR) $(LIB) clean: rm -rf *.o
到此這篇關(guān)于Linux系統(tǒng)下SystemC環(huán)境配置方法的文章就介紹到這了,更多相關(guān)Linux系統(tǒng)SystemC環(huán)境內(nèi)容請搜索腳本之家以前的文章或繼續(xù)瀏覽下面的相關(guān)文章希望大家以后多多支持腳本之家!
相關(guān)文章
linux VPS之間網(wǎng)站數(shù)據(jù)的備份與恢復(網(wǎng)站遷移教程)
有時候我們需要網(wǎng)站遷移或者網(wǎng)站數(shù)據(jù)需要備份或恢復,那么就需要一些操作了,linux下操作都是命令下執(zhí)行的,特分享下,方便需要的朋友2014-02-02
Centos 6.4 安裝Python 2.7 python-pip的詳細步驟
這篇文章主要介紹了Centos 6.4 安裝Python 2.7 python-pip的詳細步驟,需要的朋友可以參考下2017-03-03
CentOS下使用LibreOffice實現(xiàn)文檔格式的轉(zhuǎn)換方式
項目需求,對上傳的文檔進行一些預處理,如果用戶上傳了doc格式的文檔,需要將其處理為docx或者pdf格式,以便后續(xù)的流程對文檔內(nèi)容進行提取。接下來通過本文給大家分享CentOS下使用LibreOffice實現(xiàn)文檔格式的轉(zhuǎn)換,感興趣的朋友一起看看吧2019-07-07
使用Samba在Linux服務(wù)器上搭建共享文件服務(wù)的方法
Samba是在Linux和UNIX系統(tǒng)上實現(xiàn)SMB協(xié)議的一個免費軟件,由服務(wù)器及客戶端程序構(gòu)成。這篇文章主要介紹了使用Samba在Linux服務(wù)器上搭建共享文件服務(wù) ,需要的朋友可以參考下2019-05-05
Centos7安裝ElasticSearch 6.4.1入門教程詳解
這篇文章主要介紹了Centos 7安裝ElasticSearch 6.4.1入門教程詳解,小編覺得挺不錯的,現(xiàn)在分享給大家,也給大家做個參考。一起跟隨小編過來看看吧2019-05-05

