在线咨询
eetop公众号 创芯大讲堂 创芯人才网
切换到宽版

EETOP 创芯网论坛 (原名:电子顶级开发网)

手机号码,快捷登录

手机号码,快捷登录

找回密码

  登录   注册  

快捷导航
搜帖子
查看: 32896|回复: 384

[资料] mentor的uart uvm example

[复制链接]
发表于 2020-9-8 15:01:42 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?注册

x
本帖最后由 空白MAX 于 2020-9-8 15:05 编辑

Mentor Graphics提供的一个UART的UVM验证环境代码,包含了UVM的基本使用以及进阶的UVM寄存器模型。这里也分享给大家。

文件说明 agents/apb_agent - APB agent used in the UVM testbench
agents/uart_agent - UART agent user in the UVM testbench
agents/modem_agent - UART Modem interface agent, used in the UVM testbench
docs
protocol_monitor - contains an example APB protocol monitor
rtl - Contains the UART RTL source code***
sim - Simulation directory for the example, contains the Makefile
uvm_tb/tb - Top level testbench
uvm_tb/tests
uvm_tb/virtual_sequences
uvm_tb/sequences
uvm_tb/register_model
uvm_tb/env - contains the functional coverage monitors described in the cookbook

DUT是16550A UART模块,接口主要包含apb、uart以及一些状态信号,agents下是不同接口的agent。16550A UART推荐大家自己搜索下载详细的spec。

docs是uart模块的简单说明,包含了一些寄存器的说明

protocol_monitor是一个协议检查模块,通过断言对apb协议进行检查

环境集成以及sequence等编写在uvm_tb下。

运行仿真

想要运行可以通过sim目录下的makefile进行,makefile调用的是quesatsim进行仿真,如果没有的话,需要自己编写vcs的makefile进行仿真。

如果想要在window下通过makefile运行仿真,需要以下几个步骤

  • 安装git_bash,git的bash实际上也就是一个mingw,是可以支持部分linux指令的,但是只有少部分,可以让我们的的终端更加像linux下的操作。
  • 这个时候还是不支持makefile,需要我们自行安装,教程可以参考下面的链接

https://www.eemaker.com/git-bash-make.html

  • 安装questasim

完成以后就能直接通过make all运行啦。

20200809171037.png

默认的makefile只进行到仿真这一步,没有生成覆盖率报告,我在makefile中加了入了覆盖率相关的命令

先合并覆盖率数据库,然后生成覆盖率报告的html文件

rpt_cg:
     vcover merge -out merge_coverage.ucdb *.ucdb
     vcover report -details -html merge_coverage.ucdb
     @echo "html has been created in ./sim/covhtmlreport"

20200809171135.png


20200809171217.png

详细的内容请查看README


游客 ,如果您要查看本帖隐藏内容请回复

20200809171037.png
20200809171135.png
20200809171217.png
发表于 2020-9-8 21:40:07 来自手机 | 显示全部楼层
看起來不錯
发表于 2020-9-9 09:22:26 | 显示全部楼层
感谢分享~~
发表于 2020-9-11 17:43:36 | 显示全部楼层
看起来不错
发表于 2020-9-11 20:04:22 | 显示全部楼层
感谢分享
发表于 2020-9-12 11:08:28 | 显示全部楼层
支持
发表于 2020-9-12 14:53:59 | 显示全部楼层
:):)
发表于 2020-9-12 15:53:41 | 显示全部楼层
very nice thanks for sharing
发表于 2020-9-12 19:05:28 | 显示全部楼层
感谢分享

发表于 2020-9-12 22:27:52 | 显示全部楼层
I would like to read the contents. Thanks.

您需要登录后才可以回帖 登录 | 注册

本版积分规则

关闭

站长推荐 上一条 /3 下一条

×

小黑屋| 关于我们| 联系我们| 在线咨询| 隐私声明| EETOP 创芯网
( 京ICP备:10050787号 京公网安备:11010502037710 )

GMT+8, 2024-4-20 05:26 , Processed in 0.032009 second(s), 6 queries , Gzip On, Redis On.

eetop公众号 创芯大讲堂 创芯人才网
快速回复 返回顶部 返回列表