2012年11月21日 星期三

PCIe

PCI Express (PCIe, PCI-E)
  • 以序列點對點匯流排取代之前 PCI、PCI-X、AGP 的並列共享匯流排,但軟體跟 PCI 相容。PCI 取代 ISA、VESA,是 multi-master。
  • 一組序列點對點匯流排稱為 lane (通道),包含傳跟收的差動訊號共四條線。一個 PCIe 插槽可有 2n lanes,0 ≤ n ≤ 5。
  • PCIe Gen 3 每個通道大約會轉換為 1 GB/s。PCIe Gen 4 每個通道大約會轉換 2 GB/s,可向下相容。
  • M.2。https://www.kingston.com/tw/community/articledetail/articleid/48543
  • M.2 介面的 SSD 有 PCIe NVMe 和 SATA3 兩種規格,PCIe 又有 3.0 和 4.0 的差異。
PCI Express Mini Card (Mini PCIe)
  • 插槽除了電源外,可包含 PCIe lane、USB 2.0、SMBus、SIM Card、LED 等介面。
  • 接頭也用在 mSATA
Express Card
  • 跟 MiniPCIe 類似,一樣包含 PCIe lane、USB 2.0 介面。其前身 CardBus 是 32-bit @33MHz PCI 介面 (3.3V 電源),再前身 PCMCIA Card (PC Card) 是 16-bit ISA 介面。

miniPCI: PCI, 2W max. (Mini PCIe 取代)
cPCI (CompactPCI): PCI 背板含 PCI bus 及其他自訂的訊號,如電話、網路等。

M.2 是電腦內部擴充卡連接的規格。

  • M.2 取代 mSATA。
  • 搭配更先進的界面 features,比 mSATA 更適合 SSD
  • 界面可以有 PCI Express 達 4 通道、SATA 3.0、和 USB 3.0 (a single logical port for each of the latter two),取決於主機和模組要支援什麼界面,不同 keying notches 來避免模組插到不相容的主機連接器。
  • SSD 邏輯界面支援傳統 SATA 的 Advanced Host Controller Interface (AHCI) 和 PCIe 的 NVM Express (NVMe)。NVMe 能進行平行 IO 來完整利用高速 PCIe 儲存裝置的能力。
YearSpec.Frequency/SpeedBandwidth
1992PCI33 MHz133 MB/s (32-bit simplex)
1993PCI 2.066 MHz533 MB/s (64-bit simplex)
1999PCI-X133 MHz1.06 GB/s (64-bit simplex)
2002PCI-X 2.0266 MHz2.13 GB/s (64-bit simplex)
2002PCIe 1.x2.5 GHz2 Gb/s (x16 duplex 8GB/s)
2006PCIe 2.x5 GHz 4 Gb/s (x16 duplex 16GB/s)
2010PCIe 3.x8.0 GHz 8 Gb/s (x16 duplex 32GB/s)
2017PCIe 4.x16.0 GT/s 128/130 編碼16 Gb/s (x16 duplex 64GB/s)
2019PCIe 5.x32.0 GT/s 128/130 編碼32 Gb/s (x16 duplex 128GB/s)

PCI device 的定址包括 8-bit bus、5-bit device (32 個)、及 3-bit function (8 個)。每個 PCI 系統可以有 256 PCI buses,bus 間透過 PCI bridge 連接。
  • ID: domain (16-bit) + bus (8-bit) + device (5-bit) + function (3-bit)
  • per device configuration space
  • per bus memory-mapped space
    • cached or uncached
  • per bus IO-mapped space
    • 會有附帶動作, uncached
  • interrupt: 4 interrupt pins per PCI slot
    • interrupt lines are shareable and the routing to CPU is platform dependent.
每個 PCI function 的 configuration space 包含 256 bytes (PCI Express 有 4 KB), 須透過特別的 kernel 函數存取
  • standardized layout
  • First 64-byte is standardized
  • Little-endian
  • 4B unique function ID
  • Access: read and write registers of PCI controller (vendor dependent)
  • /proc/bus/pci/devices
  • /proc/bus/pci/*/* : binary
  • /sys/bus/pci/devices

參考

  1. https://en.wikipedia.org/wiki/M.2
  • Linux Device Drivers 3rd Edition, Chapter 12 PCI Driver

沒有留言:

張貼留言

SIP header Via

所有 SIP 訊息 都要有 Via,縮寫 v。一開始的 UAC 和後續途經的每個 proxy 都會疊加一個 Via 放傳送的位址,依序作為回應的路徑。 格式 sent-protocol sent-by [ ;branch= branch ][ ; 參數 ...] s...