# CPGMAC_SL Functions
[GMAC Sliver submodule (CPGMAC_SL)]

## Functions
CSL_IDEF_INLINE void | CSL_CPGMAC_SL_getMacVersionInfo (Uint32 portNum, CSL_CPGMAC_SL_VERSION *pVersionInfo)
CSL_IDEF_INLINE Uint32 | CSL_CPGMAC_SL_isFullDuplexEnabled (Uint32 portNum)
CSL_IDEF_INLINE void | CSL_CPGMAC_SL_enableFullDuplex (Uint32 portNum)
CSL_IDEF_INLINE void | CSL_CPGMAC_SL_disableFullDuplex (Uint32 portNum)
CSL_IDEF_INLINE Uint32 | CSL_CPGMAC_SL_isLoopbackModeEnabled (Uint32 portNum)
CSL_IDEF_INLINE void | CSL_CPGMAC_SL_enableLoopback (Uint32 portNum)
CSL_IDEF_INLINE void | CSL_CPGMAC_SL_disableLoopback (Uint32 portNum)
CSL_IDEF_INLINE Uint32 | CSL_CPGMAC_SL_isRxFlowControlEnabled (Uint32 portNum)
CSL_IDEF_INLINE void | CSL_CPGMAC_SL_enableRxFlowControl (Uint32 portNum)
CSL_IDEF_INLINE void | CSL_CPGMAC_SL_disableRxFlowControl (Uint32 portNum)
CSL_IDEF_INLINE Uint32 | CSL_CPGMAC_SL_isTxFlowControlEnabled (Uint32 portNum)
CSL_IDEF_INLINE void | CSL_CPGMAC_SL_enableTxFlowControl (Uint32 portNum)
CSL_IDEF_INLINE void | CSL_CPGMAC_SL_disableTxFlowControl (Uint32 portNum)
CSL_IDEF_INLINE Uint32 | CSL_CPGMAC_SL_isGMIIEnabled (Uint32 portNum)
CSL_IDEF_INLINE void | CSL_CPGMAC_SL_enableGMII (Uint32 portNum)
CSL_IDEF_INLINE void | CSL_CPGMAC_SL_disableGMII (Uint32 portNum)
CSL_IDEF_INLINE Uint32 | CSL_CPGMAC_SL_isTxPaceEnabled (Uint32 portNum)
CSL_IDEF_INLINE void | CSL_CPGMAC_SL_enableTxPace (Uint32 portNum)
CSL_IDEF_INLINE void | CSL_CPGMAC_SL_disableTxPace (Uint32 portNum)
CSL_IDEF_INLINE Uint32 | CSL_CPGMAC_SL_isGigabitEnabled (Uint32 portNum)
CSL_IDEF_INLINE void | CSL_CPGMAC_SL_enableGigabit (Uint32 portNum)
CSL_IDEF_INLINE void | CSL_CPGMAC_SL_disableGigabit (Uint32 portNum)
CSL_IDEF_INLINE Uint32 | CSL_CPGMAC_SL_isTxShortGapEnabled (Uint32 portNum)
CSL_IDEF_INLINE void | CSL_CPGMAC_SL_enableTxShortGap (Uint32 portNum)
CSL_IDEF_INLINE void | CSL_CPGMAC_SL_disableTxShortGap (Uint32 portNum)
CSL_IDEF_INLINE Uint32 | CSL_CPGMAC_SL_isIdleModeEnabled (Uint32 portNum)
CSL_IDEF_INLINE void | CSL_CPGMAC_SL_enableIdleMode (Uint32 portNum)
CSL_IDEF_INLINE void | CSL_CPGMAC_SL_disableIdleMode (Uint32 portNum)
CSL_IDEF_INLINE Uint32 | CSL_CPGMAC_SL_isIFCTLAEnabled (Uint32 portNum)
CSL_IDEF_INLINE void | CSL_CPGMAC_SL_enableIFCTLA (Uint32 portNum)
CSL_IDEF_INLINE void | CSL_CPGMAC_SL_disableIFCTLA (Uint32 portNum)
CSL_IDEF_INLINE Uint32 | CSL_CPGMAC_SL_isIFCTLBEnabled (Uint32 portNum)
CSL_IDEF_INLINE void | CSL_CPGMAC_SL_enableIFCTLB (Uint32 portNum)
CSL_IDEF_INLINE void | CSL_CPGMAC_SL_disableIFCTLB (Uint32 portNum)
CSL_IDEF_INLINE Uint32 | CSL_CPGMAC_SL_isGigForceModeEnabled (Uint32 portNum)
CSL_IDEF_INLINE void | CSL_CPGMAC_SL_enableGigForceMode (Uint32 portNum)
CSL_IDEF_INLINE void | CSL_CPGMAC_SL_disableGigForceMode (Uint32 portNum)
CSL_IDEF_INLINE Uint32 | CSL_CPGMAC_SL_isExtControlEnabled (Uint32 portNum)
CSL_IDEF_INLINE void | CSL_CPGMAC_SL_enableExtControl (Uint32 portNum)
CSL_IDEF_INLINE void | CSL_CPGMAC_SL_disableExtControl (Uint32 portNum)
CSL_IDEF_INLINE Uint32 | CSL_CPGMAC_SL_isRxCEFEnabled (Uint32 portNum)
CSL_IDEF_INLINE void | CSL_CPGMAC_SL_enableRxCEF (Uint32 portNum)
CSL_IDEF_INLINE void | CSL_CPGMAC_SL_disableRxCEF (Uint32 portNum)
CSL_IDEF_INLINE Uint32 | CSL_CPGMAC_SL_isRxCSFEnabled (Uint32 portNum)
CSL_IDEF_INLINE void | CSL_CPGMAC_SL_enableRxCSF (Uint32 portNum)
CSL_IDEF_INLINE void | CSL_CPGMAC_SL_disableRxCSF (Uint32 portNum)
CSL_IDEF_INLINE Uint32 | CSL_CPGMAC_SL_isRxCMFEnabled (Uint32 portNum)
CSL_IDEF_INLINE void | CSL_CPGMAC_SL_enableRxCMF (Uint32 portNum)
CSL_IDEF_INLINE void | CSL_CPGMAC_SL_disableRxCMF (Uint32 portNum)
CSL_IDEF_INLINE Uint32 | CSL_CPGMAC_SL_getMacControlReg (Uint32 portNum)
CSL_IDEF_INLINE void | CSL_CPGMAC_SL_setMacControlReg (Uint32 portNum, Uint32 macControlRegVal)
CSL_IDEF_INLINE void | CSL_CPGMAC_SL_getMacStatusReg (Uint32 portNum, CSL_CPGMAC_SL_MACSTATUS *pMacStatus)
CSL_IDEF_INLINE void | CSL_CPGMAC_SL_resetMac (Uint32 portNum)
CSL_IDEF_INLINE Uint32 | CSL_CPGMAC_SL_isMACResetDone (Uint32 portNum)
CSL_IDEF_INLINE Uint32 | CSL_CPGMAC_SL_getRxMaxLen (Uint32 portNum)
CSL_IDEF_INLINE Uint32 | CSL_CPGMAC_SL_setRxMaxLen (Uint32 portNum, Uint32 rxMaxLen)
CSL_IDEF_INLINE Uint32 | CSL_CPGMAC_SL_getRxPauseTimerReg (Uint32 portNum)
CSL_IDEF_INLINE Uint32 | CSL_CPGMAC_SL_setRxPauseTimerReg (Uint32 portNum, Uint32 rxPauseTimer)
CSL_IDEF_INLINE Uint32 | CSL_CPGMAC_SL_getTxPauseTimerReg (Uint32 portNum)
CSL_IDEF_INLINE Uint32 | CSL_CPGMAC_SL_setTxPauseTimerReg (Uint32 portNum, Uint32 txPauseTimer)
CSL_IDEF_INLINE void | CSL_CPGMAC_SL_getEmulControlReg (Uint32 portNum, Uint32 *pEmulFreeBit, Uint32 *pEmulSoftBit)
CSL_IDEF_INLINE void | CSL_CPGMAC_SL_setEmulControlReg (Uint32 portNum, Uint32 emulFreeBit, Uint32 emulSoftBit)
CSL_IDEF_INLINE void | CSL_CPGMAC_SL_getMacRxPriMapReg (Uint32 portNum, Uint32 *pMacRxPriMap)
CSL_IDEF_INLINE void | CSL_CPGMAC_SL_setMacRxPriMapReg (Uint32 portNum, Uint32 *pMacRxPriMap)

