当前位置: 首页 > news >正文

SystemC学习(一)——环境安装

一、环境安装

  • SystemC (eda.org) 下载SystemC 2.3.4
  • 编译与安装
cd systemc-2.3.4/
mkdir build && cd build
../configure --prefix=/home/systemc-2.3.4

如果最后的configure指令出现报错config.status: error: cannot find input file: `src/Makefile.in’,返回systemc-2.3.4/目录下,执行如下命令再返回build目录下。

cd ..
sudo apt-get install automake
aclocal
automake --add-missing
cd buildsudo make -j $(nproc)
make install
  • bashrc修改
sudo vi ~/.bashrc#写入如下内容
export SYSTEMC_HOME=/home/systemc-2.3.4/
export LD_LIBRARY_PATH=/home/systemc-2.3.4/lib-linux64/:$LD_LIBRARY_PATHsource ~/.bashrc

二、Hello World运行

  • touch helloworld.cpp
#ifndef _HELLO_H
#define _HELLO_H
#include "systemc.h"
SC_MODULE(hello)
{SC_CTOR(hello){cout<<"Hello, SystemC!"<<endl;}
};
#endif//main.cpp
int sc_main(int i, char* a[])
{hello h("hello");return 0;
}
  • compile
g++ helloworld.cpp -I/home/systemc/include/ -L/home/systemc/lib-linux64 -o hello -lsystemc

报错:

error while loading shared libraries: libsystemc-2.3.4.so: cannot open shared object file: No such file or directory

执行以下命令:

// 建立软链接
ln -s /home/systemc-2.3.4/lib-linux64/libsystemc-2.3.4.so /usr/lib/libsystemc-2.3.4.so// 更新缓存
sudo ldconfig 
  • 执行
./hello

三、参考文献

  • Linux安装:

SystemC入门学习Demo用例的工程化配置_一个systemcdemo-CSDN博客

ubuntu系统安装systemc-2.3.4流程_systemc requires a c++ compiler version of at leas-CSDN博客

SystemC (accellera.org)

  • Windows安装

Windows VS2022 下配置SystemC环境 - 知乎 (zhihu.com)


http://www.mrgr.cn/news/40066.html

相关文章:

  • 软件设计师——计算机网络
  • 两个示例分析系统优化的选择
  • 【微信小程序前端开发】入门Day01 —— 小程序页面组成、组件使用及协同开发发布指南
  • 解决$‘r‘ command not found或者文件夹显示’tvsf 33‘$‘r‘
  • USB 3.1 标准 A 型插头到 USB 3.1 Micro-B 型插头电缆组件的电线连接
  • 裸金属服务器与虚拟机、物理机区别
  • 2024年9月30日随笔
  • mobile_aloha训练过程中pycharm编辑器遇到的问题记录
  • 【编程小白必看】MySQL 聚合函数操作秘籍一文全掌握
  • 非常全面的中考总复习资料-快速提升中考成绩!
  • 【刷点笔试面试题试试水】#ifndef和#ifdef有什么区别?
  • 单臂路由详解
  • PCL库简单NDT算法配准
  • 大数据复习知识点5
  • C语言导航 2.1基本字符集与词汇
  • Java入门3——操作符+String
  • 【设计模式-模板】
  • 【漏洞复现】金和OA C6 GeneralXmlhttpPage.aspx Sql注入漏洞
  • Chromium 屏蔽“缺少 Google API 密钥,因此 Chromium 的部分功能将无法使用。”提示 c++
  • 【数据结构与算法】算法和算法分析