Functional Description
The TS_RX_DEC function decodes each received packet and determines if the packet meets the time
sync event packet criteria. If the packet is determined to be a time sync event packet, then the time sync
event packet is signaled to the CPTS controller via the TS_RX_DEC interface (pX_ts_rx_dec_evnt,
pX_ts_rx_dec_hndl[3:0], pX_ts_rx_dec_msg_type, pX_ts_rx_dec_seq_id). The event signal is a single
clock pulse indicating that the packet matched the time sync event packet criteria and that the associated
packet handle, message type, and sequence ID are valid. No indication is given for received packets that
do not meet the time sync event criteria. The 16-bit sequence ID is found in the time sync event packet at
the sequence ID offset into the PTP message header (pX_ts_seq_id_offset). A packet is determined to be
a receive event packet under the following conditions:
14.3.2.2.1.1 Annex F
1. Receive time sync is enabled (pX_ts_rx_en is set in the switch Px_Control register).
2. One of the following sequences is true:
Where the first packet ltype matches:
•
ts_ltype1 and pX_ts_ltype1_en is set
•
ts_ltype2 and pX_ts_ltype2_en is set
•
vlan_ltype1 and pX_vlan_ltype1_en is set and the second packet ltype matches ts_ltype1 and
pX_ts_ltype1_en is set
•
vlan_ltype1 and pX_vlan_ltype1_en is set and the second packet ltype matches ts_ltype2 and
pX_ts_ltype2_en is set
•
vlan_ltype2 and pX_vlan_ltype2_en is set and the second packet ltype matches ts_ltype1 and
pX_ts_ltype1_en is set
•
vlan_ltype2 and pX_vlan_ltype2_en is set and the second packet ltype matches ts_ltype2 and
pX_ts_ltype2_en is set
•
vlan_ltype1 and pX_vlan_ltype1_en is set and the second packet ltype matches vlan_ltype2 and
pX_vlan_ltype2_en is set and the third packet ltype matches ts_ltype1 and pX_ts_ltype1_en is set
•
vlan_ltype1 and pX_vlan_ltype1_en is set and the second packet ltype matches vlan_ltype2 and
pX_vlan_ltype2_en is set and the third packet ltype matches ts_ltype2 and pX_ts_ltype2_en is set
3. The PTP message begins in the byte after the LTYPE.
4. The packet message type is enabled in the pX_ts_msg_type_en field in the Px_TS_SEQ_MTYPE
register.
5. The packet was received without error (not long/short/mac_ctl/crc/code/align).
6. The ALE determined that the packet is to be sent only to the host (port 0).
14.3.2.2.1.2 Annex D
1. Receive time sync is enabled (pX_ts_rx_en is set in the switch Px_Control register).
2. One of the following sequences is true:
Where the first packet ltype matches:
•
0x0800 and pX_ts_annex_d_en is set
•
vlan_ltype1 and pX_vlan_ltype1_en is set and the second packet ltype matches 0x0800 and
pX_ts_annex_d_en is set
•
vlan_ltype2 and pX_vlan_ltype2_en is set and the second packet ltype matches 0x0800 and
pX_ts_annex_d_en is set
•
vlan_ltype1 and pX_vlan_ltype1_en is set and the second packet ltype matches vlan_ltype2 and
pX_vlan_ltype2_en is set and the third packet ltype matches 0x0800 and pX_ts_annex_d_en is set
3. Byte 14 (the byte after the LTYPE) contains 0x45 (IP_VERSION).
Note: The byte numbering assumes that there are no vlans. The byte number is intended to show the
relative order of the bytes.
4. Byte 22 contains 0x00 if the pX_ts_ttl_nonzero bit in the switch Px_Control register is zero or byte 22
contains any value if pX_ts_ttl_nonzero is set. Byte 22 is the time to live field.
1183
SPRUH73H – October 2011 – Revised April 2013
Ethernet Subsystem
Copyright © 2011–2013, Texas Instruments Incorporated