## Function Documentation

CSL_IDEF_INLINE void CSL_CPGMAC_SL_disableExtControl | ( | Uint32 | portNum | ) |

============================================================================
CSL_CPGMAC_SL_disableExtControl

Description
This function configures the MAC control register to disable external control of the Gigabit and full duplex settings.

Arguments

            portNum                 MAC port number for which settings must be configured.
     *

Return Value
None

Pre Condition
None

Post Condition
None

Writes
CPGMAC_SL_MACCONTROL_REG_CTL_EN=0

Example

            Uint32 portNum  =   1;

            CSL_CPGMAC_SL_disableExtControl (portNum);

=============================================================================

CSL_IDEF_INLINE void CSL_CPGMAC_SL_disableFullDuplex | ( | Uint32 | portNum | ) |

============================================================================
CSL_CPGMAC_SL_disableFullDuplex

Description
This function configures the MAC control register to disable full duplex mode for the MAC port specified.

Arguments

            portNum                 MAC port number for which settings must be configured.
     *

Return Value
None

Pre Condition
None

Post Condition
None

Writes
CPGMAC_SL_MACCONTROL_REG_FULLDUPLEX=0

Example

     *      Uint32  portNum = 1;

            CSL_CPGMAC_SL_disableFullDuplex (portNum);

=============================================================================

CSL_IDEF_INLINE void CSL_CPGMAC_SL_disableGigabit | ( | Uint32 | portNum | ) |

============================================================================
CSL_CPGMAC_SL_disableGigabit

Description
This function configures the MAC control register to disable Gigabit mode for MAC port specified.

Arguments

            portNum                 MAC port number for which settings must be configured.
     *

Return Value
None

Pre Condition
None

Post Condition
None

Writes
CPGMAC_SL_MACCONTROL_REG_GIG=0

Example

            Uint32 portNum = 1;

            CSL_CPGMAC_SL_disableGigabit (portNum);

=============================================================================

CSL_IDEF_INLINE void CSL_CPGMAC_SL_disableGigForceMode | ( | Uint32 | portNum | ) |

============================================================================
CSL_CPGMAC_SL_disableGigForceMode

Description
This function configures the MAC control register to disable Gigabit force mode for the MAC port number specified.

Arguments

            portNum                 MAC port number for which settings must be configured.
     *

Return Value
None

Pre Condition
None

Post Condition
None

Writes
CPGMAC_SL_MACCONTROL_REG_GIG_FORCE=0

Example

            Uint32  portNum =   1;

            CSL_CPGMAC_SL_disableGigForceMode (portNum);

=============================================================================

CSL_IDEF_INLINE void CSL_CPGMAC_SL_disableGMII | ( | Uint32 | portNum | ) |

============================================================================
CSL_CPGMAC_SL_disableGMII

Description
This function configures the MAC control register to disable GMII for the MAC port specified.

Arguments

            portNum                 MAC port number for which settings must be configured.
     *

Return Value
None

Pre Condition
None

Post Condition
None

Writes
CPGMAC_SL_MACCONTROL_REG_GMII_EN=0

Example

            Uint32  portNum =   1;

            CSL_CPGMAC_SL_disableGMII (portNum);

=============================================================================

CSL_IDEF_INLINE void CSL_CPGMAC_SL_disableIdleMode | ( | Uint32 | portNum | ) |

============================================================================
CSL_CPGMAC_SL_disableIdleMode

Description
This function configures the MAC control register to disable Idle mode for MAC port specified.

Arguments

            portNum                 MAC port number for which settings must be configured.
     *

Return Value
None

Pre Condition
None

Post Condition
None

Writes
CPGMAC_SL_MACCONTROL_REG_CMD_IDLE=0

Example

            Uint32 portNum = 1;

            CSL_CPGMAC_SL_disableIdleMode (portNum);

=============================================================================

CSL_IDEF_INLINE void CSL_CPGMAC_SL_disableIFCTLA | ( | Uint32 | portNum | ) |

============================================================================
CSL_CPGMAC_SL_disableIFCTLA

Description
This function configures the MAC control register to clear the IFCTL_A bit for MAC port number specified.

Arguments

            portNum                 MAC port number for which settings must be configured.
     *

Return Value
None

Pre Condition
None

Post Condition
None

Writes
CPGMAC_SL_MACCONTROL_REG_IFCTL_A=0

Example

            Uint32  portNum =   1;

            CSL_CPGMAC_SL_disableIFCTLA (portNum);

=============================================================================

CSL_IDEF_INLINE void CSL_CPGMAC_SL_disableIFCTLB | ( | Uint32 | portNum | ) |

============================================================================
CSL_CPGMAC_SL_disableIFCTLB

Description
This function configures the MAC control register to clear the IFCTL_B bit for the MAC port number specified.

Arguments

            portNum                 MAC port number for which settings must be configured.
     *

Return Value
None

Pre Condition
None

Post Condition
None

Writes
CPGMAC_SL_MACCONTROL_REG_IFCTL_B=0

Example

            Uint32 portNum = 1;

            CSL_CPGMAC_SL_disableIFCTLB (portNum);

=============================================================================

CSL_IDEF_INLINE void CSL_CPGMAC_SL_disableLoopback | ( | Uint32 | portNum | ) |

============================================================================
CSL_CPGMAC_SL_disableLoopback

Description
This function configures the MAC control register to disable loopback mode for the MAC port specified.

Arguments

            portNum                 MAC port number for which settings must be configured.
     *

Return Value
None

Pre Condition
None

Post Condition
None

Writes
CPGMAC_SL_MACCONTROL_REG_LOOPBACK=0

Example

            Uint32  portNum =   1;

            CSL_CPGMAC_SL_disableLoopback (portNum);

=============================================================================

CSL_IDEF_INLINE void CSL_CPGMAC_SL_disableRxCEF | ( | Uint32 | portNum | ) |

============================================================================
CSL_CPGMAC_SL_disableRxCEF

Description
This function configures the MAC control register to disable any error frames being transferred to the memory.

Arguments

            portNum                 MAC port number for which settings must be configured.
     *

Return Value
None

Pre Condition
None

Post Condition
None

