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

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

手机号码,快捷登录

手机号码,快捷登录

找回密码

  登录   注册  

快捷导航
搜帖子
查看: 7985|回复: 6

[求助] 在vmm验证环境中,怎样写一个axi master bfm

[复制链接]
发表于 2010-4-12 09:08:56 | 显示全部楼层 |阅读模式

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

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

x
in our vmm testbench, an axi master bfm is needed to write and read the pcie core and some internal registers. and our axi slave just suppport INCR AXI burst type,all burst length data transfer and support 1,2,4,8 burst size data transfer .Could I use the command based model of axi vip: axi_master_vmt to build such axi master bfm?
the reg write task can be written like below?
Class axi_master_bfm extends vmm_xactor;
axi_master_vmt axi_master;
.....
.....
task automatic reg_write( bit [63:0] addr, logic [31:0] data[],int len, int size );

integer nWriteBufferHandle,nWriteBufferHandle1;
integer nCmdHandle;

$display("%t prepare to read %8h",$time,addr);
axi_master.new_buffer(nBufferHandle);
axi_master.copy_buffer(nBufferHandle, nWriteBufferHandle1);
axi_master.set_buffer_attr_bitvec(nWriteBufferHandle1, `DW_VIP_AXI_ADDR, 0, addr);
axi_master.set_buffer_attr_bitvec(nWriteBufferHandle1, `DW_VIP_AXI_ALEN, 0, len);
axi_master.set_buffer_attr_bitvec(nWriteBufferHandle1, `DW_VIP_AXI_ASIZE, 0, size);
axi_master.set_buffer_attr_bitvec(nWriteBufferHandle2, `DW_VIP_AXI_ABURST, 0, 2'b01);
axi_master.set_buffer_attr_int(nWriteBufferHandle1, `DW_VIP_AXI_WRITE, 0, `VMT_TRUE);
for(int i=0; i<len;i++)
axi_master.set_buffer_attr_bitvec(nWriteBufferHandle1, `DW_VIP_AXI_DATA, i, data[i]);
axi_master.send_xact(`VMT_DEFAULT_STREAM_ID, nWriteBufferHandle1, nCmdHandle);

endtask
.....
......
endclass

could you give some good advice how to write this type of axi master bfm? thank you very much!
发表于 2010-12-15 08:58:56 | 显示全部楼层
顶一下,也经常看到BFM这个东西,就是玩不转
发表于 2010-12-18 18:55:11 | 显示全部楼层
搞懂axi协议,再用sv描述出来……
发表于 2010-12-24 00:09:36 | 显示全部楼层
ddddddddddd
发表于 2011-5-26 16:13:34 | 显示全部楼层
理论上bmf就是这样写的
发表于 2011-5-26 17:10:06 | 显示全部楼层
axi_master.set_buffer_attr_bitvec(nWriteBufferHandle2, `DW_VIP_AXI_ABURST, 0, 2'b01);
兄弟,你不是已经在用synopsysy的 VIP 了么?
发表于 2014-10-1 16:14:54 | 显示全部楼层
变焦基本靠走 对焦基本靠扭
遮光基本靠手 虚化基本靠抖
测光基本靠瞅 防抖基本靠肘
除尘基本靠口 -扁扁学摄影
您需要登录后才可以回帖 登录 | 注册

本版积分规则

关闭

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

×

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

GMT+8, 2024-9-21 08:24 , Processed in 0.018558 second(s), 8 queries , Gzip On, Redis On.

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