使用SystemC進行硬件仿真
環境
- linux-x86-64
- bash
- g++
下載解壓SystemC
解壓下載的包
tar zxvf systemc-2.3.3.tar.gz
進入解壓出來的目錄,准備編譯安裝
cd systemc-2.3.3
編譯安裝
打開安裝說明文件INSTALL
vim INSTALL
按照步驟安裝
Create a temporary directory
mkdir objdir
Change to the temporary directory
cd objdir
Choose your compiler by setting the CXX environment variable(我的shell是bash)
export CXX=g++
Configure the package for your system
../configure --prefix=/usr/local/systemc-2.3.2
Compile the package(這里使用make命令)
make
Verify the compiled package
make check
Install the package(root用戶)
make install
安裝好的目錄
配置安裝的庫路徑
添加軟鏈接(使用root用戶/sudo執行)
ln -s /usr/local/systemc-2.3.2/lib-linux64/libsystemc-2.3.2.so /usr/lib/libsystemc-2.3.2.so
修復動態鏈接庫問題
將安裝路徑添加都/etc/ld.so.conf.d/
目錄下(使用root用戶/sudo執行)
echo "/usr/local/systemc-2.3.2/lib-linux64/" > /etc/ld.so.conf.d/systemc.conf
運行測例
跳轉至《SystemC入門》書籍給的exanpel中
測例鏈接: https://pan.baidu.com/s/1ssr81seZcx-s358GcyUJ8w 提取碼: khf8
參考鏈接
1.Setting up SystemC and Eclipse for C++ hardware simulation
2.RedHat7安裝Systemc 編譯仿真
3.SystemC在ubuntu上的安裝