AM263Px MCU+ SDK: Ether-Ring Overview

| AM263Px MCU+ SDK 26.00.00 |

Ether-Ring Overview

Ether-Ring functionality is achieved using hardware configuration with assistance of software. The 3 main components are

- Packet Duplication - Inter-vlan Routing(Hardware Configuration)
- Duplicate Packet Rejection - Software assistance
- Ring Termination - Hardware Configuration

# Software Architecture

# CAN to Ethernet Traffic Simulation

## Software Assistance:

- Interrupt and Polling Configuration: Disabled Packet Transmission Complete Interrupt and Packet Reception Interrupt to reduce interrupt overhead. Implemented periodic polling for packet reception to ensure timely processing.
- Timer Synchronization: Synchronized timer clock source with 802.1AS to reduce drift in timer periodic interrupts.
- Pulse Generation Configuration: Configured pulse generation to start before the 802.1Qbv gate opens to ensure accurate and timely pulse generation.

# Packet Duplication on Transmission

- Inter-VLAN routing: Routes VLAN Tag1 packet to VLAN Tag2 to duplicate packets in both directions.
- VLAN routing configuration: Configured on both MAC ports to egress packets with updated VLAN tags.
- 802.1Q Packet Duplication: Uses Inter-VLAN routing feature to duplicate packets and send them in both clockwise and anti-clockwise directions in the Ring Network.
- Address Lookup Engine(ALE): Determines Inter-VLAN egress opcode for each packet to be VLAN routed.
- Classifier/Policer configuration: Configured for the route to modify VLAN tags and duplicate Ethernet packet on both MAC ports.

# Software Assistance on Transmission side

- Adds custom header using Zero-copy which helps to reject the duplicate packets on receiver zonal controller
- Generating Ethernet packet with non continuous buffers for Header addition.

# Software Assistance on Reception side

- Removes Custom Header on the receiver end after detecting and deleting duplicate packets coming from other direction, ensuring clean and original packet delivery
- Generating Ethernet packet with non continuous buffers for Header addition.

# Duplicate packet Rejection on Reception side(Duplicate Packet Rejection)

- Packet Detection Flow: SequenceID-based duplicate detection using per-node state tracking. Each node maintains last accepted sequence number and 64-bit history bitmap.
- Per-node State: Tracks recSeqNum (last accepted sequence), seqHistory (64-bit bitmap), and initialization flag for each data stream identified by MAC address.
- Five Detection Cases:
  1. In-Order/Future Packet (seqDiff > 0) - Accept and shift window forward
  2. Out-of-Order Within Window (seqDiff < 0) - Check bitmap for prior receipt
  3. Too Old/Beyond Window - Reject as stale duplicate
  4. Exact Duplicate (seqDiff = 0) - Reject immediate duplicate
  5. Large Forward Gap - Reject as potential desynchronization
- Wraparound Handling: 8-bit sequence numbers wrap at 256 with signed arithmetic boundary adjustment.
- Statistics Tracking: Maintains counts for original packets, duplicates rejected, and out-of-order packets accepted.