Writes
CPGMAC_SL_MACCONTROL_REG_RX_CEF_EN=0

Example

            Uint32 portNum = 1;

            CSL_CPGMAC_SL_disableRxCEF (portNum);

=============================================================================

CSL_IDEF_INLINE void CSL_CPGMAC_SL_disableRxCMF | ( | Uint32 | portNum | ) |

============================================================================
CSL_CPGMAC_SL_disableRxCMF

Description
This function configures the MAC control register to disable any MAC control frames being transferred to the memory.

Arguments

            portNum                 MAC port number for which settings must be configured.
     *

Return Value
None

Pre Condition
None

Post Condition
None

Writes
CPGMAC_SL_MACCONTROL_REG_RX_CMF_EN=0

Example

            Uint32  portNum =   1;

            CSL_CPGMAC_SL_disableRxCMF (portNum);

=============================================================================

CSL_IDEF_INLINE void CSL_CPGMAC_SL_disableRxCSF | ( | Uint32 | portNum | ) |

============================================================================
CSL_CPGMAC_SL_disableRxCSF

Description
This function configures the MAC control register to disable any short frames being transferred to the memory.

Arguments

            portNum                 MAC port number for which settings must be configured.
     *

Return Value
None

Pre Condition
None

Post Condition
None

Writes
CPGMAC_SL_MACCONTROL_REG_RX_CSF_EN=0

Example

            Uint32 portNum = 1;

            CSL_CPGMAC_SL_disableRxCSF (portNum);

=============================================================================

CSL_IDEF_INLINE void CSL_CPGMAC_SL_disableRxFlowControl | ( | Uint32 | portNum | ) |

============================================================================
CSL_CPGMAC_SL_disableRxFlowControl

Description
This function configures the MAC control register to disable Receive flow control mode for the MAC port specified.

Arguments

            portNum                 MAC port number for which settings must be configured.
     *

Return Value
None

Pre Condition
None

Post Condition
None

Writes
CPGMAC_SL_MACCONTROL_REG_RX_FLOW_EN=0

Example

            Uint32  portNum =   1;

            CSL_CPGMAC_SL_disableRxFlowControl (portNum);

=============================================================================

CSL_IDEF_INLINE void CSL_CPGMAC_SL_disableTxFlowControl | ( | Uint32 | portNum | ) |

============================================================================
CSL_CPGMAC_SL_disableTxFlowControl

Description
This function configures the MAC control register to disable Transmit flow control for the MAC port specified.

Arguments

            portNum                 MAC port number for which settings must be configured.
     *

Return Value
None

Pre Condition
None

Post Condition
None

Writes
CPGMAC_SL_MACCONTROL_REG_TX_FLOW_EN=0

Example

            Uint32  portNum =   1;

            CSL_CPGMAC_SL_disableTxFlowControl (portNum);

=============================================================================

CSL_IDEF_INLINE void CSL_CPGMAC_SL_disableTxPace | ( | Uint32 | portNum | ) |

============================================================================
CSL_CPGMAC_SL_disableTxPace

Description
This function configures the MAC control register to disable transmit pacing for the MAC port specified.

Arguments

            portNum                 MAC port number for which settings must be configured.
     *

Return Value
None

Pre Condition
None

Post Condition
None

Writes
CPGMAC_SL_MACCONTROL_REG_TX_PACE=0

Example

            Uint32  portNum = 1;

            CSL_CPGMAC_SL_disableTxPace (portNum);

=============================================================================

CSL_IDEF_INLINE void CSL_CPGMAC_SL_disableTxShortGap | ( | Uint32 | portNum | ) |

============================================================================
CSL_CPGMAC_SL_disableTxShortGap

Description
This function configures the MAC control register to disable transmit short gap for the MAC port specified.

Arguments

            portNum                 MAC port number for which settings must be configured.
     *

Return Value
None

Pre Condition
None

Post Condition
None

Writes
CPGMAC_SL_MACCONTROL_REG_TX_SHORT_GAP_ENABLE=0

Example

            Uint32 portNum  =   1;

            CSL_CPGMAC_SL_disableTxShortGap (portNum);

=============================================================================

CSL_IDEF_INLINE void CSL_CPGMAC_SL_enableExtControl | ( | Uint32 | portNum | ) |

============================================================================
CSL_CPGMAC_SL_enableExtControl

Description
This function configures the MAC control register to enable external control of the Gigabit and full duplex mode settings.

Arguments

            portNum                 MAC port number for which settings must be configured.
     *

Return Value
None

Pre Condition
None

Post Condition
None

Writes
CPGMAC_SL_MACCONTROL_REG_CTL_EN=1

Example

            Uint32 portNum  =   1;

            CSL_CPGMAC_SL_enableExtControl (portNum);

=============================================================================

CSL_IDEF_INLINE void CSL_CPGMAC_SL_enableFullDuplex | ( | Uint32 | portNum | ) |

============================================================================
CSL_CPGMAC_SL_enableFullDuplex

Description
This function configures the MAC control register to enable full duplex mode for the MAC port number specified.

Arguments

            portNum                 MAC port number for which settings must be configured.
     *

Return Value
None

Pre Condition
None

Post Condition
None

Writes
CPGMAC_SL_MACCONTROL_REG_FULLDUPLEX=1

Example

     *      Uint32      portNum =   1;

            CSL_CPGMAC_SL_enableFullDuplex (portNum);

=============================================================================

CSL_IDEF_INLINE void CSL_CPGMAC_SL_enableGigabit | ( | Uint32 | portNum | ) |

============================================================================
CSL_CPGMAC_SL_enableGigabit

Description
This function configures the MAC control register to enable Gigabit mode (full duplex only) for the MAC port specified.

Arguments

            portNum                 MAC port number for which settings must be configured.
     *

Return Value
None

Pre Condition
None

Post Condition
None

Writes
CPGMAC_SL_MACCONTROL_REG_GIG=1

Example

            Uint32 portNum = 1;

            CSL_CPGMAC_SL_enableGigabit (portNum);

=============================================================================

CSL_IDEF_INLINE void CSL_CPGMAC_SL_enableGigForceMode | ( | Uint32 | portNum | ) |

============================================================================
CSL_CPGMAC_SL_enableGigForceMode

Description
This function configures the MAC control register to enable Gigabit force mode for the MAC port number specified.

Arguments

            portNum                 MAC port number for which settings must be configured.
     *

Return Value
None

Pre Condition
None

Post Condition
None

Writes
CPGMAC_SL_MACCONTROL_REG_GIG_FORCE=1

Example

            Uint32  portNum =   1;

            CSL_CPGMAC_SL_enableGigForceMode (portNum);

=============================================================================

CSL_IDEF_INLINE void CSL_CPGMAC_SL_enableGMII | ( | Uint32 | portNum | ) |

============================================================================
CSL_CPGMAC_SL_enableGMII

Description
This function configures the MAC control register to enable GMII for the MAC port specified.

Arguments

            portNum                 MAC port number for which settings must be configured.
     *

Return Value
None

Pre Condition
None

Post Condition
None

Writes
CPGMAC_SL_MACCONTROL_REG_GMII_EN=1

Example

            Uint32  portNum =   1;

            CSL_CPGMAC_SL_enableGMII (portNum);

=============================================================================

CSL_IDEF_INLINE void CSL_CPGMAC_SL_enableIdleMode | ( | Uint32 | portNum | ) |

