Home Alternative Under Pressure – The intent and purpose of testing...

Under Pressure – The Intent and Purpose of Industrial Ethernet Load Testing

With version 2.3 of the PROFINET specification, passing the load test (payload test) has become mandatory to obtain a certification. Can embedded MCUs pass these tests? Yes, if the stacks and MCU manufacturers have done their homework, as this article using the Renesas RX63N and PROFINET stacks from port GmbH demonstrates.

There is no question, with the advent of Industrial Ethernet in the world of automation, the requirements for computing power and implementation complexity have increased. While for simple CANopen devices an 8-bit processor was more than enough, this is not the case for protocols like PROFINET.

Partly responsible for this are, on the one hand, the large volumes of data and, on the other, the versatility of services, which, apart from the industrial Ethernet protocols, are also offered by Ethernet protocols and the extensive IP-based protocols. .

Thus, it becomes even more important to examine these loads in parallel to the standard control communication.

However, before evaluating these challenges using the RX63N as an example, let's look at a brief introduction to the general types of network traffic and how it is used by PROFINET.

Types of Network Traffic

In order to better understand load testing, one must first consider what (wrong) situations could cause what types of network traffic.

Indirect Traffic

The data traffic related to indirect traffic is not, in fact, destined for the device under test. This can involve broadcast (for all participants), multicast (for some participants), or unicast frames. Broadcast and multicast frames on the network are embedded in the Ethernet layer and are therefore available at any time on the Ethernet network.

What is it that leads to undirected traffic of unicast frames though? In general, this happens in the event of an error. Normally, an Ethernet switch addresses an internal address table. If the switch receives a frame with an unknown MAC address, the port on which the frame was received is listed in the address table. This “address learning” allows the switch to send unicast frames directly to the target and not flood them as in the case of broadcast messages to all ports. However, if the address table is full, any future address learning will put the switch into a failsafe mode: Frames, as in the case of the hub, will be forwarded to all ports. This behavior is deliberately exploited by so-called “MAC flooding” (also known as Switch jamming). The attacker passes tons of Ethernet frames with bogus addresses until the switch table is full. A free Ethernet port is sufficient for this purpose. The attacker's goal is to intentionally generate overload or read information throughout the network.

Direct Traffic

Direct traffic deals with traffic data which is intended by the device and not as in the case of indirect traffic, where it was forwarded by the device erroneously. These data can be sent by unicast, broadcast or multicast.

In this traffic, the data can either come from a PROFINET connection or from other services such as an HTTP server running on the device. In addition, there is also data from common protocols used like ARP. These data can be subdivided into both Real Time (RT) and Non-Real Time (NRT). RT traffic covers anything that serves to maintain a cyclic PROFINET connection. NRT traffic includes data from the PROFINET protocol itself as well as from other Ethernet frames (eg IP traffic).

A Question of Architecture

The MCU of a PROFINET device must therefore deal with a relatively high number of frames. This load increases as the size of a projected network increases. In particular, in the initial phase of a network, it can happen frequently that frames like LLDP, ARP, etc. they burst.

Both hardware and software must be properly designed to ensure reliable communication even in these situations. For a practical example, it must first be considered which sequence of operations are necessary to process a cyclic PROFINET communication.

Figure 1 shows an excerpt from a timing diagram of the PROFINET stack from port GmbH on a Renesas RX63N. The data was obtained using the tracking framework integrated in the Stack. Shows chronologically the steps of the main process to transmit an RT frame.

On embedded platforms without an operating system, the stack uses a timer routine in which all used timers are monitored at microsecond intervals for their expiration. In Figure 1, the OAL_timer illustrates this with a green line. First, the timer for cyclic packet processing is executed. This is illustrated in figure 1 by Cyclic with the yellow line. In Cyclic, the next frame to be transmitted is compiled and passed to the Ethernet driver. When Cyclic has finished, the rest of the timers can be processed. In this case, the next LLDP frame to be transmitted is processed. LLDP (Link Layer Discovery Protocol) is a Layer 2 protocol that manages neighborhood detection, and it is not only used in PROFINET. The frame is generated on the line marked as LLDP and passed through the Ethernet driver. After the timer has completed its task, two Ethernet interrupts can still be identified. This implies a confirmation that the two frames (cyclic and LLDP) have been transmitted. The reading of the "marker" in the upper right corner of figure 1 (highlighted by a red rectangle) shows that the entire action is performed in only 119 μs. If interrupt switching had also been taken into account, then the time would be around 125 µs. The timer interrupt is triggered approximately every 1 ms. With this, the RX63N can still take a lot of computing time out of the PROFINET communication process to handle the next data to be sent. Also, in this period, other services such as TCP for an HTTP server can be processed.

