PCIE协议解析 synopsys IP Core 读书笔记(2)

1      Overview


图1

如上图为整个PCIE的框架,在C1中PIPE-CompliantPHY部分的SERDES模块,DWC PCIe Core为synopsys提供的IP,而黄色部分为用户需要完成的部分,主要包括参数的配置和数据的发送和接收。

2      Architecture


图2

该IP包含4个重要的模块,CXPL、RADM、XADM、CDM。

Ø  Common ExpressPort Logic (CXPL) Module:

整个协议的核心部分,包含了物理层、数据链路层的全部功能、同时包含了传输层大部分的功能。其中包含了一个重要的缩写,LTSSM(link training and statues state machine),在后面的文档中将重复出现,link training的目的在于完成链路的链接。

Ø  TransmitApplication-Dependent Module (XADM):

面向数据包发送的应用模块,主要包括以下3个功能:

l  TLP(Transaction Layer Packet)arbitration

l  TLP formation

l  Flow control creditchecking

   该模块内部为直接转发的结构,除了重发的缓存区外,内部没有发送的缓存区。

Ø  ReceiveApplication-Dependent Module (RADM):

面向数据包接收的应用模块,主要包括以下3个功能:

l Sorting/filtering of received TLPs. The filtering rules and routing areconfigurable.

l  Buffering and queuing ofthe received TLPs.

l  Routing of received TLPto the core’s receive interfaces.

Ø  Configuration-DependentModule (CDM):

功能:

l  Standard PCI Express configuration space

l  Core-specific register space (Port Logic Registers)

其他相关的模块:

Ø  Power ManagementController (PMC)

Ø  Local BusController (LBC) and Data Bus Interface (DBI)

The LBC module providesa mechanism for a link partner (in EP mode only) or a local CPU (through

the DBI) to access:

l  Internal registers (in the CDM)

l  External applicationregisters connected externally to the ELBI

Ø  MessageGeneration Module (MSG_GEN)

Ø  Hot Plug ControlModule (HOT PLUG)

如图3所示,可以非常清晰的看到内部各个模块间的关系,而作为用户,不需要与CXPL直接做数据交互,而需要关心的内容主要是与RADM、LBC、CDM、XADM、MSG_GEN、PMC的数据交换,以及与之交互的一大堆的接口。下面从图中的上往下介绍各个接口的作用和意义。

■“Receive Bypass Interface (RBYP)” on page 233

■“Receive Request Interface (TRGT1)” on page 234

■“Data Bus Interface (DBI)” on page 240

■ “External Local Bus Interface (ELBI)” on page 238

■ “Message Signaled Interrupt (MSI) Interface”on page 242

■ “MSI-X Interface” on page 243

■ “Transmit Interfaces (XALI0/1/2)” on page 22

■ “Vendor Message Interface (VMI)” on page 247

■ “System Information Interface (SII)” on page 248

作为用户,我认为需要知道以上各个接口的作用和用法,并且知道每个接口需要在整个传输中扮演的角色,而在IP生成后,也许部分接口用户不需要知道,但是在C1 bring up阶段,每个接口的具体作用应该都是必须要明白的。


 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

图3

 

 

 

 

3      Core operation

3.1   Initialization

1、  先disable link training

2、  通过DBI(data bus interface)配置core的stickyregisters,需要配置什么目前不知道??????

3、  Enable link training

4、  等待link完成。

5、  root Complex枚举Downstream Device(什么是Downstreamdevice????)

Ø  读取 Downstream device的配置空间

Ø  配置device的capabilites(具体配置什么???)

Ø  配置switch ports(???) 的base和limit寄存器,以反映devices enumerated downstream的BAR(Base Address Register)的范围。

Ø  配置endpoint的BAR。

(该部分是用户完成,还是IP自动完成????????)

6、  使能BME、MSE、ISE。

7、  开始传输数据。