============================================================================
CSL_CPGMAC_SL_enableIdleMode

Description
This function configures the MAC control register to enable Idle mode for MAC port specified.

Arguments

            portNum                 MAC port number for which settings must be configured.
     *

Return Value
None

Pre Condition
None

Post Condition
None

Writes
CPGMAC_SL_MACCONTROL_REG_CMD_IDLE=1

Example

            Uint32 portNum  =   1;

            CSL_CPGMAC_SL_enableIdleMode (portNum);

=============================================================================

CSL_IDEF_INLINE void CSL_CPGMAC_SL_enableIFCTLA | ( | Uint32 | portNum | ) |

============================================================================
CSL_CPGMAC_SL_enableIFCTLA

Description
This function enables the IFCTL_A bit in the MAC control register for MAC port number specified.

Arguments

            portNum                 MAC port number for which settings must be configured.
     *

Return Value
None

Pre Condition
None

Post Condition
None

Writes
CPGMAC_SL_MACCONTROL_REG_IFCTL_A=1

Example

            Uint32 portNum  =   1;

            CSL_CPGMAC_SL_enableIFCTLA (portNum);

=============================================================================

CSL_IDEF_INLINE void CSL_CPGMAC_SL_enableIFCTLB | ( | Uint32 | portNum | ) |

============================================================================
CSL_CPGMAC_SL_enableIFCTLB

Description
This function enables the IFCTL_B bit in the MAC control register for the MAC port number specified.

Arguments

            portNum                 MAC port number for which settings must be configured.
     *

Return Value
None

Pre Condition
None

Post Condition
None

Writes
CPGMAC_SL_MACCONTROL_REG_IFCTL_B=1

Example

            Uint32  portNum =   1;

            CSL_CPGMAC_SL_enableIFCTLB (portNum);

=============================================================================

CSL_IDEF_INLINE void CSL_CPGMAC_SL_enableLoopback | ( | Uint32 | portNum | ) |

============================================================================
CSL_CPGMAC_SL_enableLoopback

Description
This function configures the MAC control register to enable lopback mode for the MAC port specified.

Arguments

            portNum                 MAC port number for which settings must be configured.
     *

Return Value
None

Pre Condition
None

Post Condition
None

Writes
CPGMAC_SL_MACCONTROL_REG_LOOPBACK=1

Example

            Uint32  portNum = 1;

            CSL_CPGMAC_SL_enableLoopback (portNum);

=============================================================================

CSL_IDEF_INLINE void CSL_CPGMAC_SL_enableRxCEF | ( | Uint32 | portNum | ) |

============================================================================
CSL_CPGMAC_SL_enableRxCEF

Description
This function configures the MAC control register to enable transfer of frames containing errors.

Arguments

            portNum                 MAC port number for which settings must be configured.
     *

Return Value
None

Pre Condition
None

Post Condition
None

Writes
CPGMAC_SL_MACCONTROL_REG_RX_CEF_EN=1

Example

            Uint32 portNum = 1;

            CSL_CPGMAC_SL_enableRxCEF (portNum);

=============================================================================

CSL_IDEF_INLINE void CSL_CPGMAC_SL_enableRxCMF | ( | Uint32 | portNum | ) |

============================================================================
CSL_CPGMAC_SL_enableRxCMF

Description
This function configures the MAC control register to enable transfer of MAC control frames.

Arguments

            portNum                 MAC port number for which settings must be configured.
     *

Return Value
None

Pre Condition
None

Post Condition
None

Writes
CPGMAC_SL_MACCONTROL_REG_RX_CMF_EN=1

Example

            Uint32 portNum = 1;

            CSL_CPGMAC_SL_enableRxCMF (portNum);

=============================================================================

CSL_IDEF_INLINE void CSL_CPGMAC_SL_enableRxCSF | ( | Uint32 | portNum | ) |

============================================================================
CSL_CPGMAC_SL_enableRxCSF

Description
This function configures the MAC control register to enable transfer of frames that are shorter than 64 bytes.

Arguments

            portNum                 MAC port number for which settings must be configured.
     *

Return Value
None

Pre Condition
None

Post Condition
None

Writes
CPGMAC_SL_MACCONTROL_REG_RX_CSF_EN=1

Example

            Uint32 portNum = 1;

            CSL_CPGMAC_SL_enableRxCSF (portNum);

=============================================================================

CSL_IDEF_INLINE void CSL_CPGMAC_SL_enableRxFlowControl | ( | Uint32 | portNum | ) |

============================================================================
CSL_CPGMAC_SL_enableRxFlowControl

Description
This function configures the MAC control register to enable receive flow control for the MAC port specified.

Arguments

            portNum                 MAC port number for which settings must be configured.
     *

Return Value
None

Pre Condition
None

Post Condition
None

Writes
CPGMAC_SL_MACCONTROL_REG_RX_FLOW_EN=1

Example

            Uint32  portNum =   1;

            CSL_CPGMAC_SL_enableRxFlowControl (portNum);

=============================================================================

CSL_IDEF_INLINE void CSL_CPGMAC_SL_enableTxFlowControl | ( | Uint32 | portNum | ) |

============================================================================
CSL_CPGMAC_SL_enableTxFlowControl

Description
This function configures the MAC control register to enable transmit flow control for the MAC port specified.

Arguments

            portNum                 MAC port number for which settings must be configured.
     *

Return Value
None

Pre Condition
None

Post Condition
None

Writes
CPGMAC_SL_MACCONTROL_REG_TX_FLOW_EN=1

Example

            Uint32  portNum =   1;

            CSL_CPGMAC_SL_enableTxFlowControl (portNum);

=============================================================================

CSL_IDEF_INLINE void CSL_CPGMAC_SL_enableTxPace | ( | Uint32 | portNum | ) |

============================================================================
CSL_CPGMAC_SL_enableTxPace

Description
This function configures the MAC control register to enable transmit pacing for the MAC port specified.

Arguments

            portNum                 MAC port number for which settings must be configured.
     *

Return Value
None

Pre Condition
None

Post Condition
None

Writes
CPGMAC_SL_MACCONTROL_REG_TX_PACE=1

Example

            Uint32  portNum = 1;

            CSL_CPGMAC_SL_enableTxPace (portNum);

=============================================================================

CSL_IDEF_INLINE void CSL_CPGMAC_SL_enableTxShortGap | ( | Uint32 | portNum | ) |

============================================================================
CSL_CPGMAC_SL_enableTxShortGap

Description
This function configures the MAC control register to enable transmit short gap for MAC port specified.

Arguments

            portNum                 MAC port number for which settings must be configured.
     *

Return Value
None

Pre Condition
None

Post Condition
None

Writes
CPGMAC_SL_MACCONTROL_REG_TX_SHORT_GAP_ENABLE=1

Example

            Uint32 portNum  =   1;

            CSL_CPGMAC_SL_enableTxShortGap (portNum);

=============================================================================

CSL_IDEF_INLINE void CSL_CPGMAC_SL_getEmulControlReg | ( | Uint32 | portNum,
|  | Uint32 * | pEmulFreeBit,
|  | Uint32 * | pEmulSoftBit |
| ) |  |  |

============================================================================
CSL_CPGMAC_SL_getEmulControlReg

Description
This function retrieves the contents of Emulation control register for the MAC port number specified.

