I can't find RMII specification. I don't understand how to detect ethernet collision in RMII interface.
RMII interface include this pin: txen,txd,crs_dv,rxd,rx_er .
"Collisions occur when CRS and TX_EN are simultaneously asserted. For this to work, the
PHY must ensure that CRS is not affected by its transmit path."
It is distinguished by the idle bits of the enable signal. The CRS is transmitted in the IDLE bits of the enable signal. There is a gap between two ethernet frame, so the chip could locate the postion of CRS information.
When an ethernet packet is transmitted, it is prefixed by some (16?) bits leadin. This serves two purposes: 1. the receivers can synchronise to the transmitter, and 2. if two or more nodes are transmitting, it can easily be detected on the known leadin pattern, before the (less predictable) real data starts.
I know something about this. But I haven't yet know how to solve my problem. how to detect ethernet collision in RMII interface?
can anyone explain how to use this signal 'txen,txd,crs_dv,rxd,rx_er' to detect collision? or give me some specification about rmii.
When RXER is high and Data[1..0] pattern is 10, collision occurs and the frame is abondoned. When RXER is high and Data[1..0] pattern is 01, there is symbol error in the received frame. Deeper disscussion is welcomed.
When an ethernet packet is transmitted, it is prefixed by some (16?) bits leadin. This serves two purposes: 1. the receivers can synchronise to the transmitter, and 2. if two or more nodes are transmitting, it can easily be detected on the known leadin pattern, before the (less predictable) real data starts.
As I understand you are talking about Ethernet preamble. That is nice, but collision can occur after preamble is already transmitted, during actual data transmission. In MII there is a signal MII_COL, asserting of this signal is an indication of the collision. RMII has no such signal.
Probably, asserting RMII_CRS_DV signal during transmission is such indication, but what is indication of carrier sense in this case? And how can we understand that carrier lost sense in this case?
If your node is transmitting, it doesn't need carrier sense (it knows carrier is present) so I guess RMII uses this signal as collision detect when the node is transmitting. That is exactly what the SMII stuff I posted earlier is saying, that CRS should not be asserted when the node is transmitting unless a collision is detected. Of course it is only if a node is transmitting that it needs to know about collision; all the non-transmitting nodes are seeing carrier sense so won't transmit, they aren't interested in collisions.