hover99的个人空间 https://blog.eetop.cn/253668 [收藏] [复制] [分享] [RSS]

空间首页 动态 记录 日志 相册 主题 分享 留言板 个人资料

日志

How to convert RAL transaction to AHB Master VIP transaction

已有 1704 次阅读| 2011-6-8 18:50 |个人分类:VMM VIP

You can use the AHB Master VIP as a RAL BFM, and add a wrapper to convert RAL transactions into AHB READ/WRITE transactions before putting objects into AHB master VIP. And the ahbRALWrapper connects between the ahbRALRWXactor and AHB_Master_VIP .

 

Attach the ahbRALWrapper.sv for your reference. In brief, there are 3 steps for each WRITE/READ transaction:

 

  step1.  convert RAL transactions into AHB VIP transactions, for example:

     master_trans.m_bvAddress      = ral_trans.m_bvAddress;

  master_trans.m_enXactType     = dw_vip_ahb_transaction::WRITE;

  master_trans.m_enBurstType    = dw_vip_ahb_transaction::SINGLE;

  master_trans.m_enXferSize     = dw_vip_ahb_transaction::XFER_SIZE_32BIT;

  master_trans.m_nNumBytes      = 4;//32 bit data width, 4bytes

  master_trans.m_bvvData   = new[master_trans.m_nNumBytes];

  master_trans.m_bvvData[0]     = ral_trans.data[7:0];

  master_trans.m_bvvData[1]     = ral_trans.data[15:8];

  master_trans.m_bvvData[2]     = ral_trans.data[23:16];

  master_trans.m_bvvData[3]     = ral_trans.data[31:24];

 

step2. put the new transaction into VIP input channel

    $cast(cpy_trans,master_trans.copy());

vip_input_chan.put(cpy_trans);

 

step3. Wait AHB VIP transaction completes

    cpy_trans.notify.wait_for(vmm_data::ENDED);


点赞

评论 (0 个评论)

facelist

您需要登录后才可以评论 登录 | 注册

  • 关注TA
  • 加好友
  • 联系TA
  • 0

    周排名
  • 0

    月排名
  • 0

    总排名
  • 0

    关注
  • 3

    粉丝
  • 0

    好友
  • 0

    获赞
  • 3

    评论
  • 982

    访问数
关闭

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

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

GMT+8, 2024-11-5 17:25 , Processed in 0.021396 second(s), 15 queries , Gzip On, Redis On.

eetop公众号 创芯大讲堂 创芯人才网
返回顶部