Arguments

            portNum             MAC port number for which the API should retrieve
                                emulation settings for.
            pEmulFreeBit        Emulation free bit.
            pEmulSoftBit        Emulation soft bit.
     *

Return Value
None

Pre Condition
None

Post Condition
None

Reads
CPGMAC_SL_EMCONTROL_REG_FREE, CPGMAC_SL_EMCONTROL_REG_SOFT

Example

            Uint32          emulSoftBit, emulFreeBit, portNum = 1;

            CSL_CPGMAC_SL_getEmulControlReg (portNum, &emulFreeBit, &emulSoftBit);

=============================================================================

CSL_IDEF_INLINE Uint32 CSL_CPGMAC_SL_getMacControlReg | ( | Uint32 | portNum | ) |

============================================================================
CSL_CPGMAC_SL_getMacControlReg

Description
This function retrieves the contents of MAC control register in entirety.

Arguments

            portNum                 MAC port number for which the API must
                                    retrieve the settings.
     *

Return Value
>=0 MAC control register contents.

Pre Condition
None

Post Condition
None

Reads
CPGMAC_SL_MACCONTROL_REG

Example

            Uint32          macControlVal, portNum = 1;

            macControlVal   =   CSL_CPGMAC_SL_getMacControlReg (portNum);

=============================================================================

CSL_IDEF_INLINE void CSL_CPGMAC_SL_getMacRxPriMapReg | ( | Uint32 | portNum,
|  | Uint32 * | pMacRxPriMap |
| ) |  |  |

============================================================================
CSL_CPGMAC_SL_getMacRxPriMapReg

Description
This function retrieves the contents of the MAC Receive Packet Priority to Header Priority Mapping Register for the MAC port specified.

Arguments

            portNum                 MAC port number for which the API should retrieve
                                    settings for.
            pMacRxPriMap            Array of MAC Rx packet priority map priority values
                                    read from the register.
     *

Return Value
None

Pre Condition
The input parameter 'pMacRxPriMap' must be large enough to hold all the 8 priority values read from the register.

Post Condition
None

Reads
CPGMAC_SL_PRI_MAP_REG_PRI0, CPGMAC_SL_PRI_MAP_REG_PRI1, CPGMAC_SL_PRI_MAP_REG_PRI2, CPGMAC_SL_PRI_MAP_REG_PRI3, CPGMAC_SL_PRI_MAP_REG_PRI4, CPGMAC_SL_PRI_MAP_REG_PRI5, CPGMAC_SL_PRI_MAP_REG_PRI6, CPGMAC_SL_PRI_MAP_REG_PRI7

Example

     *      Uint32      pPortRxPriMap [8], portNum = 1;

            CSL_CPGMAC_SL_getMacRxPriMapReg (portNum, pPortRxPriMap);

=============================================================================

CSL_IDEF_INLINE void CSL_CPGMAC_SL_getMacStatusReg | ( | Uint32 | portNum,
|  | CSL_CPGMAC_SL_MACSTATUS * | pMacStatus |
| ) |  |  |

============================================================================
CSL_CPGMAC_SL_getMacStatusReg

Description
This function retrieves the contents of MAC status register.

Arguments

            portNum                 MAC port number for which the API must
                                    retrieve the settings.
            pMacStatus              CSL_CPGMAC_SL_MACSTATUS structure to be populated with
                                    the contents of MAC status register.
     *

Return Value
None

Pre Condition
None

Post Condition
None

Reads
CPGMAC_SL_MACSTATUS_REG_TX_FLOW_ACT, CPGMAC_SL_MACSTATUS_REG_RX_FLOW_ACT, CPGMAC_SL_MACSTATUS_REG_EXT_FULLDUPLEX, CPGMAC_SL_MACSTATUS_REG_EXT_GIG, CPGMAC_SL_MACSTATUS_REG_IDLE

Example

            CSL_CPGMAC_SL_MACSTATUS      macStatus;
            Uint32                       portNum = 1;

            CSL_CPGMAC_SL_getMacStatusReg (portNum, &macStatus);

=============================================================================

CSL_IDEF_INLINE void CSL_CPGMAC_SL_getMacVersionInfo | ( | Uint32 | portNum,
|  | CSL_CPGMAC_SL_VERSION * | pVersionInfo |
| ) |  |  |

============================================================================
CSL_CPGMAC_SL_getMacVersionInfo

Description
This function retrieves the MAC submodule identification and version information for the MAC port specified.

Arguments

            portNum                 MAC port number for which the source MAC address
                                    must be read and returned.
            pVersionInfo            CSL_CPGMAC_SL_VERSION structure that needs to be populated
                                    with the version info read from the hardware.
     *

Return Value
None

Pre Condition
None

Post Condition
None

Reads
CPGMAC_SL_IDVER_REG_Y, CPGMAC_SL_IDVER_REG_X, CPGMAC_SL_IDVER_REG_Z, CPGMAC_SL_IDVER_REG_IDENT

Example

            CSL_CPGMAC_SL_VERSION    versionInfo, portNum;

            portNum =   1;

            CSL_CPGMAC_SL_getMacVersionInfo (portNum, &versionInfo);

=============================================================================

CSL_IDEF_INLINE Uint32 CSL_CPGMAC_SL_getRxMaxLen | ( | Uint32 | portNum | ) |

============================================================================
CSL_CPGMAC_SL_getRxMaxLen

Description
This function retrieves the Receive maximum frame length configured in Receive Maximum length register for the MAC port number specified.

Arguments

            portNum                 MAC port number for which the API must
                                    retrieve the settings.
     *

Return Value
>=0 Receive maximum frame length read.

Pre Condition
None

Post Condition
None

Reads
CPGMAC_SL_RX_MAXLEN_REG_RX_MAXLEN

Example

            Uint32          mtu, portNum = 1;

            mtu =   CSL_CPGMAC_SL_getRxMaxLen (portNum);

=============================================================================

CSL_IDEF_INLINE Uint32 CSL_CPGMAC_SL_getRxPauseTimerReg | ( | Uint32 | portNum | ) |

============================================================================
CSL_CPGMAC_SL_getRxPauseTimerReg

Description
This function retrieves the Receive pause timer value configured in Receive pause timer register for the MAC port specified.

Arguments

            portNum                 MAC port number for which the API must
                                    retrieve the settings.
     *

Return Value
>=0 Receive pause timer value read.

Pre Condition
None

Post Condition
None

Reads
CPGMAC_SL_RX_PAUSE_REG_RX_PAUSETIMER

Example

            Uint32          rxPauseTimer, portNum = 1;

            rxPauseTimer =   CSL_CPGMAC_SL_getRxPauseTimerReg (portNum);

=============================================================================

CSL_IDEF_INLINE Uint32 CSL_CPGMAC_SL_getTxPauseTimerReg | ( | Uint32 | portNum | ) |

============================================================================
CSL_CPGMAC_SL_getTxPauseTimerReg

Description
This function retrieves the Transmit pause timer value configured in Transmit pause timer register for the MAC port specified.

Arguments

            portNum                 MAC port number for which the API must
                                    retrieve the settings.
     *

Return Value
>=0 Transmit pause timer value read.

Pre Condition
None

Post Condition
None

Reads
CPGMAC_SL_TX_PAUSE_REG_TX_PAUSETIMER

Example

            Uint32          txPauseTimer, portNum = 1;

            txPauseTimer =   CSL_CPGMAC_SL_getTxPauseTimerReg (portNum);

