SPRUIL1D May 2019 – December 2024 DRA829J , DRA829J-Q1 , DRA829V , DRA829V-Q1 , TDA4VM , TDA4VM-Q1
The CPSW2G has a single transmit packet streaming interface. All Ethernet packet data destined for the host (Port 0) is transferred on the transmit packet streaming interface. The transmit packet streaming interface is equivalent to an Ethernet MAC output with the difference being that 128-bit streaming interface data is output. Egress packet data is packed on the 128-bit data bus with all words having 16-bytes except possibly the last packet data word which is the word previous to the EOP word. INFO Word 0–3 is transferred on SOP. The EOP word contains the packet status 0–3 (data type 24) which includes the timestamp and checksum data. Packets are not dropped on the transmit streaming interface due to pushback, but packets may be dropped in the associated priority FIFO.
INFO Word 0–3 and Status Data Word 0–3 (on EOP) are the only non-payload data word types that are transferred. Long packets are truncated at the CPSW_PN_RX_MAXLEN_REG[13-0] RX_MAXLEN byte value of the ingress port (only the CPSW_PN_RX_MAXLEN_REG number of bytes are kept if long packets are transferred due to CPSW_PN_MAC_CONTROL_REG register copy error frames set - RX_CEF_EN). MAC control frames are only transferred if the receiving Ethernet port has the CPSW_PN_MAC_CONTROL_REG[24] RX_CMF_EN bit set.
The error encoding on the TXST_PKT_ERR[3:0] output is shown in Table 12-193.
TXST_PKT_ERR[3:0] | Description |
---|---|
0000 | No Error |
0001 | CRC Error |
0010 | Code or alignment error |
0011 | Short (no code/align/crc error) |
0100 | FragCRC (short with crc error) |
0101 | Frag Code/Align (short with code/align error) |
0110 | Long |
0111 | Jabber CRC (long with crc error) |
1000 | Jabber Code/Align (long with code/align error) |
1001 | Mac ontrol packet (CPSW_PN_MAC_CONTROL_REG[24] RX_CMF_EN set on ingress Ethernet port) |
1010 | Mac control CRC |
1011 | Mac control Code/Align |
1100 | Mac control short/frag (short MAC control frame with CRC/Code/Align) |
1101 | Mac control long/jabber (long MAC control frame with CRC/Code/Align) |
1110 | Reserved |
1111 | Reserved |
The CPPI Port 0 transmit packet streaming interface has a single output thread. If a packet transmission has begun then the entire packet will be transmitted before the next packet is sent (packet data from multiple packets are not interleaved on the transmit streaming interface). The default egress flow is the port number minus 1, concatenated with the 3-bit Port 0 transmit FIFO hardware switch priority. For example, a packet that was received on port 4 with a Port 0 transmit FIFO hardware switch priority of 5 would be sent on flow 29 (decimal) or flow 0b0011101 (binary). Priority remapping on ingress and Port 0 transmit egress effects the output flow.
INFO Words () are a contiguous block of four 32-bit data words aligned on a 32-bit word boundary.
31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
PKT_TYPE | RESERVED | PASS_CRC | CRC_TYPE | RESERVED | |||||||||||
15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
RESERVED | FLOW_ID |
Bit | Field | Description |
---|---|---|
31-27 | PKT_TYPE | Always set to 0b00111. Host PD (Packet Descriptor) Word 2. Packet Type: bits[31-27]. |
26-24 | RESERVED | Reserved. |
23 | PASS_CRC | This bit is cleared to zero (no CRC passed) when the P0_TX_CRC_REMOVE bit in the CPSW_CONTROL_REG register is set (and the egress packet has no errors). When the remove bit is cleared to zero then this bit is cleared and no CRC is passed with the output packet. The packet length includes the CRC if it is present. |
22 | CRC_TYPE | The packet CRC type. The type of CRC passed is determined by CRC_TYPE field in the CPSW_PN_MAC_CONTROL_REG register (not by the type of CRC the packet had on Ethernet port ingress). Host PD Word 1. Protocol Specific Flags: bits[27-24]. 0h: Ethernet CRC 1h: Castagnoli CRC |
21-8 | RESERVED | Reserved. |
7-0 | FLOW_ID | This is the packet output transmit streaming interface flow. The default flow ID can be overridden by ALE classification (Thread mapping). The switch default flow is the 3-bit “From Port” value concatenated with the 3-bit “Switch Priority” {From_Port[2:0], Switch_Priority[2:0]} as shown below: Host PD (Packet Descriptor) Word 1. Flow ID: bits[13-0]. 0h: The packet was received on Ethernet port 1 Switch Priority – The actual hardware switch priority that the packet was stored in on the CPPI transmit FIFO. |
31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
0x4 (fixed_ps_size) | 0 | ||||||||||||||
15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
0 | PKT_LENGTH |
Bit | Field | Description |
---|---|---|
31-20 | FIXED_PS_SIZE | Fixed packet size: 0x4 |
19-14 | RESERVED | Reserved. |
13-0 (Host PD (Packet Descriptor) Word 1. Packet Length: bits[ 21-0]) | PKT_LENGTH | Specifies the number of bytes in the entire packet. Offset bytes are not included. Valid only on SOP. The packet length must be greater than zero. The packet data will be truncated to the packet length if the packet length is shorter than the sum of the packet buffer descriptor buffer lengths. A host error occurs if the packet length is greater than the sum of the packet buffer descriptor buffer lengths. |
31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
0 | |||||||||||||||
15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
0xFFFF |
31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
0 | SRC_ID | ||||||||||||||
15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
0 |
Bit | Field | Description |
---|---|---|
31-24 | RESERVED | Reserved. |
23-16 | SRC_ID | The packet SRC_ID value comes from the PORT1 field in the CPSW_P0_SRC_ID_A_REG register. (src_tag) PD (Packet Descriptor) Word 3. Source Tag Low bits[23-16] if RFLOW[a]_RFC.rx_src_tag_lo_sel = 0x4 or (src_tag) PD (Packet Descriptor) Word 3. Source Tag High bits[31-24] if RFLOW[a]_RFC.rx_src_tag_hi_sel = 0x4 |
15-0 | RESERVED | Reserved. |
TX Status Data Word [0..3] are mapped to Host Packet Descriptor Protocol Specific Words if RFLOW[a]_RFA.rx_psinfo_present = 1 and RFLOW[a]_RFA.rx_ps_location = 0
31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
TIMESTAMP[31:0] | |||||||||||||||
15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
TIMESTAMP[31:0] |
Bit | Field | Description |
---|---|---|
31-0 | TIMESTAMP[31:0] | Contains the lower 32-bits of the time stamp value. |
31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
TIMESTAMP[63:32] | |||||||||||||||
15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
TIMESTAMP[63:32] |
Bit | Field | Description |
---|---|---|
31-0 | TIMESTAMP[63:32] | Contains the upper 32-bits of the time stamp value. |
31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
RESERVED | IPV4_VALID | IPV6_VALID | TCP_UDP_N | FRAGMENT | CHECKSUM_ERROR | ||||||||||
15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
CHECKSUM_ADD |
Bit | Field | Description |
---|---|---|
31-21 | RESERVED | Reserved. |
20 | IPV4_VALID | An IPV4 TCP or UDP Packet was detected. |
19 | IPV6_VALID | An IPV6 TCP or UDP Packet was detected. |
18 | TCP_UDP_N | Valid only when either the IPV4_VALID or IPV6_VALID bits are set. 0h: Indicates UDP packet was detected. 1h: Indicates TCP packet was detected. |
17 | FRAGMENT | Indicates that an IP fragment was detected. Valid only when when either the IPV4_VALID or IPV6_VALID bits are set. |
16 | CHECKSUM_ERROR | Valid only when either the IPV4_VALID or IPV6_VALID bits are set. |
15-0 | CHECKSUM_ADD | This is the value that was summed during the checksum computation. This value is FFFFh for IPV4/6 UDP/TCP packets with no checksum error. |
31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
0 | |||||||||||||||
15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
0 |
Bit | Field | Description |
---|---|---|
31-0 | RESERVED | Reserved. |