一生一芯 预学习阶段 搭建verilator仿真环境 之 示例:双控开关

一生一芯 预学习阶段 搭建verilator仿真环境 之 示例:双控开关

1、前言

一生一芯预学习 中需要安装4.210版本Verilator,通过git方式下载所需要版本。

2、步骤

1、官网链接: link.

在这里插入图片描述

2、代码

#Prerequisites:
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 (ignore if gives >error)

git clone https://github.com/verilator/verilator # Only first time

#Every time you need to build:
unsetenv VERILATOR_ROOT # For csh; ignore error if on bash
unset VERILATOR_ROOT # For bash
cd verilator
git pull # Make sure git repository is up-to-date
git tag # See what versions exist
#git checkout master # Use development branch (e.g. recent bug fixes)
#git checkout stable # Use most recent stable release
git checkout v4.210 # Switch to specified release version

autoconf # Create ./configure script
./configure # Configure and create Makefile
make -j nproc # Build Verilator itself (if error, try just ‘make’)
sudo make install

3 、查看版本

verilator --version

若输出:

Verilator 4.210 2021-07-07 rev v4.210

则表示安装成功.

4、C++例子

C++例子 官方步骤非常详细。

5、示例:双控开关

http://www.icfgblog.com/index.php/Digital/317.html
题目:

  • 13
    点赞
  • 49
    收藏
    觉得还不错? 一键收藏
  • 17
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 17
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值