MCUXpresso SDK API Reference Manual  Rev 2.16.000
NXP Semiconductors
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
Hardware layer

Overview

The hardware layer is mainly designed for code reuse. For example, in the API layer, Switch and Endpoint module which share common code such as port and station interface (SI). In general, the hardware layer maps closely to the hardware modules. User should not invoke the hardware layer directly.

Modules

 Hardware Common Functions
 
 Hardware ENETC
 
 Hardware Port
 
 Hardware Port MAC
 
 Hardware Station Interface(SI)
 
 Hardware Switch
 
 Hardware Table Access Functions
 

Data Structures

struct  netc_isi_kc_rule_t
 NETC PSFP kc profile configuration, the key size (not include the spmp and portp) is up to 16 bytes. More...
 
struct  netc_vlan_classify_config_t
 NETC Vlan classification config. More...
 
struct  netc_qos_classify_profile_t
 NETC Qos Classification profile file (vlan PCP/DEI to IPV/DR map) More...
 
struct  netc_ipf_config_t
 NETC Ingress Filter config. More...
 
struct  netc_func_t
 Register groups for the PCIe function. More...
 
struct  netc_port_hw_t
 Register groups for the Port/Link hardware. More...
 
struct  netc_enetc_hw_t
 Register group for the ENETC peripheral hardware. More...
 
struct  netc_switch_hw_t
 Register group for the Switch peripheral hardware. More...
 
struct  netc_timer_hw_t
 Register group for the Timer peripheral hardware. More...
 
struct  netc_mdio_hw_t
 Register group for both EMDIO and port external MDIO. More...
 

Macros

#define getSiInstance(si)   ((uint8_t)((uint16_t)(si) >> 8U))
 Get SI information from netc_hw_si_idx_t. More...
 
#define getSiNum(si)   ((uint8_t)(((uint16_t)(si) >> 4U) & 0xFU))
 The SI number in the ENETC. More...
 
#define getSiIdx(si)   ((uint8_t)((uint16_t)(si)&0xFU))
 The actaul index in the netc_hw_si_idx_t. More...
 
#define NETC_MSIX_TABLE_OFFSET   (0x10000U)
 MSIX table address offset. More...
 
#define NETC_MSIX_TABLE_PBA_OFFSET   (0x800U)
 MSIX PBA address offset. More...
 
#define NETC_NANOSECOND_ONE_SECOND   (1000000000UL)
 Nanosecond in one second. More...
 

Enumerations

enum  netc_hw_enetc_idx_t {
  kNETC_ENETC0,
  kNETC_ENETC1
}
 ENETC index enumerator. More...
 
enum  netc_hw_switch_idx_t { kNETC_SWITCH0 }
 SWITCH index enumerator. More...
 
enum  netc_hw_port_idx_t {
  kNETC_ENETC0Port = 0U,
  kNETC_ENETC1Port = 0U,
  kNETC_SWITCH0Port0 = 0U,
  kNETC_SWITCH0Port1 = 1U,
  kNETC_SWITCH0Port2 = 2U,
  kNETC_SWITCH0Port3 = 3U,
  kNETC_SWITCH0Port4 = 4U
}
 Port Resource for the NETC module. More...
 
enum  netc_hw_tc_idx_t {
  kNETC_TxTC0 = 0,
  kNETC_TxTC1,
  kNETC_TxTC2,
  kNETC_TxTC3,
  kNETC_TxTC4,
  kNETC_TxTC5,
  kNETC_TxTC6,
  kNETC_TxTC7
}
 Traffic class enumerator. More...
 
enum  netc_hw_bdr_idx_t
 Enumeration for the ENETC SI BDR identifier.
 
enum  netc_hw_swt_cbdr_idx_t {
  kNETC_SWTCBDR0 = 0U,
  kNETC_SWTCBDR1
}
 Switch command BD ring index enumerator. More...
 
enum  netc_hw_etm_class_queue_idx_t {
  kNETC_ClassQueue0 = 0,
  kNETC_ClassQueue1,
  kNETC_ClassQueue2,
  kNETC_ClassQueue3,
  kNETC_ClassQueue4,
  kNETC_ClassQueue5,
  kNETC_ClassQueue6,
  kNETC_ClassQueue7
}
 Enumerator for ETM class queue identifier. More...
 
enum  netc_hw_congestion_group_idx_t
 Enumerator for the ETM congestion group.
 
enum  netc_hw_mii_mode_t {
  kNETC_XgmiiMode = 0U,
  kNETC_MiiMode = 1U,
  kNETC_GmiiMode = 2U,
  kNETC_RmiiMode = 3U,
  kNETC_RgmiiMode = 4U
}
 Defines the MII/RGMII mode for data interface between the MAC and the PHY. More...
 
