栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 软件开发 > 后端开发 > C/C++/C#

systemVerilog dpic调用python总结

C/C++/C# 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

systemVerilog dpic调用python总结

一、python3库准备

安装python的时候要加 --enable-shared,否则不会生成和python相关的xxx.so动态链接库文件,

而且最好安装在/usr下面,而不是/usr/local/,这样的话需要的Python.h头文件就会在/usr/include/Python3.7m,除此之外,还需要svdpi.h头文件,这个文件目录在${VCS_HOME}/include下面。

./configure --prefix=/usr/local/python3 --enable-shared 
//./configure --prefix=/usr/python3 --enable-shared

二、编译

文件./soft/c_call_py.cpp

//./soft/c_call_py.cpp
#include
#include
#include
#include
//#define PYTHON_PATH "/home/ICer/workspace/systemverilog-python-main/1.systemverilog_demo/soft"
//#ifndef PYTHON_PATH
//#error You must define the PYTHONPATH to the python file in gcc compiler with -D
//#endif

static PyObject *pModule  = NULL;
static PyObject *pFunc    = NULL;
static
转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/982338.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号