This example demonstrates Time-Aware Shaper functionality on ICSSG Switch and Dual-MAC peripherals.
Below shows the configuration used for the Time Aware Shaper which is used to configure each MAC port in AM64xx device.
==========================
ENET ICSSG TAS TEST
==========================
Init Enet's OSAL and utils to use defaults
Init memory utils
Create clock and task for periodic tick
Create periodic tick task
Create periodic tick clock
Open Main UDMA driver
Init all peripheral clocks
----------------------------------------------
Enabling clocks!
Init all configs
----------------------------------------------
icssg1: init config
Open all peripherals
----------------------------------------------
icssg1: Open enet
icssg1: Register async IOCTL callback
icssg1: Register TX timestamp callback
Attach core id 1 on all peripherals
----------------------------------------------
icssg1: Attach core
Create RX tasks
----------------------------------------------
icssg1: Create RX task
icssg1: Open port 1
icssg1: Open port 1 link
EnetPhy_bindDriver: PHY 15: OUI:080028 Model:0f Ver:01 <-> 'dp83869' : OK
icssg1: Open port 2
icssg1: Open port 2 link
EnetPhy_bindDriver: PHY 3: OUI:080028 Model:0f Ver:01 <-> 'dp83869' : OK
icssg1: Waiting for link up...
Enet Multiport Menu:
'T' - Start the TAS test with default config
's' - Print statistics
'r' - Reset statistics
'x' - Stop the test
Icssg_handleLinkUp: icssg1: Port 2: Link up: 1-Gbps Full-Duplex
Icssg_handleLinkUp: icssg1: Port 1: Link up: 1-Gbps Full-Duplex
icssg1: Port 1 link is up
icssg1: Set port state to 'Forward'
icssg1: Async IOCTL completed
icssg1: Async IOCTL completed
icssg1: Port 2 link is up
icssg1: Set port state to 'Forward'
icssg1: Async IOCTL completed
icssg1: Async IOCTL completed
icssg1: Open DMA
initQs() txFreePktInfoQ initialized with 8 pkts
icssg1: Set MAC addr: 70:ff:76:1d:92:c1
icssg1: MAC port addr: 70:ff:76:1d:92:c1
Invalid option, try again...
Enet Multiport Menu:
'T' - Start the TAS test with default config
's' - Print statistics
'r' - Reset statistics
'x' - Stop the test
T
Success: IOCTL command sent for making MAC entry in FDB
icssg1: Async IOCTL completed
Success: IOCTL command sent for making MAC entry in FDB
icssg1: Async IOCTL completed
EnetMod_ioctl: icssg1-1.tas: Failed to do IOCTL cmd 0x01000b03: 1
icssg1: Async IOCTL completed
icssg1: Async IOCTL completed
EnetMod_ioctl: icssg1-1.tas: Failed to do IOCTL cmd 0x01000b01: 1
icssg1: Async IOCTL completed
icssg1: Async IOCTL completed
EnetMod_ioctl: icssg1-1.tas: Failed to do IOCTL cmd 0x01000b03: 1
icssg1: Async IOCTL completed
icssg1: Async IOCTL completed
Transmitting 16 packets
Packet 0 is within window timestamp : 3352 window_start : 0 window_end : 62500
Packet 1 is within window timestamp : 932 window_start : 0 window_end : 62500
Packet 2 is within window timestamp : 65588 window_start : 62500 window_end : 125000
Packet 3 is within window timestamp : 63164 window_start : 62500 window_end : 125000
Packet 4 is within window timestamp : 128060 window_start : 125000 window_end : 187500
Packet 5 is within window timestamp : 125620 window_start : 125000 window_end : 187500
Packet 6 is within window timestamp : 230044 window_start : 187500 window_end : 250000
Packet 7 is within window timestamp : 238076 window_start : 187500 window_end : 250000
Packet 8 is within window timestamp : 4556 window_start : 0 window_end : 62500
Packet 9 is within window timestamp : 2124 window_start : 0 window_end : 62500
Packet 10 is within window timestamp : 66788 window_start : 62500 window_end : 125000
Packet 11 is within window timestamp : 64356 window_start : 62500 window_end : 125000
Packet 12 is within window timestamp : 129252 window_start : 125000 window_end : 187500
Packet 13 is within window timestamp : 126812 window_start : 125000 window_end : 187500
Packet 14 is within window timestamp : 189412 window_start : 187500 window_end : 250000
Packet 15 is within window timestamp : 188220 window_start : 187500 window_end : 250000
Enet TAS Test PASSED
EnetMod_ioctl: icssg1-2.tas: Failed to do IOCTL cmd 0x01000b03: 1
icssg1: Async IOCTL completed
icssg1: Async IOCTL completed
EnetMod_ioctl: icssg1-2.tas: Failed to do IOCTL cmd 0x01000b01: 1
icssg1: Async IOCTL completed
icssg1: Async IOCTL completed
EnetMod_ioctl: icssg1-2.tas: Failed to do IOCTL cmd 0x01000b03: 1
icssg1: Async IOCTL completed
icssg1: Async IOCTL completed
Transmitting 16 packets
Packet 0 is within window timestamp : 56900 window_start : 0 window_end : 62500
Packet 1 is within window timestamp : 1048 window_start : 0 window_end : 62500
Packet 2 is within window timestamp : 70244 window_start : 62500 window_end : 125000
Packet 3 is within window timestamp : 74636 window_start : 62500 window_end : 125000
Packet 4 is within window timestamp : 126860 window_start : 125000 window_end : 187500
Packet 5 is within window timestamp : 125664 window_start : 125000 window_end : 187500
Packet 6 is within window timestamp : 190516 window_start : 187500 window_end : 250000
Packet 7 is within window timestamp : 188088 window_start : 187500 window_end : 250000
Packet 8 is within window timestamp : 3472 window_start : 0 window_end : 62500
Packet 9 is within window timestamp : 2244 window_start : 0 window_end : 62500
Packet 10 is within window timestamp : 118308 window_start : 62500 window_end : 125000
Packet 11 is within window timestamp : 122340 window_start : 62500 window_end : 125000
Packet 12 is within window timestamp : 130280 window_start : 125000 window_end : 187500
Packet 13 is within window timestamp : 134284 window_start : 125000 window_end : 187500
Packet 14 is within window timestamp : 191716 window_start : 187500 window_end : 250000
Packet 15 is within window timestamp : 189284 window_start : 187500 window_end : 250000
Enet TAS Test PASSED