PCIE協議解析 synopsys IP DBI and LBC 讀書筆記(6)

6.1   Data Integrity

爲了保證數據的完整性,系統在不同的節點採用了不同的措施,主要包括:

“Wire Protection (ECRC)” on page 94

“Datapath Protection (Parity)” on page 95

“RAM Protection (ECC or Parity)” on page 98

“RAS DES” on page 99

譯者注:對於用戶來說,上述所有的功能都是可選的,並且所有的操作都會在core內完成,而用戶對IPcore的使用並不會產生影響,該部分了解即可,對C1 bring up 的影響不大,可以作爲附件功能後續測試)。

6.2   Messages

對Message進一步瞭解可參閱Section 2.2.8, Message Request Rulesof the PCI ExpressBase 3.1 Specification, revision 1.0.

1.2.1    Message Generation

Message的發送有以下的途徑:

Ø  Core(自己生成)

Ø  Core(application 控制 core生成)

Ø  Application 生成

Ø  Host/client 的軟件生成

注意: ID basedordering 不支持內部生成的message,或者通過SII interface生成的message。





Vendor Defined Message (VDM) Generation

Application可以通過以下途徑控制VDM生成message:

Ø  Core答覆來自VMI(Vendor Message Interface)上的要求而生成message:

l  VMI只能用來發送message,而且不支持帶payload的message。

l  輸入的ven_msg_fmt[1:0]和ven_msg_len[9:0]爲必須分別置爲0x1和0x0,因爲payload 可以是1 DWORD。

l  通過VMI生成的VDMs總是會參考 “InternalAddress Translation Unit (iATU)” on page 140.

注意:

最佳的VDM發送接口爲SII interfaceAHB/AXI 同樣可以支持VDM message發送。

關於AHB/AXI橋的侷限性可參考“AXI Bridge Limitations”on page 961 and “AHB Bridge Limitations” on page913.

Ø  通過XALI0/1/2接口可直接發送Msg(Message Request)和MsgD(Message Request with data payload)。

Ø  通過XALI0/1/2接口發送IO和MEM TLP,然後轉換爲VDM。通過address translation unit(IATU)進行IO 和MEM TLP到VDM TLP的轉化。

注意:

必須採用64bit位寬的地址,當直接生成VDM時。

Latency Tolerance Reporting (LTR) Message Generation [EP Mode]

部分沒有保存上,直接跳過了

6.3   Interrupts

6.3.1    中斷的生成

一個USP(upstream port)通過MWr request生成MSI,具體的過程是你的application通過MSI接口啓動MSIrequest,core 根據MSI進行相應的memory write ,完成 MSI請求。另外,你的application也可以直接通過XALI0/1/2接口完成 MSI MWr,完成MSI的發送。

   MSI有自己的capability寄存器,而發起MSI中斷,就是通過修改MSI capability寄存器的值,而修改值的方式通過 MWrrequest,發起MWr request的方式有兩種: MSI接口和XALI 0/1/2接口。


想對應的MSI-X的中斷生成機制與MSI類似。

注意:MSI接口生成MSI/MSI-Xrequest的優先級將高於通過XALI0/1/2發送的traffic

所有如果想保證順序,你必須通過XALI0/1/2接口發起MSIMSI-XMWr request

6.3.2    Interrupt Reception (DSP)

PCI Legacy Interrupts (DSP)

PCI兼容中斷機制

PCI Express Hot-Plug Logic Interrupt and Wakeup (DSP)

當MSI和MSI-X使能,Core將發起hp_msi(熱插拔中斷)直到以下事件發生:

■ Power Fault Detected

■ MRL Sensor Changed

■ Presence Detect Changed

■ Command Completed

■ Attention Button Pressed

■ Electromechanical Interlock Status Changed

■ Data Link Layer State Changed

 

6.4   Flow Control

Flow control 機制分爲兩個階段:initialization 和 update。Core會自動完成這些階段,儘可能的少的需要用戶的application參與,在默認情況下,RADM會自動反饋flowcontrol 的credit。用戶的application可以通過設置讓flow control 反饋 credit,For more details, see System Information Interface (SII) on page 248).Core 不會返回有data link error的數據包的credit。

Calculation of Initial Credits and Receive Buffer Sizes

不同類型的TLP的默認buffer Size和credit都是自動計算出來的,計算的依據是number of

lanes, the core datapath width, the maximum PCIe payload (CX_MAX_MTU), flow control update latencies,

internaldelays, and the PHY latency. For more details, see “Flow Control Credit Calculation” on page 1299.

用戶application可以通過查詢以下的logicregister來查詢不同的LTP的credit:

■ “Transmit Posted FC Credit Status” (TX_P_FC_CREDIT_STATUS)

■ “Transmit Non-Posted FC Credit Status” (TX_NP_FC_CREDIT_STATUS)

■ “Transmit Completion FC Credit Status” (TX_CPL_FC_CREDIT_STATUS)

 

6.5   Internal Address Translation Unit (iATU)

該部分介紹Core內部提供的address remap的功能,主要是爲了做地址的轉換,而其典型的應用是針對AHB/AXIapplication space 到 PCI memory space的地址轉換,針對C1目前沒有AHB/AXI,所有該部分可以先不看,瞭解即可。

1.6   PCI-SIG Address Translation Services (ATS)

不是很懂

6.7   Peer-to-Peer Support (P2P)

針對endpoint 到另個endpoint的數據交換,屬於PCIe標準範疇外,Core支持RC mode下P2P的數據交換,不過需要遵循以下原則:

■ The core distinguishes between locally generated transmittraffic and P2P traffic, and only tracks

locally generated requests in the receivecompletion LUT.

■ Only received completions corresponding to requestsoriginated by the device are subject to the

normal receive completion LUT processing.Completions of P2P requests do not reference the LUT.

■ The core preserves the original requester or completerIDs for P2P transmit traffic while

automatically adding the appropriate ID forlocally generated traffic.

■ All TLP header fields are preserved in both transmit andreceive directions. Therefore the core

provides all reserved fields at receiveinterfaces and expects your application to drive them at the

client interfaces.

■ The core optionally appends ECRC fields to locallygenerated TLPs, passing P2P traffic along without

modification.

The following limitations apply with respectto the P2P feature:

■ Receive queue architecture must be segmented-buffer.

■ No ECRC stripping.

■ The core does not split transmit packets. Yourapplication must handle this condition when the peerto-

peer packet exceeds the max payload limitation.

發佈了42 篇原創文章 · 獲贊 47 · 訪問量 22萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章