Evaluating TSN Preemption for Cyclic
EtherNet/IP Communication

Internal

Agenda••••Ethernet switch overview
Simulating Ethernet switch behavior, including preemption
Simulation example and results
Conclusions

Technical Track© 2022 ODVA, Inc.

2022 Industry Conference & 21st Annual Meeting
All rights reserved.
Internal

www.odva.org

2

Ethernet Switch Behavior•••••

Technical Track© 2022 ODVA, Inc.

Quality of Service (QoS)Store-and-forward switching
Cut-through switching
Physical interface (PHY)
Preemption

2022 Industry Conference & 21st Annual Meeting
All rights reserved.
Internal

www.odva.org

3QoS Strict Priority••••

Default queuing mechanism for Ethernet bridges (switches)
Higher numbered queues have priority over lower numbered queues
In general, highest numbered queue with packet is transmitted nextShaping mechanisms can affect priority queuingTechnical Track© 2022 ODVA, Inc.

2022 Industry Conference & 21st Annual Meeting
All rights reserved.
Internal

www.odva.org

4Cut-through Switching•

Advantages– Switch begins forwarding before fully receiving messages– Offers lower latencies over store-and-forward switching•Caveats– Behavior not specified in standards– Propagates corrupted messages•

Congestion and port speed differences cause fallback to store-andforward behavior

Technical Track© 2022 ODVA, Inc.

2022 Industry Conference & 21st Annual Meeting
All rights reserved.
Internal

www.odva.org

5Physical Interface (PHY)
••
•
•
•

performs encoding, transmission, reception, decoding and provides galvanic
isolationtranslates logical communications into hardware-specific operations
Transmitter Latency may be different compared to receiver latency
Simulator uses single average, since transmitter always coupled to areceiverconversion increases packet latencies

Technical Track© 2022 ODVA, Inc.

2022 Industry Conference & 21st Annual Meeting
All rights reserved.
Internal

www.odva.org

6Interference

P3P33 PortSwitch

P1P2

P1

ingress P3egress P2

ingress P3high priority

messagein progressmessageingress P1
egress P2

low priority
in progress

txmt

high priority

low priority

txmt

Interference due to in-progress message
Technical Track© 2022 ODVA, Inc.

P2

in progress

tsw
ingress P1

3 PortSwitchHigh-priority Interference

2022 Industry Conference & 21st Annual Meeting
All rights reserved.
Internal

www.odva.org

7Frame Preemption and Interspersing Express Traffic•

Ability to interrupt a low priority (non-express) packet with a higher priority(express) during transmission

Technical Track© 2022 ODVA, Inc.

2022 Industry Conference & 21st Annual Meeting
All rights reserved.
Internal

www.odva.org

8Simulator Overview•••

Written in Python programming language
Focus on preemption, QoS, Cut-through and store-and-forward switching
Main classes to represent––––––•

ethernetSwitch
ethernetCable
ethernetEndpoint
ethernetPort
ethernetPacket and ethernetPacketStateegressMonitor

Bandwidth analyzer

Technical Track© 2022 ODVA, Inc.

2022 Industry Conference & 21st Annual Meeting
All rights reserved.
Internal

www.odva.org

9Setting Up the Simulator•

Modify main python file to define simulation–––––••

Define packet traffic patterns
Define endpoints, endpoint addresses, and switches
Define connections
Configure egress monitors
Queue packets into endpoints

Run simulation
Produce results

Technical Track© 2022 ODVA, Inc.

2022 Industry Conference & 21st Annual Meeting
All rights reserved.
Internal

www.odva.org

10Simulator Variables•••••••••

QueueingTime, processingTime, preemptionTime, cutThroughTime
Preempt
cutThroughcutThroughOctets
phyDelay
simulationTime
simulationStep
portSpeed
cableLength

Technical Track© 2022 ODVA, Inc.

2022 Industry Conference & 21st Annual Meeting
All rights reserved.
Internal

www.odva.org

11Ethernet Packets••••