enum  netc_hw_mii_speed_t {
  kNETC_MiiSpeed10M = 0U,
  kNETC_MiiSpeed100M = 1U,
  kNETC_MiiSpeed1000M = 2U,
  kNETC_MiiSpeed2500M = 3U,
  kNETC_MiiSpeed5G = 4U,
  kNETC_MiiSpeed10G = 5U
}
 Defines the speed for the *MII data interface. More...
 
enum  netc_hw_mii_duplex_t {
  kNETC_MiiHalfDuplex = 0U,
  kNETC_MiiFullDuplex
}
 Defines the half or full duplex for the MII data interface. More...
 

Data Structure Documentation

struct netc_isi_kc_rule_t

Data Fields

bool etp: 1
 2 Byte Ethertype field present in the key
 
bool sqtp: 1
 1 Byte Sequence Tag present in the key
 
bool ipcpp: 1
 inner VLAN header's PCP field present in the key
 
bool ividp: 1
 inner VLAN ID present in the key
 
bool opcpp: 1
 outer VLAN header's PCP field present in the key
 
bool ovidp: 1
 outer VLAN ID present in the key
 
bool smacp: 1
 6 bytes of source MAC address present in the key
 
bool dmacp: 1
 6 bytes of destination MAC address present in the key
 
bool spmp: 1
 switch port masquerading flag present in the key
 
bool portp: 1
 source port present in the key
 
bool valid: 1
 Key Construction is valid.
 
uint8_t lbMask: 3
 Payload Last Byte Mask.
 
uint8_t fbMask: 3
 Payload First Byte Mask.
 
uint8_t byteOffset: 7
 Payload Byte Offset where field extraction begins.
 
uint8_t numBytes: 4
 Specify the size (numBytes + 1) of the payload key field.
 
uint8_t pfp: 1
 Payload field Present.
 
struct netc_vlan_classify_config_t

Data Fields

bool enableCustom1
 Enable/Disable custom0 ether type.
 
uint16_t custom1EtherType
 Ethertype.
 
bool enableCustom2
 Enable/Disable custom0 ether type.
 
uint16_t custom2EtherType
 Ethertype.
 
uint16_t preStandRTAGType
 802.1CB draft 2.0 R-TAG Ethertype value. More...
 

Field Documentation

uint16_t netc_vlan_classify_config_t::preStandRTAGType

PSRTAGETR. Only applicable for switch

struct netc_qos_classify_profile_t

Data Fields

uint8_t ipv [16]
 Index is created from PCP (3 bits) + DEI (1 bit) field. More...
 
uint8_t dr [16]
 Index is created from PCP (3 bits) + DEI (1 bit) field. More...
 

Field Documentation

uint8_t netc_qos_classify_profile_t::ipv[16]

Value is the mapped IPV for Qos.

uint8_t netc_qos_classify_profile_t::dr[16]

Value is the mapped DR for QoS.

struct netc_ipf_config_t

Data Fields

bool l2DiscardMCSmac
 DOSL2CR. More...
 
bool l2DiscardSmacEquDmac
 DOSL2CR. More...
 
bool l3DiscardSipEquDip
 DOSL3CR. More...
 

Field Documentation

bool netc_ipf_config_t::l2DiscardMCSmac

Discard received frames with Multicast SMAC address

bool netc_ipf_config_t::l2DiscardSmacEquDmac

Discard received frames with SMAC = DMAC

bool netc_ipf_config_t::l3DiscardSipEquDip

Discard IPV3/IPV6 source address == destination address

struct netc_func_t
struct netc_port_hw_t

Data Fields

NETC_PORT_Type * port
 Port Address.
 
NETC_ETH_LINK_Type * eth
 MAC Port Address.
 
NETC_PSEUDO_LINK_Type * pseudo
 Pseudo link port address.
 
struct netc_enetc_hw_t

Data Fields

netc_func_t func
 PCIE function register.
 
NETC_ENETC_Type * base
 Base register of ENETC module.
 
NETC_SW_ENETC_Type * common
 Common register of ENETC module.
 
netc_port_hw_t portGroup
 Port register group.
 
ENETC_GLOBAL_Type * global
 Global NETC address.
 
ENETC_SI_Type * si
 Station Interfce for the P/V SI.
 
netc_msix_entry_tmsixTable
 MSIX table address.
 
struct netc_switch_hw_t

Data Fields

ENETC_PCI_TYPE0_Type * func
 Base address for PCIE function.
 
NETC_SW_Type * base
 Base address for Switch.
 
NETC_SW_ENETC_Type * common
 Common address of ENETC Module.
 
netc_port_hw_t ports [FSL_FEATURE_NETC_SWITCH_MAX_PORT_NUMBER]
 Port Register Group.
 
ENETC_GLOBAL_Type * global
 GLobal NETC Register Base Address.
 
netc_msix_entry_tmsixTable
 MSIX table address.
 
struct netc_timer_hw_t

Data Fields

ENETC_PCI_TYPE0_Type * func
 PCIE function register.
 
