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


How to convert RAL transaction to AHB Master VIP transaction

已有 703 次阅读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




step3. WAIt AHB VIP transaction completes


评论 (0 个评论)


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


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

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

GMT+8, 2020-7-5 15:01 , Processed in 0.025056 second(s), 7 queries , Gzip On, Redis On.

Powered by Discuz! X3.4

© 2001-2017 Comsenz Inc.