Simulate the movement of packets from one class to another
Static portion in ethernetPacket class (size, priority, destination address,
Dynamic portion stored in EthernetPacketState class (start and end time,network time, in and out ports, state, and so on)
Static portion only changes if preempted
Same packet can be in several state instances during simulation (egressing
endpoint1 while ingressing switchA, and so on)

Technical Track© 2022 ODVA, Inc.

2022 Industry Conference & 21st Annual Meeting
All rights reserved.
Internal

www.odva.org

12

Simulation Operation••••

Time slice, increment time andLoop through all class instances, evaluates packet state instances todetermine if a change of state is needed (for example, packet completes
ingress, move to queue pending state)
Update egress monitors
Upon completion, perform bandwidth analysis and print results

Technical Track© 2022 ODVA, Inc.

2022 Industry Conference & 21st Annual Meeting
All rights reserved.
Internal

www.odva.org

13

Simulation Example•Line topology– 6 drives, 16 octets payload, 1 ms cycle– 2 rack I/O, 251 octets payload, 4 ms cycle– 1 controller•••

Device to controller only
All devices send data simultaneously at beginning of cycle
30 msec simulation duration

Technical Track© 2022 ODVA, Inc.

2022 Industry Conference & 21st Annual Meeting
All rights reserved.
Internal

www.odva.org

14

Simulation
NetworkDiagram

Block I/O1

Sw1

ServoDrive2

ServoDrive1Cable 1

Sw2

Cable 2

Sw3

ServoDrive3

Cable 3

Sw4

Cable 4ServoDrive6

Sw8

ServoDrive4

ServoDrive5

Cable 7

Sw7Cable 6

Sw6

Block I/O2

Cable 5

Sw5Controller

Sw9Cable 8

Technical Track© 2022 ODVA, Inc.

2022 Industry Conference & 21st Annual Meeting
All rights reserved.
Internal

www.odva.org

15

Device Characteristics

Technical Track© 2022 ODVA, Inc.

Device Type

Cycle time(us)num dev

payloadPkt Size

Priority

Servo Drive

1000

616

90

7

Block I/O

4000

2251

325

62022 Industry Conference & 21st Annual Meeting
All rights reserved.
Internal

www.odva.org

16Baseline Simulation Results
start time
19680
30020
40360
61040
1450401726401814402612601019680
10300201040360
1061040
10713801081720

Technical Track© 2022 ODVA, Inc.

gap time
19680
1540
1540
11880
75200
00
71020
730820
1540
1540
11880
1540
1540

Latency
27520
37860
48200
68880
171680180480189280287900
27520
37860
48200
68880
79220
89560

2022 Industry Conference & 21st Annual Meeting
All rights reserved.
Internal

Pkt Name
ServoDrive6-pkt1
ServoDrive5-pkt1
ServoDrive4-pkt1
ServoDrive3-pkt1
BlockI/O2-pkt1
ServoDrive2-pkt1
ServoDrive1-pkt1
BlockI/O1-pkt1
ServoDrive6-pkt2
ServoDrive5-pkt2
ServoDrive4-pkt2
ServoDrive3-pkt2
ServoDrive2-pkt2
ServoDrive1-pkt2

www.odva.org

17Baseline Min & Max Latencies

Technical Track© 2022 ODVA, Inc.

PatternMin

max

ServoDrive1-pkt*

89560

189280BlockI/O1-pkt*

2879002879002022 Industry Conference & 21st Annual Meeting
All rights reserved.
Internal

www.odva.org

18

Max Latencies with Interfering Packets

Pattern

5-123

50-1231-750

1-1500ServoDrive1-pkt*

199540216180191520190360BlockI/O1-pkt*

318660343620297940291200Technical Track© 2022 ODVA, Inc.

2022 Industry Conference & 21st Annual Meeting
All rights reserved.
Internal

www.odva.org

19Bandwidth Analysis – No Interference
Start TimeEnd Time

SW1SW2SW3SW90

12.76

3.64

4.52

10.8

1200.88

1.76

5.28

2

300.88

1.76

5.28

3

400.88

1.76

5.28

Technical Track© 2022 ODVA, Inc.

2022 Industry Conference & 21st Annual Meeting
All rights reserved.
Internal

www.odva.org

20Bandwidth Analysis – with Interference
Start Time

End Time

SW1SW2SW3

SW90159.96

98.80298.91295.99812077.318

100

100

23058.08100100

34058.08

100100Technical Track© 2022 ODVA, Inc.

2022 Industry Conference & 21st Annual Meeting
All rights reserved.
Internal

www.odva.org

21

Simulation Results Overview••••

Even without interference, drive packet latency affected when in same cycle
as I/O traffic
Packets arriving at controller not in same order as endpoints when cycles
coincide
Nominal bandwidth utilization when no interfering traffic present
Increasing quantity of interfering packets per cycle and longer simulation
times increase latencies towards theoretical prediction

Technical Track© 2022 ODVA, Inc.

2022 Industry Conference & 21st Annual Meeting
All rights reserved.
Internalwww.odva.org

22

Conclusions••••

Presented simulation as one method for analyzing cyclic EtherNet/IP trafficin a network.
Simulator demo, line topology, two types of traffic at different priorities andcyclic rates.
Observations not intuitively obvious; that even without interference, thepackets received at the controller are not in the order of the devices on thenetwork
Attempting to analyze using Excel would be extremely complex, especially if
one wanted to examine variance such as store-and-forward vs. cut-through,preemption vs. no preemption, packet size and priority variations, and soon.
•ESS allows analyzing complex network topologies and cyclic data patterns by changing
main program file and re-running the simulation.

Technical Track© 2022 ODVA, Inc.

2022 Industry Conference & 21st Annual Meeting
All rights reserved.
Internal

www.odva.org

23Internal