=============================================================================

CSL_IDEF_INLINE Uint32 CSL_CPGMAC_SL_isExtControlEnabled | ( | Uint32 | portNum | ) |

============================================================================
CSL_CPGMAC_SL_isExtControlEnabled

Description
This function indicates if EXT_EN bit is enabled in the MAC control register for the MAC port specified. When this bit is set to 1, the Gigabit and Full duplex mode input is taken from an external source and not from the settings configured in this register.

Arguments

            portNum                 MAC port number for which the API must
                                    retrieve the settings.
     *

Return Value
TRUE External control mode enabled.
FALSE External control mode disabled.

Pre Condition
None

Post Condition
None

Reads
CPGMAC_SL_MACCONTROL_REG_CTL_EN

Example

     *      Uint32  portNum =   1;

            if (CSL_CPGMAC_SL_isExtControlEnabled (portNum) == TRUE)
            {
                // external control mode enabled
            }
            else
            {
                // external control mode disabled
            }

=============================================================================

CSL_IDEF_INLINE Uint32 CSL_CPGMAC_SL_isFullDuplexEnabled | ( | Uint32 | portNum | ) |

============================================================================
CSL_CPGMAC_SL_isFullDuplexEnabled

Description
This function indicates if Full duplex mode is enabled in the MAC control register for the MAC port specified.

Arguments

            portNum                 MAC port number for which the API must retrieve the
                                    settings.
     *

Return Value
TRUE Full duplex mode enabled
FALSE Half duplex mode enabled.

Pre Condition
None

Post Condition
None

Reads
CPGMAC_SL_MACCONTROL_REG_FULLDUPLEX

Example

            Uint32 portNum;

            portNum =   1;
            if (CSL_CPGMAC_SL_isFullDuplexEnabled (portNum) == TRUE)
            {
                // full duplex mode enabled
            }
            else
            {
                // full duplex mode disabled
            }

=============================================================================

CSL_IDEF_INLINE Uint32 CSL_CPGMAC_SL_isGigabitEnabled | ( | Uint32 | portNum | ) |

============================================================================
CSL_CPGMAC_SL_isGigabitEnabled

Description
This function indicates if Gigabit mode is enabled in the MAC control register for the MAC port specified.

Arguments

            portNum                 MAC port number for which the API must
                                    retrieve the settings.
     *

Return Value
TRUE Gigabit mode enabled
FALSE Gigabit disabled. 10/100 mode enabled.

Pre Condition
None

Post Condition
None

Reads
CPGMAC_SL_MACCONTROL_REG_GIG

Example

     *      Uint32  portNum = 1;

            if (CSL_CPGMAC_SL_isGigabitEnabled (portNum) == TRUE)
            {
                // gig enabled
            }
            else
            {
                // gig disabled
            }

=============================================================================

CSL_IDEF_INLINE Uint32 CSL_CPGMAC_SL_isGigForceModeEnabled | ( | Uint32 | portNum | ) |

============================================================================
CSL_CPGMAC_SL_isGigForceModeEnabled

Description
This function indicates if Gigabit mode force bit is enabled in the MAC control register for the MAC port number specified.

Arguments

            portNum                 MAC port number for which the API must
                                    retrieve the settings.
     *

Return Value
TRUE Gigabit mode force enabled.
FALSE Gigabit mode force disabled.

Pre Condition
None

Post Condition
None

Reads
CPGMAC_SL_MACCONTROL_REG_GIG_FORCE

Example

            Uint32  portNum =   1;

            if (CSL_CPGMAC_SL_isGigForceModeEnabled (portNum) == TRUE)
            {
                // gig mode force enabled
            }
            else
            {
                // gig mode force disabled
            }

=============================================================================

CSL_IDEF_INLINE Uint32 CSL_CPGMAC_SL_isGMIIEnabled | ( | Uint32 | portNum | ) |

============================================================================
CSL_CPGMAC_SL_isGMIIEnabled

Description
This function indicates if GMII is enabled in the MAC control register for the MAC port specified.

Arguments

            portNum                 MAC port number for which the API must
                                    retrieve the settings.
     *

Return Value
TRUE GMII enabled
FALSE GMII disabled

Pre Condition
None

Post Condition
None

Reads
CPGMAC_SL_MACCONTROL_REG_GMII_EN

Example

     *      Uint32  portNum =   1;

            if (CSL_CPGMAC_SL_isGMIIEnabled (portNum) == TRUE)
            {
                // gmii enabled
            }
            else
            {
                // gmii disabled
            }

=============================================================================

CSL_IDEF_INLINE Uint32 CSL_CPGMAC_SL_isIdleModeEnabled | ( | Uint32 | portNum | ) |

============================================================================
CSL_CPGMAC_SL_isIdleModeEnabled

Description
This function indicates if Idle mode is enabled in the MAC control register for MAC port specified.

Arguments

            portNum                 MAC port number for which the API must
                                    retrieve the settings.
     *

Return Value
TRUE Idle mode enabled
FALSE Idle mode disabled.

Pre Condition
None

Post Condition
None

Reads
CPGMAC_SL_MACCONTROL_REG_CMD_IDLE

Example

     *      Uint32  portNum = 1;

            if (CSL_CPGMAC_SL_isTxShortGapEnabled (portNum) == TRUE)
            {
                // idle mode enabled
            }
            else
            {
                // idle mode disabled
            }

=============================================================================

CSL_IDEF_INLINE Uint32 CSL_CPGMAC_SL_isIFCTLAEnabled | ( | Uint32 | portNum | ) |

============================================================================
CSL_CPGMAC_SL_isIFCTLAEnabled

Description
This function indicates if IFCTL_A bit is set in the MAC control register for MAC port specified.

Arguments

            portNum                 MAC port number for which the API must
                                    retrieve the settings.
     *

Return Value
TRUE IFCTL_A bit in MAC control register is set to 1.
FALSE IFCTL_A bit in MAC control register reads 0.

Pre Condition
None

Post Condition
None

Reads
CPGMAC_SL_MACCONTROL_REG_IFCTL_A

Example

     *      Uint32 portNum  =   1;

            if (CSL_CPGMAC_SL_isIFCTLAEnabled (portNum) == TRUE)
            {
                // IFCTL_A bit set
            }
            else
            {
                // IFCTL_A bit cleared
            }

=============================================================================

CSL_IDEF_INLINE Uint32 CSL_CPGMAC_SL_isIFCTLBEnabled | ( | Uint32 | portNum | ) |

============================================================================
CSL_CPGMAC_SL_isIFCTLBEnabled

Description
This function indicates if IFCTL_B bit is set in the MAC control register for the MAC port number specified.

Arguments

            portNum                 MAC port number for which the API must
                                    retrieve the settings.
     *

Return Value
TRUE IFCTL_B bit in MAC control register is set to 1.
FALSE IFCTL_B bit in MAC control register reads 0.

Pre Condition
None

Post Condition
None

Reads
CPGMAC_SL_MACCONTROL_REG_IFCTL_B

Example

            Uint32  portNum =   1;

            if (CSL_CPGMAC_SL_isIFCTLBEnabled (portNum) == TRUE)
            {
                // IFCTL_B bit set
            }
            else
            {
                // IFCTL_B bit cleared
            }

=============================================================================

