Performance loss with Vitis 2020.1

Hello,
a project, setup with a Zynq, using both Cortex-a9 cores, shows great performance loss at TCP communication using the latest Xilinx Vitis package 2020.1.
Previous versions used were Xilinx SDK 2019.1 and Vitis 2019.2. Both showed communication speeds at about 88 MBytes/s, while the project using Vitis 2020 reached only 65 MByte/s.
Since the source files of my application, including TCP/IP files, haven’t changed I assume that something in the BSP must be responsible for the performance loss.
The 2019.1 version uses FreeRTOS 10.1.1, while the 2020.1 version uses FreeRTOS 10.3.0.
Unfortunately the IDE offers no possibility to switch between the different versions, although both are present in the 2020.1 installation path.
Does anybody have an idea, what could cause the fault. Possibly it isn’t the new FreeRTOS version, but something totally different.

Greetings

@Hannes, thanks for reporting this.
What TCP/IP stack are you using for this project?

Hello Hein,

the TCP/IP stack came with the FreeRTOS 10.1,1.
The header of FreeRTOS_TCP_IP.c shows:

  • FreeRTOS+TCP V2.0.7
  • Copyright © 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.

The 2019.1 version uses FreeRTOS 10.1.1, while the 2020.1 version uses FreeRTOS 10.3.0.

As for FreeRTOS+TCP, you can use any kernel starting at version 8.x.

Unfortunately the IDE offers no possibility to switch between the
different versions, although both are present in the 2020.1 installation path.

With the “IDE”, you mean Eclipse?
You should be able ( or learn ) to alter your project manually.

while the project using Vitis 2020 reached only 65 MByte/s.

And are you still using these files from the FreeRTOS+TCP driver?

NetworkInterface\Zynq\NetworkInterface.c
NetworkInterface\Zynq\uncached_memory.c
NetworkInterface\Zynq\x_emacpsif_dma.c
NetworkInterface\Zynq\x_emacpsif_hw.c
NetworkInterface\Zynq\x_emacpsif_physpeed.c

How do you measure the maximum throughput? With iperf3?

Hello Hein,

I thought to give it a try, if someone could point me in the right direction to easily reach the good performance I previously had.

So next step will be to alter the BSP / files manually. Yes, IDE = Eclipse with Xilinx addon.
And yes, I still use the mentioned files for the network interface.

I measure the speed with a custom PC application, which reads dummy-data in 10 MByte chunks from the Zynq-device. So data-flow by TCP is mainly reading.

Hello, Hannes.
You can add SDK <2019.1 installation path>/data/embeddedsw path as a repository (https://www.xilinx.com/support/documentation/sw_manuals/xilinx13_1/SDK_Doc/tasks/sdk_t_repos.htm). The instruction is old, but it is almost the same in Vitis 2020.1


After this, you can choose FreeRTOS version shipped with SDK 2019.1 (1.3) in BSP settings

You can also add BSP drivers from Vitis 2020.2 to SDK 2019.1 in a similar way.

Another way is to directly replace [bsp///bsp/libsrc/freertos10_xilinx_v1_X] source files with the ones generated by previous version. You can simply delete the whole folder and paste the previous one, just don’t regenerate BSP or it will replace them back.

After this you can check that FreeRTOS causes performace loss or other drivers in BSP.

Hello Maxim,
meanwhile I tested and found, that the FreeRTOS source files are NOT responsible for the loss in communication speed. I’ve cpoied the older files from 2019.2, V10.1.1, into the 2020.1 project and it gave no improvement in speed. On the other hand, I copied the newer files from 2020.1, V10.3.0 into the 2019.2 project and the communication speed did not decrease.

So the cause of my problem has to be different. Probably drivers, where your proposed way to do it may come in handy, or could be anything with the GCC, which I wouldn’t believe.
But at least when I compared the assembly listing of one file in both projects differences were present. But of course a difference in compiling must not consequently impair the performance.
At the moment, I’ve absolutely no idea and think about waiting until Xilinx releases the next version which probably could be better then.

Problem solved, at least for this forum.

When I advised the Eclipse IDE to use the previous GCC from 2019.2, everything was fine.
There must be a problem with the GCC from 2020.1.
It went so far, that a try to compile the application with optimization level ‘0’, generated a
binary, which could not be run by the debugger, but caused irregular behavior.

So I will try to get some help or advise in the Xilinx forum regarding the GCC problem.
Greetings to all

Thank you for taking time to report back.

Hi Johannes,
Glad to see that you find the root cause.
I am interesting in your TCP performance.
Do you using both Cortex-a9 cores? As I know, FreeRTOS only support single core. So you do some adaption on OS to support dual core?

Thanks & BR
Guoxing