【FPGA】SRIO IP核系統總覽以及端口介紹(二)(I/O Port 含義介紹)

上篇博文:【FPGA】SRIO IP核系統總覽以及端口介紹(一)(User Interfaces 之 I/O Port)根據數據手冊PG007,介紹到了邏輯層接口的IO口,今天想研究下,這些端口如何使用,結合實際問題來想想這個問題。

我們知道I / O端口可以配置爲兩種樣式之一:Condensed I/O or Initiator/Target. 

我們考慮使用Initiator/Target方式:

這種方式的端口信號分爲ireq/iresp與treq/tresp這兩對信號類型。

假如通信雙方是DSP和FPGA,DSP發數據,而FPGA收數據;

對於FPGA來說,這端爲initiator,ireq爲發數據請求信號,iresp爲來自DSP的響應信號;對於DSP發來的數據,treq爲DSP發送數據的請求信號,而tresp爲對DSP的響應信號。

從遠程設備接收的響應在發起者響應(iresp)信道上呈現給用戶設計。

下面爲數據手冊上的描述:

Requests generated by the local endpoint are placed on the Initiator Request (ireq) channel to be transmitted on the link. Responses received from a remote device are presented to the user design on the Initiator Response (iresp) channel.

Requests originating from a remote device which are received by the core are presented to the user design on the Target Request (treq) channel. Responses to these requests, which are generated by the user design, are placed on the Target Response (tresp) channel.

意思是本地設備的請求信號在ireq channel上,對應的遠程設備的響應在iresp channel上。

而遠程設備的請求在treq上,對應的本地響應在tresp上。

Table 2-5 shows the signals associated with the Initiator/Target port. At the <component_name> level, the following signals are associated with these interfaces:
• s_axis_ireq* are associated with INITIATOR_IREQ.
• m_axis_iresp* are associated with INITIATOR_IRESP.
• m_axis_treq* are associated with TARGET_TREQ.
• s_axis_tresp* are associated with TARGET_TRESP.

下面是端口描述:


從treq/tresp信號開始:(treq從DSP發起的請求信號,FPGA端收到數據後,就從treq中提取有用信息)

m_axis_treq_tvalid 表明數據有效;(輸出)

m_axis_treq_tready  握手信號。表明來自源端的數據被接收;(輸入)

m_axis_treq_tdata[63:0] 包頭和數據;(數據)

m_axis_treq_tkeep[7:0] 

字節限定符,指示相關聯的數據字節的內容是否有效。 如果端口配置爲使用HELLO格式,則這與8'hFF相關聯。 對於配置爲使用SRIO Stream格式的端口,此輸出設置爲8'hFF,除非設置了tlast。
位7對應於數據的最高有效字節(tdata [63:56]),位0對應於最低有效字節(tdata [7:0])。(輸出)

m_axis_treq_tlast 表示數據包的最後一拍。(輸出)

m_axis_treq_tuser[31:0] (輸出)

HELLO格式:在數據包的第一拍時有效,該信號由數據包的源ID(31:16)和目標ID(15:0)組成。 如果使用8位設備ID,則每個ID的最高有效字節應填充0。
SRIO流格式:在此格式中,tuser只有8位寬。 如果設置了數據包的關鍵請求流(CRF)標誌,則設置位1。
所有其他位都保留。 在數據包中的後續節拍中,保留此字段。

對於其他的信號就不一一贅述了。

對於特定應用中,例如FPGA接收來自DSP的數據,FPGA接收端RX的串行數據,最終到達邏輯層會以treq形式給出。我們對此消息進行處理即可。