Triple-Speed Ethernet Intel® FPGA IP User Guide

ID 683402
Date 11/25/2022

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

10.4. Using Multiple SG-DMA Descriptors

To successfully use multiple SG-DMA descriptors in your application, make the following modifications:
  • Set the value of the constant ALTERA_TSE_SGDMA_RX_DESC_CHAIN_SIZE in altera_avalon_tse.h to the number of descriptors optimal for your application. The default value is 1 and the maximum value is determined by the constant NUMBIGBUFFS. For TCP applications, Intel® recommends that you use the default value.
  • Increase the amount of memory allocated for the Interniche stack.

    The memory space for the Interniche stack is allocated using the Interniche function pk_alloc(). Although user applications and other network interfaces such as LAN91C111 can share the memory space, Intel® recommends that you use this memory space for only one purpose, that is storing unprocessed packets for the Triple-Speed Ethernet Intel® FPGA IP. Each SG-DMA descriptor used by the device driver consumes a buffer size of 1536 bytes (defined by the constant BIGBUFSIZE) in the memory space. To achieve reasonable performance and to avoid memory exhaustion, add a new constant named NUMBIGBUFS to your application and set its value using the following guideline:

    NUMBIGBUFS = <current value> + <number of SG-DMA descriptors>

    By default, the constant NUMBIGBUFS is set to 30 in ipport.h. If you changed the default value in the previous release of the IP to optimize performance and resource usage, use the modified value to compute the new value of NUMBIGBUFS.