ENETC_PF_TMR_Type * base
 Base register address for timer module.
 
ENETC_GLOBAL_Type * global
 Global NETC register address.
 
netc_msix_entry_tmsixTable
 MSIX table address.
 
struct netc_mdio_hw_t

Data Fields

__IO uint32_t EMDIO_CFG
 External MDIO configuration register, offset: 0x1C00.
 
__IO uint32_t EMDIO_CTL
 External MDIO interface control register, offset: 0x1C04.
 
__IO uint32_t EMDIO_DATA
 External MDIO interface data register, offset: 0x1C08.
 
__IO uint32_t EMDIO_ADDR
 External MDIO register address register, offset: 0x1C0C.
 
__I uint32_t EMDIO_STAT
 External MDIO status register, offset: 0x1C10.
 
__IO uint32_t PHY_STATUS_CFG
 PHY status configuration register, offset: 0x1C20.
 
__IO uint32_t PHY_STATUS_CTL
 PHY status control register, offset: 0x1C24.
 
__I uint32_t PHY_STATUS_DATA
 PHY status data register, offset: 0x1C28.
 
__IO uint32_t PHY_STATUS_ADDR
 PHY status register address register, offset: 0x1C2C.
 
__IO uint32_t PHY_STATUS_EVENT
 PHY status event register, offset: 0x1C30.
 
__IO uint32_t PHY_STATUS_MASK
 PHY status mask register, offset: 0x1C34.
 

Macro Definition Documentation

#define getSiInstance (   si)    ((uint8_t)((uint16_t)(si) >> 8U))

The ENETC instance of this SI.

#define getSiNum (   si)    ((uint8_t)(((uint16_t)(si) >> 4U) & 0xFU))
#define getSiIdx (   si)    ((uint8_t)((uint16_t)(si)&0xFU))
#define NETC_MSIX_TABLE_OFFSET   (0x10000U)
#define NETC_MSIX_TABLE_PBA_OFFSET   (0x800U)
#define NETC_NANOSECOND_ONE_SECOND   (1000000000UL)

Enumeration Type Documentation

Enumerator
kNETC_ENETC0 

ENETC hardware 0.

kNETC_ENETC1 

ENETC hardware 0.

Enumerator
kNETC_SWITCH0 

SWITCH hardware 0.

Enumerator
kNETC_ENETC0Port 

MAC port for ENETC0.

kNETC_ENETC1Port 

Pseudo MAC port for ENETC1.

kNETC_SWITCH0Port0 

MAC port0 for SWITCH.

kNETC_SWITCH0Port1 

MAC port1 for SWITCH.

kNETC_SWITCH0Port2 

MAC port2 for SWITCH.

kNETC_SWITCH0Port3 

MAC port3 for SWITCH.

kNETC_SWITCH0Port4 

Pseudo port4 for SWITCH.

Enumerator
kNETC_TxTC0 

Traffic class 0.

kNETC_TxTC1 

Traffic class 1.

kNETC_TxTC2 

Traffic class 2.

kNETC_TxTC3 

Traffic class 3.

kNETC_TxTC4 

Traffic class 4.

kNETC_TxTC5 

Traffic class 5.

kNETC_TxTC6 

Traffic class 6.

kNETC_TxTC7 

Traffic class 7.

Enumerator
kNETC_SWTCBDR0 

Switch command BD ring 0.

kNETC_SWTCBDR1 

Switch command BD ring 1.

Enumerator
kNETC_ClassQueue0 

ETM Class Queue 0.

kNETC_ClassQueue1 

ETM Class Queue 1.

kNETC_ClassQueue2 

ETM Class Queue 2.

kNETC_ClassQueue3 

ETM Class Queue 3.

kNETC_ClassQueue4 

ETM Class Queue 4.

kNETC_ClassQueue5 

ETM Class Queue 5.

kNETC_ClassQueue6 

ETM Class Queue 6.

kNETC_ClassQueue7 

ETM Class Queue 7.

Enumerator
kNETC_XgmiiMode 

XGMII mode for data interface.

kNETC_MiiMode 

MII mode for data interface.

kNETC_GmiiMode 

GMII mode for data interface.

kNETC_RmiiMode 

RMII mode for data interface.

kNETC_RgmiiMode 

RGMII mode for data interface.

Enumerator
kNETC_MiiSpeed10M 

Speed 10 Mbps.

kNETC_MiiSpeed100M 

Speed 100 Mbps.

kNETC_MiiSpeed1000M 

Speed 1000 Mbps.

kNETC_MiiSpeed2500M 

Speed 2500 Mbps.

kNETC_MiiSpeed5G 

Speed 5Gbps.

kNETC_MiiSpeed10G 

Speed 10Gbps Mbps.

Enumerator
kNETC_MiiHalfDuplex 

Half duplex mode.

kNETC_MiiFullDuplex 

Full duplex mode.