PCIE协议解析 synopsys IP DBI and LBC 读书笔记(6)

来源:互联网 发布:淘宝迪奥正品店 编辑:程序博客网 时间:2024/06/04 18:49

6.1   Data Integrity

为了保证数据的完整性,系统在不同的节点采用了不同的措施,主要包括:

“Wire Protection (ECRC)” on page94

“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, seeSystem 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.

0 0