日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

Synopsys AXI VIP wstrb相关

發(fā)布時間:2023/12/20 编程问答 40 豆豆
生活随笔 收集整理的這篇文章主要介紹了 Synopsys AXI VIP wstrb相关 小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.

使用AXI VIP發(fā)送transaction的時候,發(fā)現(xiàn)transaction的每個beat的wstrb按照右對齊的方式設置(data同樣也是按照右對齊的方式設置),而不需要按照axi協(xié)議規(guī)定的方式設置,就可以正確的發(fā)送。這是為什么?

axi協(xié)議關于wstrb的規(guī)定

These equations determine which byte lanes to use for the first transfer in a burst:
? Lower_Byte_Lane = Start_Address – (INT(Start_Address / Data_Bus_Bytes)) × Data_Bus_Bytes
? Upper_Byte_Lane = Aligned_Address + (Number_Bytes – 1) – (INT(Start_Address / Data_Bus_Bytes)) × Data_Bus_Bytes.

These equations determine which byte lanes to use for all transfers after the first transfer in a burst:
? Lower_Byte_Lane = Address_N – (INT(Address_N / Data_Bus_Bytes)) × Data_Bus_Bytes
? Upper_Byte_Lane = Lower_Byte_Lane + Number_Bytes – 1.

假如要發(fā)送的transaction的addr = 32'h2,burst_size = 32bit,burst_length=4,總線位寬128bit。按照上面的公式,4個beat的wstrb分別為:16'h000c, 16'h00f0, 16'h0f00, 16'hf000。但是對于vip來說,即使4個beat全部配置成16‘hf,vip仍然可以按照上面的公式規(guī)定的方式發(fā)送。

VIP中關于wstrb的解釋

/*** @groupname axi3_protocol* Array of Write strobes.* If svt_axi_port_configuration::wysiwyg_enable is set to 0 (default), the* wstrb must be stored right-justified by the user. The model will drive* these strobes on the correct lanes.* If svt_axi_port_configuration::wysiwyg_enable is set to 1, the wstrb is * transmitted as programmed by user and is reported as seen on bus. * No right-justification is used in this case.*/rand bit [`SVT_AXI_WSTRB_WIDTH - 1:0] wstrb[]; /*** @groupname axi3_4_config* Acronym for "What You See is What You Get". Applicable to the* svt_axi_transaction::data and svt_axi_transaction::wstrb fields of a* transaction. If this bit is set to 1, whatever is configured in the* svt_axi_transaction::data and svt_axi_transaction::wstrb fields is* transmitted "as is" by the master. Also, in the transaction object* generated by monitor, the monitor populates the svt_axi_transaction::data* and svt_axi_transaction::wstrb fields "as is", as seen on the bus. If* this bit is set to 0 (default), the data must be stored right-justified by* the user. The model will drive the data on the correct lanes.** Refer to the documentation of svt_axi_transaction::data and * svt_axi_transaction::wstrb for more details*/rand bit wysiwyg_enable = 0;

當wysiwyg_enable==0的時候,wstrb采用右對齊的方式進行存儲,所以上述wstrb的后3個beat配置成16’hf可以正確發(fā)送。第一個beat是非對齊的地址,按照右對齊的方式wstrb應該是16’h3,為什么配置成16‘hf也可以正確的發(fā)送呢?

這個問題但是還沒有找到答案,可能和下面這個函數(shù)有關,后續(xù)搞清楚了再更新:

/*** Ensures that only valid lanes have wstrb asserted. In wysisyg format* the constraints leave data[] and wstrb[] open. This function is called in* post_randomize to make sure that wstrb is asserted only for valid lanes*/ extern function void get_wstrb_for_wysiwyg_format(ref bit[`SVT_AXI_MAX_DATA_WIDTH/8-1:0] wstrb[]);

另外,可以使用check_wstrb函數(shù)檢查wstrb:

/** Returns '1' if write strobes are driven correctly otherwise, returns '0' */extern virtual function bit check_wstrb(bit silent=0);

總結(jié)

以上是生活随笔為你收集整理的Synopsys AXI VIP wstrb相关的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯,歡迎將生活随笔推薦給好友。