This has been a simple example without additional traffic data. How would the system have acted when additional data had been received?

For this purpose, using the “tcpreplay” tool, pre-recorded ARP packets are additionally fed back to the network as quickly as possible. This is illustrated in Figure 2. ARP packets can be recognized as a frequently triggered Ethernet interrupt (red line). However, as can be seen in the figure, the additional traffic severely affects cyclic communication. How can this be explained? First, for that realization, you need an MCU that allows interrupt prioritization and interrupt. This feature is correctly implemented in the Renesas RX63. The processing or generation of cyclic frames is the most important part of the device, therefore the timer interrupt has been assigned the highest priority. Therefore it is triggered even while the device is busy processing a packet in the Ethernet interrupt routine and aborts it.

Secondly, an intelligent functionality of the RX63N, which can greatly relieve the load on the CPU especially during dense data load on the Ethernet network, plays an important role here. The RX63N is equipped with its own DMA controller (EDMAC) for the Ethernet controller (ETHERC). This reserves the CPU from the task of copying the Ethernet frames to be sent or received. By means of the descriptors, the CPU points to the memory area in which the packet to be transmitted is located or in which the received packet is to be stored. The CPU can then process the packets. Therefore, it is possible to process a packet while the EDMAC is already receiving or transmitting other packets.

perspectives

There is no doubt that in future load tests it will be a part of every release test if not even every certification. Here, it is important not only to check the communication, but also to simulate network error conditions.

In PROFINET load testing will become part of certification in the near future. In network load tests, apart from the RT data, also different protocols are additionally fed into the network traffic by unicast, broadcast, and also by multicast. In this way different load levels from regular network traffic to network overload are simulated. This is done depending on the desired performance class (network load class).

On the other hand, both MCU and stack manufacturers must do their homework as well. Both the software and the hardware must be prepared to handle possible errors, as is the case with the RX63N.

What do you need to do to get started?

For an inexperienced user, the previous sections may sound relatively complicated. To take the first steps, it is recommended to use an RSK (Renesas Starter Kit) RX63N because together with the PROFINET stack from port GmbH, a "Ready-To-Go" solution is offered that helps to carry out the development of applications quickly and agilely. prototypes. The Renesas E1 JTAG debugger and the e2Studio development environment are available as development tools. The e2Studio development environment integrates all the necessary tools to write and debug the software. The demo application includes all the necessary files for the project to therefore contribute to a smooth start-up of the starter kit.

The RSK incorporates an RX63N MCU with 2 Mbytes on-chip Flash and 128 Kbytes on-chip RAM. This product group with 165 DMIPS and 100 MHz CPU and flash operation achieves high computing performance. In order to be able to use it in a wide variety of products with different profiles and requirements, this product group is highly scalable. The RX63N are available in flash memory versions ranging from 512 Kbytes to 2 Mbytes and RAM sizes ranging from 128 Kbytes to 256 Kbytes. Regarding the packages, there are versions in different variants: LQFP, LGA and BGA. In addition to the IEEE 802.3 Ethernet MAC compliant interface with Media Independent Interface (MII) and Reduced Media Independent Interface (RMII) for simple connection to a PHY, these components offer Controller Area Network (CAN) 2.0B interfaces with up to three channels (here, a CANopen solution from port GmbH is also available), two Universal Serial Bus (USB) full speed hosts, USB OTG and device functions. The RX are designed to provide high integration density and attractive cost of fabric, combined with extremely fast embedded Flash technology. Therefore, they are the right choice for applications that need powerful communication stacks, such as in the PROFINET area with single-chip solutions to avoid the use of external memories. Detailed information on this subject can be downloaded from the Internet and is of course included with the starter kit.

A good combination

Under Renesas' RXMAX program, the combination of the Renesas RX32N 63-Bit MCU and the PROFINET port stack offers a particularly attractive start in the field of PROFINET applications. The Renesas RX63N MCU can work with the PROFINET port without restrictions, enabling the development of powerful and cost-effective PROFINET I/O devices (CC-A, RT-1).

The cost advantage can extend through the simplified network structure to integrators and their customers.

In principle, solutions like CANopen, EtherNet/IP, POWERLINK and EtherCAT are possible under the same platform.