infineon4engineers Facebook

infineon@google+ Google+

infineon@linkedin linkedin

infineon4engi@twitter twitter

infineon@youtube youtube

+ Reply to Thread
Results 1 to 5 of 5

Thread: Maximum Ethernet Speed with XMCLib and XMC4800 on Relax Kit v1 on 100 Mbit/s not good

  1. #1
    Intermediate Intermediate HRusch will become famous soon enough HRusch's Avatar
    Join Date
    Feb 2016
    Posts
    75
    Points
    450

    Maximum Ethernet Speed with XMCLib and XMC4800 on Relax Kit v1 on 100 Mbit/s not good

    Hi,

    I am evaluating the maximum speed which could be achieved by the XMC4800 on the Relax Kit v1.

    I am using a self implemented bare bone UDP packet builder and the function XMC_ETH_MAC_SendFrame() from XMCLib.

    Latest DAVE 4.1.x with latest XMCLibs. uC set on 144 Mhz and ETH-PHY and ETH configured and setup as in the demo "XMC4700/XMC4800 Web Server Demo including MicroSD card access".

    Forcing to 10 Mbit/s on each side I get a little bit over 1 MebiByte/s as transfer rate with a 1024 byte UDP payload. This is saturated.

    Measured via PC on Windows with Wireshark with an Intel Pro 1 GBit/s NIC.

    Using auto negotiaton I get 100 Mbit/s on each side as expected.

    Now I get 6,72 MebiByte/s as transfer rate with a 1024 byte UDP payload. Transfer lasts ~1,5 s for 10 MebiByte.
    This is not even close to saturation which should be around 11 MebiByte/s.


    This is the main loop on sending.

    Code:
    for (uint16_t i = 0; i < packetCount; i++) {
     while (ETH_SendFrame((uint8_t*) &udpIp4Packet, frameLen))
      ;
    }
    packetCount is 10 * 1024 and frameLen is 1066 (1024 UDP payload + 42 bytes header).

    ETH_SendFrame() returns with 1 after 4 TX frames, which is expected, since the TX buffer size is 4. It gets 0 as soon as new data could be put into the buffers.
    Raising the buffer size does not speed up. Also using the optimizer does not help. But as one could see by the return of 1 of ETH_SendFrame() there is no prozessor bottleneck.

    Is this what i should expect? Only 60% maximum speed on 100 MBit/s?

    Thanks for help.

  2. #2
    Intermediate Intermediate HRusch will become famous soon enough HRusch's Avatar
    Join Date
    Feb 2016
    Posts
    75
    Points
    450
    Any feedback?

    I disabled all offloading (crc generation) to see if it the cause. But the speed stays the same.

  3. #3

    Infineon Employee
    Infineon Employee
    jferreira will become famous soon enough
    Join Date
    Oct 2012
    Posts
    601
    Hi,

    Thanks for your feedback.
    I was able to reproduce your measurements. I got initially with the original code, 59Mbit/s.

    I have managed to increase the transmit performance to 88Mbit/s by changing the BUS_MODE settings in the XMC_ETH_MAC_Init function as follow:

    eth_mac->regs->BUS_MODE = ETH_BUS_MODE_ATDS_Msk | /* Increase enhanced descriptor to 8 WORDS, required when the Advanced Time-Stamp feature or Full IPC Offload Engine is enabled */
    ETH_BUS_MODE_AAL_Msk | /* the AHB interface generates all bursts aligned to the start address LS bits */
    ETH_BUS_MODE_FB_Msk | /* DMA attempts to execute fixed-length Burst transfers on the AHB Master interface */
    (0x10 << ETH_BUS_MODE_PBL_Pos); /* maximum Burst length */

    Please give it a try and let us know if you have any feedback.

    Best regards,
    Jesus
    The views expressed here are my personal opinions, have not been reviewed or authorized by Infineon and do not necessarily represent the views of Infineon.

  4. #4
    Intermediate Intermediate HRusch will become famous soon enough HRusch's Avatar
    Join Date
    Feb 2016
    Posts
    75
    Points
    450
    Now I get 9,41 MebiByte/s netto with 1024 bytes UDP payload per packet.

    NICE! Thanks!

    Any negative side effects on this?

  5. #5
    Advanced Advanced shenj is on a distinguished road
    Join Date
    Feb 2015
    Posts
    111
    Points
    1012.5
    This is a reserved bit, isn't it?
    Last edited by shenj; Oct 27th, 2016 at 07:09 AM. Reason: update

+ Reply to Thread

Tags for this Thread

Disclaimer

All content and materials on this site are provided “as is“. Infineon makes no warranties or representations with regard to this content and these materials of any kind, whether express or implied, including without limitation, warranties or representations of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. No license, whether express or implied, is granted by Infineon. Use of the information on this site may require a license from a third party, or a license from Infineon.


Infineon accepts no liability for the content and materials on this site being accurate, complete or up- to-date or for the contents of external links. Infineon distances itself expressly from the contents of the linked pages, over the structure of which Infineon has no control.


Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Usage Terms of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Usage Terms of this site. Infineon reserves the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.