This section describes Ethernet port transmit events. For every packet transmitted on the Ethernet ports, the port transmit interface will begin parsing the packet to determine if it is a valid Ethernet time synchronization packet. The CPTS transmit interface for the port will use to the following criteria to determine if the packet is a valid time synchronization Ethernet transmit event. The CPSW decoder determines if the packet is a valid ethernet receive time synchronization event. To be a valid Ethernet transmit time synchronization event, the conditions listed below must be true for either Annex D, Annex E, or Annex F:
Annex D (IPv4)
- Transmit time sync is enabled (TS_TX_ANNEX_D_EN
is set in the CPSW_PN_TS_CTL_REG register).
- One of the sequences below is true.
- The first packet LTYPE matches 0x0800
- The first packet LTYPE matches TS_VLAN_LTYPE1 in
the CPSW_PN_TS_VLAN_LTYPE_REG register and TS_TX_VLAN_LTYPE1_EN is set
in the CPSW_PN_TS_CTL_REG register and the second packet LTYPE matches
0x0800
- The first packet LTYPE matches TS_VLAN_LTYPE2 in
the CPSW_PN_TS_VLAN_LTYPE_REG register and TS_TX_VLAN_LTYPE2_EN is set
in the CPSW_PN_TS_CTL_REG register and the second packet LTYPE matches
0x0800
- The first packet LTYPE matches TS_VLAN_LTYPE1 in
the CPSW_PN_TS_VLAN_LTYPE_REG register and TS_TX_VLAN_LTYPE1_EN is set
in the CPSW_PN_TS_CTL_REG register and the second packet LTYPE matches
TS_VLAN_LTYPE2 in the CPSW_PN_TS_VLAN_LTYPE_REG register and
TS_TX_VLAN_LTYPE2_EN is set in the CPSW_PN_TS_CTL_REG register and the
third packet LTYPE matches 0x0800
- Byte 14 (the byte after the LTYPE) contains 0x45 (IPv4).
Note: The byte numbering assumes that there are no VLANs. The byte number is intended to show the relative order of the bytes.
- Byte 20 contains 0bXXX00000 (5 lower bits zero) and Byte 21 contains 0x00 (fragment offset zero)
- Byte 22 contains 0x01 (HOP Limit = 1) if the
TS_TTL_NONZERO bit in the switch CPSW_PN_TS_CTL_LTYPE2_REG register is cleared
to 0h, or byte 22 contains any value if TS_TTL_NONZERO is set to 1h. Byte 22 is
the TTL/HOP field.
- Byte 23 contains 0x11 (Next Header UDP Fixed).
- The TS_UNI_EN bit in the
CPSW_PN_TS_CTL_LTYPE2_REG register is cleared to 0h and Bytes 30 through 33
contain:
- Decimal 224.0.1.129 and
the TS_129 bit in the CPSW_PN_TS_CTL_LTYPE2_REG register is set, or
- Decimal 224.0.1.130 and
the TS_130 bit in the CPSW_PN_TS_CTL_LTYPE2_REG register is set, or
- Decimal 224.0.1.131 and
the TS_131 bit in the CPSW_PN_TS_CTL_LTYPE2_REG register is set, or
- Decimal 224.0.1.132 and
the TS_132 bit in the CPSW_PN_TS_CTL_LTYPE2_REG register is set, or
- Decimal 224.0.0.107 and
the TS_107 bit in the CPSW_PN_TS_CTL_LTYPE2_REG register is set, or
- The TS_UNI_EN bit in the
CPSW_PN_TS_CTL_LTYPE2_REG register is set and Bytes 30 through 33
contain any values.
- Bytes 36 and 37 contain:
- Decimal 0x01 and 0x3F respectively and the TS_319
bit in the CPSW_PN_TS_CTL_LTYPE2_REG register is set, or
- Decimal 0x01 and 0x40 respectively and the TS_320
bit in the CPSW_PN_TS_CTL_LTYPE2_REG register is set.
- The PTP message begins in byte 42.
- The packet message type is enabled in the
TS_MSG_TYPE_EN field in the CPSW_PN_TS_CTL_REG register.
- The packet was sent by host port 0.
Annex E (IPv6)
- Transmit annex E time sync is enabled
(TS_TX_ANNEX_E_EN bit is set in the switch CPSW_PN_TS_CTL_REG register).
- One of the sequences below is true.
- The first packet LTYPE matches 0x86dd.
- The first packet LTYPE matches TS_VLAN_LTYPE1 in
the CPSW_PN_TS_VLAN_LTYPE_REG register and TS_TX_VLAN_LTYPE1_EN is set
in the CPSW_PN_TS_CTL_REG register and the second packet LTYPE matches
0x86dd
- The first packet LTYPE matches TS_VLAN_LTYPE2 in
the CPSW_PN_TS_VLAN_LTYPE_REG register and TS_TX_VLAN_LTYPE2_EN is set
in the CPSW_PN_TS_CTL_REG register and the second packet LTYPE matches
0x86dd
- The first packet LTYPE matches TS_VLAN_LTYPE1 in
the CPSW_PN_TS_VLAN_LTYPE_REG register and TS_TX_VLAN_LTYPE1_EN is set
in the CPSW_PN_TS_CTL_REG register and the second packet LTYPE matches
TS_VLAN_LTYPE2 in the CPSW_PN_TS_VLAN_LTYPE_REG register and
TS_TX_VLAN_LTYPE2_EN is set in the CPSW_PN_TS_CTL_REG register and the
third packet LTYPE matches 0x86dd
- Byte 14 (the byte after the LTYPE) contains 0x6X (IPv6).
- Byte 20 contains 0x11 (UDP Fixed Next Header).
- Byte 21 contains 0x01 (Hop Limit = 1) if the
TS_TTL_NONZERO bit in the switch CPSW_PN_TS_CTL_LTYPE2_REG register is cleared
to 0h, or byte 21 contains any value if TS_TTL_NONZERO is set to 1h. Byte 21 is
the TTL/HOP field..
- The TS_UNI_EN bit in the
CPSW_PN_TS_CTL_LTYPE2_REG register is cleared to 0 and Bytes 38 through 53
contain:
- FF0M:0:0:0:0:0:0:0181 and
the TS_129 bit in the CPSW_PN_TS_CTL_LTYPE2_REG register is set, or
- FF0M:0:0:0:0:0:0:0182 and
the TS_130 bit in the CPSW_PN_TS_CTL_LTYPE2_REG register is set, or
- FF0M:0:0:0:0:0:0:0183 and
the TS_131 bit in the CPSW_PN_TS_CTL_LTYPE2_REG register is set, or
- FF0M:0:0:0:0:0:0:0184 and
the TS_132 bit in the CPSW_PN_TS_CTL_LTYPE2_REG register is set, or
- FF0M:0:0:0:0:0:0:006B and
the TS_107 bit in the CPSW_PN_TS_CTL_LTYPE2_REG register is set
Note:
All values above
are 16-bit hex numbers where M is enabled in the
TS_MCAST_TYPE_EN field in the CPSW_PN_TS_CTL2_REG register.
-OR-
The TS_UNI_EN bit in
the CPSW_PN_TS_CTL_LTYPE2_REG register is set to 1h and Bytes 38
through 53 contain any value.
- Bytes 56 and 57 contain (UDP Header in bytes 54 through 61):
- Decimal 0x01 and 0x3F respectively and the TS_319
bit in the CPSW_PN_TS_CTL_LTYPE2_REG register is set, or
- Decimal 0x01 and 0x40 respectively and the TS_320
bit in the CPSW_PN_TS_CTL_LTYPE2_REG register is set.
- The PTP message begins in byte 62.
- The packet message type is enabled in the
TS_MSG_TYPE_EN field in the CPSW_PN_TS_CTL_REG register.
- The packet was sent by host port 0.
Annex F (IEEE 802.3)
- Transmit time sync is enabled (TS_TX_ANNEX_F_EN
is set in the switch CPSW_PN_TS_CTL_REG register).
- One of the sequences below is true:
- The first packet LTYPE matches TS_LTYPE1 in the
CPSW_PN_TS_SEQ_LTYPE_REG register. LTYPE 1 should be used when only one
time sync LTYPE is to be enabled.
- The first packet LTYPE matches TS_LTYPE2 in the
CPSW_PN_TS_CTL_LTYPE2_REG register and TS_LTYPE2_EN is set in the
CPSW_PN_TS_CTL_REG register.
- The first packet LTYPE matches TS_VLAN_LTYPE1 in
the CPSW_PN_TS_VLAN_LTYPE_REG register and TS_TX_VLAN_LTYPE1_EN is set
in the CPSW_PN_TS_CTL_REG register and the second packet LTYPE matches
TS_LTYPE2 in the CPSW_PN_TS_CTL_LTYPE2_REG register.
- The first packet LTYPE matches TS_VLAN_LTYPE2 in
the CPSW_PN_TS_VLAN_LTYPE_REG register and TS_TX_VLAN_LTYPE2_EN is set
in the CPSW_PN_TS_CTL_REG register and the second packet LTYPE matches
TS_LTYPE1 in the CPSW_PN_TS_SEQ_LTYPE_REG register.
- The first packet LTYPE matches TS_VLAN_LTYPE2 in
the CPSW_PN_TS_VLAN_LTYPE_REG register and TS_TX_VLAN_LTYPE2_EN is set
in the CPSW_PN_TS_CTL_REG register and the second packet LTYPE matches
TS_LTYPE2 in the CPSW_PN_TS_CTL_LTYPE2_REG register.
- The first packet LTYPE matches TS_VLAN_LTYPE1 in
the CPSW_PN_TS_VLAN_LTYPE_REG register and TS_TX_VLAN_LTYPE1_EN is set
in the CPSW_PN_TS_CTL_REG register and the second packet LTYPE matches
TS_LTYPE2 in the CPSW_PN_TS_CTL_LTYPE2_REG register and TS_LTYPE2_EN is
set in the CPSW_PN_TS_CTL_REG register.
- The first packet LTYPE matches TS_VLAN_LTYPE1 in
the CPSW_PN_TS_VLAN_LTYPE_REG register and TS_TX_VLAN_LTYPE1_EN is set
in the CPSW_PN_TS_CTL_REG register and the second packet LTYPE matches
TS_VLAN_LTYPE2 in the CPSW_PN_TS_VLAN_LTYPE_REG register and
TS_TX_VLAN_LTYPE2_EN is set in the CPSW_PN_TS_CTL_REG register and the
third packet LTYPE matches TS_LTYPE2 in the CPSW_PN_TS_CTL_LTYPE2_REG
register.
- The first packet LTYPE matches TS_VLAN_LTYPE1 in
the CPSW_PN_TS_VLAN_LTYPE_REG register and TS_TX_VLAN_LTYPE1_EN is set
in the CPSW_PN_TS_CTL_REG register and the second packet LTYPE matches
TS_VLAN_LTYPE2 in the CPSW_PN_TS_VLAN_LTYPE_REG register and
TS_TX_VLAN_LTYPE2_EN is set in the CPSW_PN_TS_CTL_REG register and the
third packet LTYPE matches TS_LTYPE2 in the CPSW_PN_TS_CTL_LTYPE2_REG
register and TS_LTYPE2_EN is set in the CPSW_PN_TS_CTL_REG register
- The packet message type is enabled in the
TS_MSG_TYPE_EN field in the CPSW_PN_TS_CTL_REG register.
- The packet was sent by host port 0.
If all of the criteria described above are met, and the packet is determined to be a valid time synchronization packet, then the time stamp for the transmit event will not be generated until the start of frame delimiter of the packet is actually transmitted. The start of frame delimiter will be sampled on every rising and falling edge of the CPTS_RFT_CLK. Once the packet is transmitted, then the TX interface will push an Ethernet transmit event into the event FIFO.