
Example of PHY Instance Structure
typedef struct alt_tse_system_phy_struct { /* PHY instance */
/* PHY's MDIO address */
alt_32tse_phy_mdio_address;
/* PHY initialization function pointer—instance specific */
alt_32 (*tse_phy_cfg)(np_tse_mac *pmac);
} alt_tse_system_phy;
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, Altera 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, Altera
recommends that you use this memory space for only one purpose, that is storing unprocessed packets
for the Triple-Speed Ethernet MegaCore function. 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 MegaCore function to optimize performance and resource usage, use the modified value
to compute the new value of NUMBIGBUFS.
Using Jumbo Frames
To use jumbo frames, set the frm_length register to 9600 and edit the files and definitions.
Table 11-2: Jumbo Frames Definitions
DefinitionFile
#define ALTERA_TSE_PKT_INIT_LEN 8206
#define ALTERA_TSE_MAX_MTU_SIZE 8192
#define ALTERA_TSE_MIN_MTU_SIZE 14
ip\altera\ethernet\altera_eth_tse\src\
software\lib\UCOSII\inc\iniche\altera_eth_
tse_iniche.h
#define ALTERA_TSE_MAC_MAX_FRAME_LENGTH 8196(1)ip\altera\ethernet\altera_eth_tse\src\
software\lib\HAL\inc\altera_avalon_tse.h
Software Programming Interface
Altera Corporation
Send Feedback
UG-01008
Using Multiple SG-DMA Descriptors
11-4
2014.06.30
Kommentare zu diesen Handbüchern