MII(media-independent interface)提供了MAC(media access control)與PHY(Ethernet physical layer)之間的互聯技術,該介面支持10Mb/s與100Mb/s的數據傳輸速率,數據傳輸的位寬為4位。MDIO(Management... ...
MII(media-independent interface)提供了MAC(media access control)與PHY(Ethernet physical layer)之間的互聯技術,該介面支持10Mb/s與100Mb/s的數據傳輸速率,數據傳輸的位寬為4位。MDIO(Management Data Input/Output)是一個兩線串列管理匯流排,可掛載32個設備,MII中使用它實現對PHY的管理。
MII
以前的10M的MAC層晶元和物理層晶元之間傳送數據是通過一根數據線來進行的,其時鐘是10M。在100M中,如果也用一根數據線來傳送的話,時鐘需要100M,這會帶來一些問題,所以定義了MII介面,它是用4根數據線來傳送數據的,這樣在傳送100M數據時,時鐘就會由100M降低為25M,而在傳送10M數據時,時鐘會降低到2.5M,這樣就實現了10M和100M的相容。
MII介面主要包括四個部分。一是從MAC層到物理層的發送數據介面,二是從物理層到MAC層的接收數據介面,三是從物理層到MAC層的狀態指示信號,四是MAC層和物理層之間傳送控制和狀態信息的MDIO介面,共18根信號線。如下圖所示,除MDIO以外(未畫出控制信號)的典型數據信號介面圖:
Signal | Description |
---|---|
TXD0~3 | Transmit Data. parallel data signals that are driven by the MAC |
TX_EN | Transmit Enable. The MAC asserts this signal when it drives valid data on TXD |
TX_CLK | Transmit Clock. TX_CLK is sourced by the PHY in both 10 and 100 Mbps operations.2.5 MHz for 10 Mbps operation, 25 MHz for 100 Mbps operation. |
RXD0~3 | Receive Data. RXD is a bundle of parallel signals that transition synchronously with respect to the RX_CLK |
RX_DV | Receive Data Valid. The PHY asserts this signal when it drives valid data on RXD |
RX_ER | Receive Error. Signals a receive error condition has occurred |
TX_ER | Transmit Error. Signals a transmit error condition |
RX_CLK | Receive Clock. 25 MHz for 100 Mbps operation, 2.5 MHz for10 Mbps operation |
COL | Collision Detected. The PHY asserts this output when acollision is detected |
CRS | Carrier Sense. During half-duplex(半雙工)operation,the PHY asserts this output when either transmitting or receiving data packets. During full-duplex operation , CRS is asserted only during receive |
MDIO
MDIO屬MII的管理介面。有兩根線(MDIO for data, MDC for clock)。主要用來實現MAC對PHY的控制管理。
讀時序
寫時序
幀格式
R/W | PRE | ST | OP | PHYAD | REGAD | TA | DATA | IDLE |
---|---|---|---|---|---|---|---|---|
READ | 1...1 | 01 | 10 | AAAAA | RRRRR | Z0 | DDDDDDDDDDDDDDDD | Z |
WRITE | 1...1 | 01 | 01 | AAAAA | RRRRR | 10 | DDDDDDDDDDDDDDDD | Z |
References
Copyright (C) 2016 archiexie@cnblogs. All Rights Reserved.