【一生一芯】搭建verilator仿真环境
完成Linux环境配置之后,安装“一生一芯”项目所需要的仿真环境。这一步预学习讲义中并没有给出详细步骤,可以参考互联网以及官方指南。
打开终端,输入以下命令,安装仿真环境需要的依赖:
# Prerequisites: sudo apt-get install help2man sudo apt-get install git perl python3 make autoconf g++ flex bison ccache sudo apt-get install libgoogle-perftools-dev numactl perl-doc sudo apt-get install libfl2 # Ubuntu only (ignore if gives error) sudo apt-get install libfl-dev # Ubuntu only (ignore if gives error) sudo apt-get install zlibc zlib1g zlib1g-dev # Ubuntu only (zlibc is needed for the Fst/GTKwave support at runtime, if you aren't using that you should be fine without it.)
从Github安装verilator:
git clone git@github.com:verilator/verilator.git
安装完成后,可以发现桌面上增加了一个名为verilator的文件夹。进入文件夹,控制版本为5.008:
cd verilator git checkout v5.008
终端返回以下信息:
Note: switching to 'v5.008'. You are in 'detached HEAD' state. You can look around, make experimental changes and commit them, and you can discard any commits you make in this state without impacting any branches by switching back to a branch. If you want to create a new branch to retain commits you create, you may do so (now or later) by using -c with the switch command. Example: git switch -c <new-branch-name> Or undo this operation with: git switch - Turn off this advice by setting config variable advice.detachedHead to false HEAD is now at 21093fd1b Version bump
然后生成安装verilator需要的make文件:
autoconf
unset VERILATOR_ROOT ./configure make -j `nproc`
最后安装verilator:
sudo make install
查询安装的版本:
verilator --version
返回内容为:
Verilator 5.008 2023-03-04 rev v5.008
说明安装的版本是5.008,是要求的版本。
最后安装波型查看器GTKwave:
sudo apt-get install gtkwave
到此为止,实验所需要的Verilator仿真环境搭建完成。
只有坚强的人才能温柔的对待一切,努力做一个坚强的人
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 阿里最新开源QwQ-32B,效果媲美deepseek-r1满血版,部署成本又又又降低了!
· 开源Multi-agent AI智能体框架aevatar.ai,欢迎大家贡献代码
· Manus重磅发布:全球首款通用AI代理技术深度解析与实战指南
· 被坑几百块钱后,我竟然真的恢复了删除的微信聊天记录!
· AI技术革命,工作效率10个最佳AI工具