CR
SCR
ALE
CPSW_FIFO
CPSW_FIFO
CPSW_FIFO
CPTS
STATS
CPGMAC_SL
CPGMAC_SL
RX_FIFO_DB
TX_FIFO_DB
CPDMA
EVNT_PEND
GMII_1
GMII_0
RX
TX
RX_PEND
TX_PEND
HOST_PEND
STAT_PEND
Functional Description
Figure 14-6. CPSW_3G Block Diagram
14.3.2.1 Media Independent Interface (GMII)
The CPSW_3G contains two CPGMAC_SL submodules. Each CPGMAC_SL has a single GMII interface.
The CPGMAC_SL submodules are ports 1 and 2. For more details, see
, Ethernet Mac
Sliver (CPGMAC_SL).
14.3.2.2 IEEE 1588v2 Clock Synchronization Support
The CPSW_3G supports IEEE 1588v2 clock synchronization. Ethernet GMII Transmit (egress) and
receive (ingress) time sync operation are also supported.
14.3.2.2.1 IEEE 1588v2 Receive Packet Operation
There are two CPSW_3G receive time sync interfaces for each ethernet port. The first is the TS_RX_MII
interface and the second is the TS_RX_DEC interface. Both interfaces are generated in the switch and
are input to the CPTS module. There are register bits in the CPSW_3G that control time sync operations
in addition to the registers in the CPTS module. The pX_ts_rx_en bit in the switch Px_Control register
must be set for receive time sync operation to be enabled (TS_RX_MII).
The TS_RX_MII interface issues a record signal (pX_ts_rx_mii_rec) along with a handle
(pX_ts_rx_mii_hndl[3:0]) to the CPTS controller for each packet that is received. The record signal is a
single clock pulse indicating that a receive packet has been detected at the associated port MII interface.
The handle value is incremented with each packet and rolls over to zero after 15. There are 16 possible
handle values so there can be a maximum of 16 packets “in flight” from the TS_RX_MII to the
TS_RX_DEC block (through the CPGMAC_SL) at any given time. A handle value is reused (not
incremented) for any received packet that is shorter than about 31 octets (including preamble). Handle
reuse on short packets prevents any possible overrun condition if multiple fragments are consecutively
received.
The TS_RX_MII logic is in the receive wireside clock domain. There is no decode logic in the TS_RX_MII
to determine if the packet is a time sync event packet or not. Each received packet generates a record
signal and new handle. The handle is sent to the CPTS controller with the record pulse and the handle is
also sent to the TS_RX_DEC block along with the packet. The packet decode is performed in the
TS_RX_DEC block. The decode function is separated from the record function because in some systems
the incoming packet can be encrypted. The decode function would be after packet decryption in those
systems.
1182
Ethernet Subsystem
SPRUH73H – October 2011 – Revised April 2013
Copyright © 2011–2013, Texas Instruments Incorporated