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:

整個協議的核心部分,包含了物理層、數據鏈路層的全部功能、同時包含了傳輸層大部分的功能。其中包含了一個重要的縮寫,LTSSMlink 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、  開始傳輸數據。

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