CSL_IDEF_INLINE Uint32 CSL_CPGMAC_SL_isLoopbackModeEnabled | ( | Uint32 | portNum | ) |

============================================================================
CSL_CPGMAC_SL_isLoopbackModeEnabled

Description
This function indicates if loopback mode is enabled in the MAC control register for the MAC port specified.

Arguments

            portNum                 MAC port number for which the API must
                                    retrieve the settings.
     *

Return Value
TRUE Internal full duplex lopoback mode enabled
FALSE Loopback mode disabled.

Pre Condition
None

Post Condition
None

Reads
CPGMAC_SL_MACCONTROL_REG_LOOPBACK

Example

     *      Uint32  portNum = 1;

            if (CSL_CPGMAC_SL_isLoopbackModeEnabled (portNum) == TRUE)
            {
                // loopback mode enabled
            }
            else
            {
                // loopback mode disabled
            }

=============================================================================

CSL_IDEF_INLINE Uint32 CSL_CPGMAC_SL_isMACResetDone | ( | Uint32 | portNum | ) |

============================================================================
CSL_CPGMAC_SL_isMACResetDone

Description
This function reads the MAC Soft Reset register to check if the software reset operation has completed.

Arguments

            portNum                 MAC port number for which the API must
                                    retrieve the settings.
     *

Return Value
TRUE MAC Soft reset done.
FALSE MAC Soft reset not yet completed.

Pre Condition
None

Post Condition
None

Reads
CPGMAC_SL_SOFT_RESET_REG_SOFT_RESET

Example

            Uint32  portNum = 1;

            CSL_CPGMAC_SL_resetMac (portNum);

            // Wait until MAC software reset completes
            while (!CSL_CPGMAC_SL_isMACResetDone (portNum));

=============================================================================

CSL_IDEF_INLINE Uint32 CSL_CPGMAC_SL_isRxCEFEnabled | ( | Uint32 | portNum | ) |

============================================================================
CSL_CPGMAC_SL_isRxCEFEnabled

Description
This function indicates if MAC control register is programmed to copy frames containing errors to its memory.

Arguments

            portNum                 MAC port number for which the API must
                                    retrieve the settings.
     *

Return Value
TRUE Copy Error frames mode enabled. Error frames will be transferred to memory.
FALSE Copy Error frames mode disabled. Error frames will be filtered.

Pre Condition
None

Post Condition
None

Reads
CPGMAC_SL_MACCONTROL_REG_RX_CEF_EN

Example

     *      Uint32  portNum =   1;

            if (CSL_CPGMAC_SL_isRxCEFEnabled (portNum) == TRUE)
            {
                // Rx CEF enabled
            }
            else
            {
                // Rx CEF disabled
            }

=============================================================================

CSL_IDEF_INLINE Uint32 CSL_CPGMAC_SL_isRxCMFEnabled | ( | Uint32 | portNum | ) |

============================================================================
CSL_CPGMAC_SL_isRxCMFEnabled

Description
This function indicates if MAC control register is programmed to copy MAC Control Frames to its memory.

Arguments

            portNum                 MAC port number for which the API must
                                    retrieve the settings.
     *

Return Value
TRUE Copy MAC control frames mode enabled. MAC control frames will be transferred to memory.
FALSE Copy MAC control frames mode disabled. MAC control frames will be filtered.

Pre Condition
None

Post Condition
None

Reads
CPGMAC_SL_MACCONTROL_REG_RX_CMF_EN

Example

            Uint32 portNum = 1;

            if (CSL_CPGMAC_SL_isRxCMFEnabled (portNum) == TRUE)
            {
                // Rx CMF enabled
            }
            else
            {
                // Rx CMF disabled
            }

=============================================================================

CSL_IDEF_INLINE Uint32 CSL_CPGMAC_SL_isRxCSFEnabled | ( | Uint32 | portNum | ) |

============================================================================
CSL_CPGMAC_SL_isRxCSFEnabled

Description
This function indicates if MAC control register is programmed to copy short frames (frames shorter than 64 bytes) to its memory.

Arguments

            portNum                 MAC port number for which the API must
                                    retrieve the settings.
     *

Return Value
TRUE Copy Short frames mode enabled. Short frames will be transferred to memory.
FALSE Copy Short frames mode disabled. Short frames will be filtered.

Pre Condition
None

Post Condition
None

Reads
CPGMAC_SL_MACCONTROL_REG_RX_CSF_EN

Example

            Uint32 portNum = 1;

            if (CSL_CPGMAC_SL_isRxCSFEnabled (portNum) == TRUE)
            {
                // Rx CSF enabled
            }
            else
            {
                // Rx CSF disabled
            }

=============================================================================

CSL_IDEF_INLINE Uint32 CSL_CPGMAC_SL_isRxFlowControlEnabled | ( | Uint32 | portNum | ) |

============================================================================
CSL_CPGMAC_SL_isRxFlowControlEnabled

Description
This function indicates if receive flow control is enabled in the MAC control register for the MAC port specified.

Arguments

            portNum                 MAC port number for which the API must
                                    retrieve the settings.
     *

Return Value
TRUE Receive flow control enabled
FALSE Receive flow control disabled

Pre Condition
None

Post Condition
None

Reads
CPGMAC_SL_MACCONTROL_REG_RX_FLOW_EN

Example

     *      Uint32  portNum = 1;

            if (CSL_CPGMAC_SL_isRxFlowControlEnabled (portNum) == TRUE)
            {
                // rx flow control enabled
            }
            else
            {
                // rx flow control disabled
            }

=============================================================================

CSL_IDEF_INLINE Uint32 CSL_CPGMAC_SL_isTxFlowControlEnabled | ( | Uint32 | portNum | ) |

============================================================================
CSL_CPGMAC_SL_isTxFlowControlEnabled

Description
This function indicates if transmit flow control is enabled in the MAC control register for the MAC port specified.

Arguments

            portNum                 MAC port number for which the API must
                                    retrieve the settings.
     *

Return Value
TRUE Transmit flow control enabled
FALSE Transmit flow control disabled

Pre Condition
None

Post Condition
None

Reads
CPGMAC_SL_MACCONTROL_REG_TX_FLOW_EN

Example

     *      Uint32  portNum =   1;

            if (CSL_CPGMAC_SL_isTxFlowControlEnabled (portNum) == TRUE)
            {
                // tx flow control enabled
            }
            else
            {
                // tx flow control disabled
            }

=============================================================================

CSL_IDEF_INLINE Uint32 CSL_CPGMAC_SL_isTxPaceEnabled | ( | Uint32 | portNum | ) |

============================================================================
CSL_CPGMAC_SL_isTxPaceEnabled

Description
This function indicates if transmit pacing is enabled in the MAC control register for the MAC port specified.

Arguments

            portNum                 MAC port number for which the API must
                                    retrieve the settings.
     *

Return Value
TRUE Transmit pacing enabled
FALSE Transmit pacing disabled

Pre Condition
None

Post Condition
None

Reads
CPGMAC_SL_MACCONTROL_REG_TX_PACE

Example

     *      Uint32  portNum =   1;

            if (CSL_CPGMAC_SL_isTxPaceEnabled (portNum) == TRUE)
            {
                // tx pacing enabled
            }
            else
            {
                // tx pacing disabled
            }

=============================================================================

CSL_IDEF_INLINE Uint32 CSL_CPGMAC_SL_isTxShortGapEnabled | ( | Uint32 | portNum | ) |

