如何离线运行pulp代码呢?

电子说

1.2w人已加入

描述

引言

最近在折腾pulp,代码很优秀,强烈推荐。想在公司环境中跑起来,但鉴于公司eda服务器无法连外网,需要从外部导入数据。

整理了一些要求,供大家参考:

1.离线安装bender, 加入path路径

  • 把~/bin目录加到PATH路径中。
  • 测试下bender命令是否可行:bender --help

2.离线下载依赖仓库

例如打算跑axi这个repo,打开它目录下Bender.yaml文件,搜索dependencies关键词:

dependencies:  
    common_cells: { git: "https://github.com/pulp-platform/common_cells.git", version: 1.27.0 }  
    common_verification: { git: "https://github.com/pulp-platform/common_verification.git", version: 0.2.3 } 
    tech_cells_generic:  { git: "https://github.com/pulp-platform/tech_cells_generic.git", version: 0.2.2 }

说明它依赖comon_cellss、common_verification、tech_cells_generic这三个仓库,把那些仓库也clone到与axi平行的目录。

目录树结构如下图所示:

AXI总线

3.修改Bender.yml 文件

默认运行会根据Bender.yml中的depenencies关键词,自动clone代码下来。

我们需要做离线运行,代码已经下载好了,直接改Bender.yml。把git关键词改成path,目录也改成相对路径(相对Bender.yml的路径)。

common_cells: { git: "https://github.com/pulp-platform/common_cells.git", version: 1.27.0 } 
改成 
common_cells: { path: "../common_cells"}

此外,我们还需要进一步修改依赖包中的Bender.yml ,否则bender还是会在读取依赖包的时侯再次发起git clone操作。

比如common_cells中的bender.yml

common_verification: { git: "https://github.com/pulp-platform/common_verification.git", version: 0.2.0 }
tech_cells_generic: { git: "https://github.com/pulp-platform/tech_cells_generic.git", version: 0.2.11 }
修改成
common_verification: { path: "../common_verification", version: 0.2.0 }
tech_cells_generic: { path: "../tech_cells_generic", version: 0.2.11 }

4.编译运行

以axi为例,需要切换到scripts目录下运行

cd scripts

#编译
./compile_vsim.sh

#运行
./run_vsim.sh
打开APP阅读更多精彩内容
声明:本文内容及配图由入驻作者撰写或者入驻合作网站授权转载。文章观点仅代表作者本人,不代表电子发烧友网立场。文章及其配图仅供工程师学习之用,如有内容侵权或者其他违规问题,请联系本站处理。 举报投诉

全部0条评论

快来发表一下你的评论吧 !

×
20
完善资料,
赚取积分