Altera Triple Speed Ethernet MegaCore Function User Manual
Page 112

Tx_section_full = 16
//Cut Throught Mode, Set this Threshold to 0 to enable Store and Forward Mode
Rx_section_full = 16
c. MAC Address Configuration
//MAC address is 00-1C-23-17-4A-CB
mac_0 = 0x17231C00
mac_1 = 0x0000CB4A
d. MAC Function Configuration
//Maximum Frame Length is 1518 bytes
Frm_length = 1518
//Minimum Inter Packet Gap is 12 bytes
Tx_ipg_length = 12
//Maximum Pause Quanta Value for Flow Control
Pause_quant = 0xFFFF
//Set the MAC with the following option:
// 100Mbps, User can get this information from the PHY status/PCS status
//Full Duplex, User can get this information from the PHY status/PCS status
//Padding Removal on Receive
//CRC Removal
//TX MAC Address Insertion on Transmit Packet
//Select mac_0 and mac_1 as the source MAC Address
Command_config Register = 0x00800220
e. Reset MAC
Altera recommends that you perform a software reset when there is a change in the MAC speed or
duplex. The MAC software reset bit self-clears when the software reset is complete.
//Set SW_RESET bit to 1
Command_config Register = 0x00802220
Wait Command_config Register = 0x00800220
f. Enable MAC Transmit and Receive Datapath
//Set TX_ENA and RX_ENA to 1 in Command Config Register
Command_config Register = 0x00802223
//Read the TX_ENA and RX_ENA bit is set 1 to ensure TX and RX path is enable
Wait Command_config Register = 0x00802223
Altera Corporation
Configuration Register Space
6-29
Triple-Speed Ethernet System with MII/GMII or RGMII
UG-01008
2014.06.30