AXI VIP Master

来源:互联网 发布:明天妈妈不在知乎 编辑:程序博客网 时间:2024/05/17 07:33

 here is block diagram for AXI MASTER VIP.

1. semaphore put-then-get can notify all previously queued task are finished.  wait until wait transaction are executed. Just like sync or block instruction.

2. each loop (write/read address/data or wirte response) is endless loop. they are parallel arranged with fork... join_none to behavior as Master BFM.

3. writedata put transactions both on AW and WD mailbox, it also create mailbox to store write response. Once done, increase wrRespPtr.

    每个beat都put到 AW 以及WD中。 AW中的transaction更新了地址, WD中的transaction更新了写数据以及对应的strobe。但是在buffer中的data没有全部传完之前,WrRespPtr指针不变。(刚开始default为0)。 在buffer中的data全部传完后才将WrRespPtr增加1.

4. readdata put transaction on AR mailbox, it also create mailbox to store read data. Once a transaction was put into AR mailbox, it increase RdDataPtr befor quit task.

5. write data loop once get WRITE  data transaction, drive data onto the interface, then put WRITE data transaction into B mailbox to active write resp loop.

6. read address loop get READ data transaction, drive address onto the interface , then put READ transaction into RD mailbox to active read data loop.

 

注意以上没有加入reorder,interleave,issuing capability(outstanding depth)的支持。不过加入这些特性也很方便,譬如:

1) outstanding depth。 只需要加入变量用以配置mailbox的深度就可以了。

2) interleave, reorder。 只需要在 write Resp loop 和 read data loop 中实现根据ID把返回值放入到transaction的buffer中,一旦一个完整的transaction数据收集完毕,则put到RdDataArrayBox对应的项目中。这也许需要一个开辟对应ID数的loop以及mailbox,将RD mailbox 中的transaction根据ID分到各个后级mailbox(labeled with ID)

原创粉丝点击