Visible to Intel only — GUID: hvv1645775209835
Ixiasoft
Visible to Intel only — GUID: hvv1645775209835
Ixiasoft
5.7.3.2. Network Interface Configuration
µC/TCP-IP stores received and transmitted data in network buffers (also referred as receive buffers and transmit buffers). The size of these network buffers should fulfill the minimum and maximum packet frame sizes of the network interfaces.
- Receive Large Buffer
- Transmit Large Buffer
- Transmit Small Buffer
While it is best to leave the size of large buffers at maximum frame size, you can lower the size of the small buffers to reduce the system's RAM usage, further improving the system performance. Additionally, you can configure the number of receive and transmit buffers allocated to the device. Keep in mind that you need to have at least one buffer given for each network.
After configuring the network buffers, register them to a valid memory locations, either the main system memory or a dedicated descriptor memory. If you are using a dedicated descriptor memory, define the starting address and memory span of the descriptor memory in the source code.
Refer to Network Buffers Configuration Table for the µC/TCP-IP example designs default configuration. A dedicated descriptor memory is provided in the hardware system, and registered to the receive buffers. Transmit buffers are routed to the main memory.
Settings | Description | Default Value |
---|---|---|
.RxBufPoolType | Memory location for the receive data buffers. 6 7 | NET_IF_MEM_TYPE_DEDICATED |
.RxBufLargeNbr | Number of receive buffers allocated to the device. | NUM_RX_BUFFERS 8 |
.TxBufPoolType | Memory location for the transmit data buffers. 6 7 | NET_IF_MEM_TYPE_MAIN |
.TxBufLargeNbr | Number of transmit buffers allocated to the device. | 5u |
.TxBufSmallSize | Size of the small transmit buffers. | 60u |
.TxBufSmallNbr | Number of small transmit buffers allocated to the device. | 5u |
.MemAddr | Starting address of the dedicated descriptor memory.9 | SYS_DESC_MEM_BASE |
.MemSize | Size of the dedicated descriptor memory (in bytes). | SYS_DESC_MEM_SPAN |
Default network interface configuration in uc_tcp_ip_init.c
static const CPU_INT08U NUM_RX_LISTS = 2; static const NET_BUF_QTY NUM_RX_BUFFERS = 2 * NUM_RX_LISTS * ALTERA_TSE_MSGDMA_RX_DESC_CHAIN_SIZE; static NET_DEV_CFG_ETHER NetDev_Cfg_Ether_TSE = { .RxBufPoolType = NET_IF_MEM_TYPE_DEDICATED, .RxBufLargeSize = 1536u, .RxBufLargeNbr = NUM_RX_BUFFERS, .RxBufAlignOctets = 4u, .RxBufIxOffset = 2u, .TxBufPoolType = NET_IF_MEM_TYPE_MAIN, .TxBufLargeSize = 1518u, .TxBufLargeNbr = 5u, .TxBufSmallSize = 60u, .TxBufSmallNbr = 5u, .TxBufAlignOctets = 4u, .TxBufIxOffset = 0u, .MemAddr = SYS_DESC_MEM_BASE, .MemSize = SYS_DESC_MEM_SPAN, .Flags = NET_DEV_CFG_FLAG_NONE, .RxDescNbr = 8u, // NOTE: Not configurable. .TxDescNbr = 1u, // NOTE: Not configurable. .BaseAddr = 0, .DataBusSizeNbrBits = 0, .HW_AddrStr = "", };