============================================================================
CSL_CPGMAC_SL_isTxShortGapEnabled

Description
This function indicates if Transmit short gap is enabled in the MAC control register for the MAC port specified.

Arguments

            portNum                 MAC port number for which the API must
                                    retrieve the settings.
     *

Return Value
TRUE Transmit short gap with a short IPG enabled
FALSE Transmit short gap disabled.

Pre Condition
None

Post Condition
None

Reads
CPGMAC_SL_MACCONTROL_REG_TX_SHORT_GAP_ENABLE

Example

     *      Uint32 portNum  =   1;

            if (CSL_CPGMAC_SL_isTxShortGapEnabled (portNum) == TRUE)
            {
                // Tx short gap enabled
            }
            else
            {
                // Tx short gap disabled
            }

=============================================================================

CSL_IDEF_INLINE void CSL_CPGMAC_SL_resetMac | ( | Uint32 | portNum | ) |

============================================================================
CSL_CPGMAC_SL_resetMac

Description
This function issues a software reset to the MAC for the MAC port number specified.

Arguments

            portNum             MAC port number for which the reset must be performed.
     *

Return Value
None

Pre Condition
None

Post Condition
None

Writes
CPGMAC_SL_SOFT_RESET_REG_SOFT_RESET=1

Example

            Uint32 portNum  =   1;

            CSL_CPGMAC_SL_resetMac (portNum);

=============================================================================

CSL_IDEF_INLINE void CSL_CPGMAC_SL_setEmulControlReg | ( | Uint32 | portNum,
|  | Uint32 | emulFreeBit,
|  | Uint32 | emulSoftBit |
| ) |  |  |

============================================================================
CSL_CPGMAC_SL_setEmulControlReg

Description
This function sets up the contents of Emulation control register for the MAC port specified.

Arguments

            portNum             MAC port for which the settings must be configured.
            emulFreeBit         Emulation free bit.
            emulSoftBit         Emulation soft bit.
     *

Return Value
None

Pre Condition
None

Post Condition
None

Reads
CPGMAC_SL_EMCONTROL_REG_FREE, CPGMAC_SL_EMCONTROL_REG_SOFT

Example

            Uint32          emulSoftBit, emulFreeBit, portNum = 1;

            emulFreeBit =   1;
            emulSoftBit =   0;

            CSL_CPGMAC_SL_setEmulControlReg (portNum, emulFreeBit, emulSoftBit);

=============================================================================

CSL_IDEF_INLINE void CSL_CPGMAC_SL_setMacControlReg | ( | Uint32 | portNum,
|  | Uint32 | macControlRegVal |
| ) |  |  |

============================================================================
CSL_CPGMAC_SL_setMacControlReg

Description
This function configures the contents of MAC control register in entirety.

Arguments

            portNum             MAC port number for which the reset must be performed.
            macControlRegVal    value to be configured to the MAC control register.
     *

Return Value
None

Pre Condition
None

Post Condition
None

Writes
CPGMAC_SL_MACCONTROL_REG

Example

            Uint32          macControlVal, portNum = 1;

            macControlVal   =   CSL_CPGMAC_SL_getMacControlReg ();

            // Enable full duplex, giagbit mode too
            macControlVal   |=  CSL_CPGMAC_SL_MACCONTROL_FULLDUPLEX_EN |
                                CSL_CPGMAC_SL_MACCONTROL_GMII_EN;

            CSL_CPGMAC_SL_setMacControlReg (macControlVal, portNum);

=============================================================================

CSL_IDEF_INLINE void CSL_CPGMAC_SL_setMacRxPriMapReg | ( | Uint32 | portNum,
|  | Uint32 * | pMacRxPriMap |
| ) |  |  |

============================================================================
CSL_CPGMAC_SL_setMacRxPriMapReg

Description
This function sets up the contents of the MAC Receive Packet Priority to Header Priority Mapping Register for the MAC port specified.

Arguments

            portNum                 MAC port for which the settings must be configured.
            pMacRxPriMap            Array of MAC Rx priority map priority values
                                    that must be configured to the register.
     *

Return Value
None

Pre Condition
None

Post Condition
None

Writes
CPGMAC_SL_PRI_MAP_REG_PRI0, CPGMAC_SL_PRI_MAP_REG_PRI1, CPGMAC_SL_PRI_MAP_REG_PRI2, CPGMAC_SL_PRI_MAP_REG_PRI3, CPGMAC_SL_PRI_MAP_REG_PRI4, CPGMAC_SL_PRI_MAP_REG_PRI5, CPGMAC_SL_PRI_MAP_REG_PRI6, CPGMAC_SL_PRI_MAP_REG_PRI7

Example

     *      Uint32      i, pMacRxPriMap [8], portNum = 1;

            for (i = 0; i < 8; i ++)
                pMacRxPriMap [i] = i;

            CSL_CPGMAC_SL_setMacRxPriMapReg (portNum, pMacRxPriMap);

=============================================================================

CSL_IDEF_INLINE Uint32 CSL_CPGMAC_SL_setRxMaxLen | ( | Uint32 | portNum,
|  | Uint32 | rxMaxLen |
| ) |  |  |

============================================================================
CSL_CPGMAC_SL_setRxMaxLen

Description
This function sets up the Receive maximum frame length in Receive Maximum length register for the MAC port number specified.

Arguments

            portNum             MAC port number for which the settings must be configured.
     *

Return Value
None

Pre Condition
None

Post Condition
None

Writes
CPGMAC_SL_RX_MAXLEN_REG_RX_MAXLEN

Example

            Uint32          mtu, portNum = 1;

            mtu =   1518;

            CSL_CPGMAC_SL_setRxMaxLen (portNum, mtu);

=============================================================================

CSL_IDEF_INLINE Uint32 CSL_CPGMAC_SL_setRxPauseTimerReg | ( | Uint32 | portNum,
|  | Uint32 | rxPauseTimer |
| ) |  |  |

============================================================================
CSL_CPGMAC_SL_setRxPauseTimerReg

Description
This function sets up the Receive pause timer value in Receive pause timer register for the MAC port specified.

Arguments

            portNum             MAC port number for which the settings must be configured.
     *

Return Value
None

Pre Condition
None

Post Condition
None

Writes
CPGMAC_SL_RX_PAUSE_REG_RX_PAUSETIMER

Example

            Uint32          rxPauseTimer = 2, portNum = 1;

            CSL_CPGMAC_SL_setRxPauseTimerReg (portNum, rxPauseTimer);

=============================================================================

CSL_IDEF_INLINE Uint32 CSL_CPGMAC_SL_setTxPauseTimerReg | ( | Uint32 | portNum,
|  | Uint32 | txPauseTimer |
| ) |  |  |

============================================================================
CSL_CPGMAC_SL_setTxPauseTimerReg

Description
This function sets up the Transmit pause timer value in Transmit pause timer register for the MAC port number specified.

Arguments

            portNum             MAC port number for which the settings must be configured.
     *

Return Value
None

Pre Condition
None

Post Condition
None

Writes
CPGMAC_SL_TX_PAUSE_REG_TX_PAUSETIMER

Example

            Uint32          txPauseTimer = 2, portNum = 1;

            CSL_CPGMAC_SL_setTxPauseTimerReg (portNum, txPauseTimer);

=============================================================================

Copyright 2012, Texas Instruments Incorporated