PCIe總線DMA高速傳輸系統的設計與實現
電子技術應用
劉佳寧,單偉,劉金鵬
中國電子科技集團公司第五十八研究所,江蘇 無錫 214035
摘要: 針對數據傳輸系統中外設帶寬受限、有效帶寬低的問題,設計了一種PCIe總線的DMA高速傳輸系統。以FPGA為控制核心,采用PIO操作與DMA操作分時組合的控制模式實現全雙工DMA讀寫通道的傳輸層協議。PIO操作配合中斷實現指令與狀態實時收發,DMA模塊設計了一種兩段式切片的裁剪機制實現PCIe協議的傳輸長度控制,發送模塊設計請求仲裁邏輯實現請求事務的優先級仲裁,接收模塊采用本地緩存TAG標號的方法實現請求回應的實時管理并解決回應亂序問題。最后通過時鐘計數的方法測試傳輸速度,分析了影響讀寫傳輸速度的制約因素。經驗證,DMA寫操作有效帶寬已經達到75%,非常接近80%的理論極限,DMA讀操作也達到了60%。本設計解決了高速數據傳輸系統中的帶受限寬問題,具有一定的工程應用價值。
中圖分類號:TP393 文獻標志碼:A DOI: 10.16157/j.issn.0258-7998.233808
中文引用格式: 劉佳寧,單偉,劉金鵬. PCIe總線DMA高速傳輸系統的設計與實現[J]. 電子技術應用,2023,49(12):85-89.
英文引用格式: Liu Jianing,Shan Wei,Liu Jinpeng. Design and implementation of DMA high-speed transmission system based on PCIe[J]. Application of Electronic Technique,2023,49(12):85-89.
中文引用格式: 劉佳寧,單偉,劉金鵬. PCIe總線DMA高速傳輸系統的設計與實現[J]. 電子技術應用,2023,49(12):85-89.
英文引用格式: Liu Jianing,Shan Wei,Liu Jinpeng. Design and implementation of DMA high-speed transmission system based on PCIe[J]. Application of Electronic Technique,2023,49(12):85-89.
Design and implementation of DMA high-speed transmission system based on PCIe
Liu Jianing,Shan Wei,Liu Jinpeng
China Electronics Technology Group Corporation 58th Research Institute, Wuxi 214035, China
Abstract: According to the issue of limited and low-effective peripheral bandwidth in transmission system, this paper designs a DMA high-speed transmission system based on PCIe. Taking FPGA as control unit, the transaction layer protocol of full duplex DMA read and write channels is realized with the time-sharing control method which combined PIO and DMA. Then PIO receives the instructions and translates real-time status information, DMA controller takes charge of the transfer size with a two-section-slice clipping mechanism, transmit engine arbitrates all of the requests according to the priority logic, receive engine performs real-time management of completion packet by caching the TAG label, and solves out-of-order problem. At last, the transmission speed is tasted by means of clock counter, and the restriction factors affecting read/write transmission speed are analyzed. By the practical verification, the effective bandwidth of DMA write has reached 75%, which is very close to the theoretical limit of 80%, and DMA read effective bandwidth has also reached 60%. The design solved the problem of bandwidth limitation in high-speed transmission system, and affords certain engineering application value.
Key words : PCIe bus;DMA;two-section slice;request arbitration;out-of-order
0 引言
隨著信息技術的不斷發展,通信系統對數據傳輸帶寬的要求也越來越高。作為系統內部數據交互的橋梁,IO總線是決定整個系統傳輸帶寬和處理性能的關鍵[1]。
傳統的第二代IO總線以PCI和PCI-X總線為代表,其特點是時鐘頻率較低,數據總線并行傳輸,在傳輸速度和硬件成本等方面制約了PCI總線的整體帶寬[2],且由于總線共享,單一外設無法長時間占用總線,進一步限制了總的傳輸速率[3]。新興的第三代IO總線PCI Express(PCIe)總線解決了上述問題。PCIe總線采用點到點串行差分結構,所有外設設備通過獨立通道實現互聯[4],因此所有外設單獨使用總線通道的所有帶寬,且各設備間可以并發傳輸互不影響[5],因此系統的整體性能得到有效提升,解決了高速數據傳輸的吞吐量問題。在現代通信領域,PCIe總線的使用前景十分廣闊。
本文設計了一種基于PCIe總線架構的高速數據傳輸系統,考慮到PCIe協議的復雜性,可以使用協議芯片簡化設計[6],本文則使用Xilinx官方提供的軟核作為PHY模塊實現PCIe鏈路層協議,同時利用FPGA豐富的邏輯資源和緩存資源設計頂層應用模塊,完成PCIe協議包的收發,實現 PCIe板卡的完整協議。最后聯合上層軟件控制程序和底層驅動構成完整的閉環傳輸測試系統,為同類型數據傳輸系統的工程應用提供了設計參考。
本文詳細內容請下載:http://www.viuna.cn/resource/share/2000005811
作者信息:
劉佳寧,單偉,劉金鵬
(中國電子科技集團公司第五十八研究所,江蘇 無錫 214035)
此內容為AET網站原創,未經授權禁止轉載。