以太网 (Ethernet)

简介

本芯片集成了符合 IEEE 802.3 标准的以太网媒体访问控制器(Media Access Control, MAC),通过简化媒体独立接口(Reduced Media Independent Interface, RMII)连接外部物理层芯片(Physical Layer, PHY),并通过串行管理接口(Serial Management Interface, SMI)配置和管理 PHY。

MAC 负责帧的封装与解析、循环冗余校验(Cyclic Redundancy Check, CRC)的生成与检查、流量控制,以及通过描述符与内存之间的数据搬运。

特性

  • 接口与速率

    • 支持 RMII 接口。

    • 支持 10/100 Mbps 速率,支持全双工和半双工。

    • 支持通过 SMI(MDC/MDIO)接口访问 PHY 寄存器,MAC 作为 SMI 主机。

    • 支持 PHY 寄存器的自动轮询,用于获取链路状态。

  • 工作模式与时钟

    • 支持 MAC to PHY 和 MAC to MAC 两种连接方式。

    • 支持由芯片内部 PLL 分频产生 50 MHz 时钟,或由 EXTCLK 引脚输入 50 MHz 时钟。

    • 支持通过 EXTCLK 引脚向 PHY 输出 25 MHz 或 50 MHz 时钟。

  • 帧处理

    • 全双工模式支持 IEEE 802.3x 流量控制,半双工模式支持 CSMA/CD 协议。

    • 发送方向由硬件自动填充至最小帧长,并根据描述符的 CRC 位决定是否追加 CRC。

    • 接收方向由硬件校验 CRC,并支持 IPv4 头、TCP、UDP 的校验和检查;发送方向支持 IPv4 头、TCP、UDP 校验和的自动填充。

    • 支持接收巨型帧(Jumbo Frame)。

    • 支持接收帧的目的地址过滤(单播、组播、广播、混杂模式)。

    • 支持 VLAN 标签的硬件处理:发送方向支持插入、移除和重标记,接收方向支持剥离。

  • 数据搬运与中断

    • 通过环形描述符与内存交换数据,发送与接收各一个描述符环。

    • 提供发送完成、接收完成、描述符耗尽、接收 FIFO 溢出等中断,并支持接收中断合并。

    • 提供收发统计计数器。

  • 节能与测试

    • 支持节能以太网(Energy Efficient Ethernet, EEE)。

    • 支持 MAC 环回模式。

框图

下图展示了以太网模块的架构,包含 AXI 从接口、MAC 控制寄存器、以太网 DMA、收发 FIFO、校验和卸载、VLAN 处理、LPI 客户端和 MAC 管理模块。

../../_images/eth_hw_arch.svg

以太网架构示意图

  • AXI 从接口与 MAC 控制寄存器:CPU 通过 AXI 从接口访问 MAC 控制寄存器,完成模式、过滤、流量控制、中断等配置。

  • 以太网 DMA:通过 AXI 总线读取发送描述符与数据,并将接收数据写入内存,详见 描述符与 DMA。

  • TX-FIFO / RX-FIFO:发送和接收方向各有一个最大 2 KB 的 FIFO,用于缓冲 DMA 与 RMII 接口之间的数据。

  • 校验和卸载:在接收方向校验 IPv4 头、TCP 和 UDP 校验和,在发送方向自动填充校验和。

  • VLAN 处理:在发送方向插入、移除或重标记 VLAN 标签,在接收方向剥离 VLAN 标签。

  • LPI 客户端:根据发送队列状态发起低功耗空闲(Low Power Idle, LPI)请求,用于 EEE。

  • MAC 管理:通过 MDC/MDIO 访问 PHY 寄存器。

发送时,软件把待发送的数据放入缓冲区并设置描述符,以太网 DMA 从内存读取数据,经发送 FIFO 送到 MAC,由 MAC 通过 RMII 接口发给 PHY。接收时,MAC 从 RMII 接口收到数据,经接收 FIFO 送到以太网 DMA,由 DMA 写入内存中的缓冲区,并回写描述符中的长度和状态。

功能描述

本节描述以太网 MAC 的功能。

接口

MAC 与外部 PHY 之间通过两个接口连接:传输数据的 RMII,以及配置管理 PHY 的 SMI(MDC/MDIO)。

RMII 数据接口

RMII 将 MII 的 4 位数据总线缩减为 2 位,代价是 REF_CLK 频率由 25 MHz 提高到 50 MHz,以保持 100 Mbps 的带宽。

RMII 信号定义

信号

缩写

方向

描述

TX Data 0/1

TXD0/TXD1

MAC → PHY

发送数据,2 位宽,TXD0 为低位。100 Mbps 时每个 REF_CLK 周期传输一组 2 位数据;10 Mbps 时每组数据保持多个周期。

TX Enable

TX_EN

MAC → PHY

发送使能。为高电平时表示 TXD 数据有效。

RX Data 0/1

RXD0/RXD1

PHY → MAC

接收数据,2 位宽,RXD0 为低位。100 Mbps 时每个 REF_CLK 周期传输一组 2 位数据;10 Mbps 时每组数据保持多个周期。

RX Error

RX_ERR

PHY → MAC

接收错误指示。PHY 检测到接收帧存在错误(如编码错误)时为高电平。

CRS_DV

CRS_DV

PHY → MAC

载波侦听(Carrier Sense)与接收数据有效(Data Valid)的复合信号,MAC 按 RMII 规则从该信号中解码出两种状态。

Reference Clock

REF_CLK

输入或输出

50 MHz 参考时钟,MAC 和 PHY 以此时钟同步收发数据。方向按所选时钟方案确定,且只能由一方驱动,详见 时钟。

备注

IEEE 802.3u 定义了 RX_ERR 信号。实际应用中,MAC 可以不使用该信号,仅依靠以太网帧自带的帧校验序列(Frame Check Sequence, FCS)校验数据完整性。

SMI 管理接口

SMI 又称 MDIO 接口,是以太网 MAC 与 PHY 之间交换管理数据的两线串行接口,最高时钟频率为 2.5 MHz。MAC 作为站管理实体(Station Management Entity, STA),是总线主机,负责发起读写帧并驱动 MDC 时钟;PHY 是总线从机,响应 STA 的读写请求。

SMI 信号定义

信号

缩写

方向

描述

Management Data Clock

MDC

MAC → PHY

管理数据时钟,为 MDIO 数据传输提供时钟基准,最高 2.5 MHz。

Management Data Input/Output

MDIO

双向

管理数据线,传输命令和状态数据,需外部上拉。

MDC 不要求是连续的周期信号,STA 可以在两帧之间停止 MDC。只要不超过最高频率,MDC 可以工作在任意较低频率。

MAC 支持通过 MDIO 对 PHY 状态的自动轮询,由 MIIAR 寄存器的 DISABLE_AUTO_POLLING 位控制:该位为 0 时,硬件自动轮询 PHY 状态,并将链路、双工和自协商完成状态反映到 MSR 寄存器的 LINKB、FULLDUPREG 和 NWCOMPLETE 位;该位为 1 时,硬件不再轮询。

时钟

RMII 的数据采样依赖 50 MHz 的 REF_CLK,MAC 和 PHY 必须使用同一个 REF_CLK,且 REF_CLK 只能由一方驱动。MAC 的内部工作时钟与 RMII 采样用的 REF_CLK 是不同的概念,两者的来源以及 REF_CLK 的方向,需要按所选的时钟方案分别配置。如果两端各自从独立的晶振产生 50 MHz 作为 REF_CLK,两者存在频率偏差(PPM),会因采样点漂移导致 CRC 错误。

MSR 寄存器的 REFCLK_ON 位控制 MAC 是否驱动 REF_CLK:由 MAC 提供 REF_CLK 时置 1,由 PHY 或外部时钟源提供时清 0。该位不是 MAC 内部工作时钟的来源选择位。

../../_images/eth_clk_overview.svg

MAC 与 PHY 的时钟架构

MAC 的 50 MHz 时钟有两种来源:

  • 内部时钟源:由芯片内部 PLL 分频得到 50 MHz。要求系统时钟配置能够分出 50 MHz。

  • 外部时钟源:50 MHz 时钟从 EXTCLK 引脚输入,此时 MAC 不使用内部分频。

REF_CLK 的方向与 PHY 的时钟来源有关:

MAC 与 PHY 的时钟方案

方案

MAC 时钟来源

PHY 时钟来源

REF_CLK 方向(MAC 侧)

EXTCLK 引脚

Ameba 提供 50 MHz

内部

Ameba 输出 50 MHz

输出

输出时钟

Ameba 提供 25 MHz

内部

Ameba 输出 25 MHz

输出

输出时钟

MAC 与 PHY 独立时钟源

内部

PHY 自带晶振

输入

不使用

外部时钟源

外部

外部 50 MHz 时钟源(与 MAC 同源)

输入

输入时钟

各方案的选择依据和板级接线请参考以太网应用笔记。

备注

EXTCLK 引脚在输出和输入两种用途中只能二选一,不能同时使用。切换到外部时钟源时,外部时钟必须先于时钟选择到达 EXTCLK 引脚,否则 MAC 会失去时钟。

工作模式

MAC 的 RMII 接口有两种连接方式:MAC to PHY 和 MAC to MAC。

MAC to PHY

MAC to PHY 为默认连接方式,MAC 连接外部 PHY 芯片。此时 RMII 接口遵循标准 MAC 的定义,MAC 驱动 TX 信号线,并通过 MDC/MDIO 接口管理外部 PHY。

../../_images/eth_mac_mode.svg

MAC 连接外部 PHY 芯片

MAC to MAC

MAC to MAC 用于两个带 MAC 的芯片直接互连,无需外接 PHY 芯片。

传统连接方式中,两端 MAC 之间需要两颗 PHY 芯片(图 (a) 中虚线框内的额外器件)。MAC to MAC 则由本端 MAC 在 RMII 接口上扮演 PHY 一侧的角色,与对端 MAC 直连,省去这些器件(图 (b)):

../../_images/eth_mac_phy.svg

传统连接方式与 MAC to MAC

MAC to MAC 下需要注意:

  • 没有 PHY 芯片参与,无法进行自协商,必须强制指定速率和双工模式,且两端配置一致。

  • 两端的收发信号需要交叉连接,即一端的 TX 连接对端的 RX。

  • 两端的 REF_CLK 需要同源,建议由其中一端输出 50 MHz 给另一端,或两端共用同一个外部时钟源,以避免两端时钟频率偏差导致数据采样错误。

自协商

自协商(Auto-Negotiation)使链路两端的设备通过交换能力信息,自动选择相同的工作参数,包括双工模式、运行速率和流量控制能力。协商完成后,两端锁定在相同的双工模式和速率。自协商由 PHY 按 IEEE 802.3 完成,MAC 通过 SMI 读取协商结果。

../../_images/eth_autonego.svg

链路脉冲和链路码字

自协商通过链路上的脉冲传递信息:

  • 标准链路脉冲(Normal Link Pulse, NLP):用于 10BASE-T,仅用于检测链路是否连通,不携带速率信息。

  • 快速链路脉冲(Fast Link Pulse, FLP):用于 100BASE-TX,将 NLP 扩展为脉冲簇,每个脉冲簇携带一个 16 位的链路码字,用于通告速率和双工能力。

并行检测

当一端开启自协商,另一端不支持或关闭了自协商(固定模式)时,开启自协商的一端通过并行检测建立链路:

  • 检测到 NLP,判定对端为 10 Mbps 设备。

  • 检测到 4B/5B 编码的空闲码流,判定对端为 100 Mbps 设备。

警告

并行检测无法获取对端的双工模式,开启自协商的一端按标准规定处理为半双工。如果对端被强制为全双工,则两端的双工模式不匹配,链路虽然显示连通,但会出现冲突和 CRC 错误,并伴随严重丢包。

协商结果

两端配置与链路结果

本端配置

对端配置

链路结果

说明

自协商

自协商

成功

双方交换能力集,锁定在共同支持的最高性能模式,例如 100 Mbps 全双工。

自协商

固定 10/100 Mbps 半双工

成功

触发并行检测,本端匹配速率并设为半双工。

自协商

固定 10/100 Mbps 全双工

双工不匹配

链路连通,但本端被并行检测设为半双工,对端为全双工,产生冲突和 CRC 错误。

自协商(仅全双工)

自协商(仅半双工)

失败

双方能力集没有交集,无法建立链路。

固定速率模式 A

固定速率模式 B

速率不同:失败;速率相同、双工不同:双工不匹配

速率不同时物理层无法同步,链路断开;速率相同而双工不同时链路可能连通,但会出现冲突和 CRC 错误,丢包严重。

强制模式

关闭自协商后,需要强制指定速率和双工模式,并保证 PHY 与 MAC 的配置一致,即 PHY 侧也必须同步强制。MAC 侧通过 MSR 寄存器强制速率和双工:

  • FORCE_SPD_MODE 置 1 时,MAC 工作在强制速率模式,具体速率由 FORCE_SPD 字段设置,00 表示 100 Mbps,01 表示 10 Mbps,11 表示不强制;FORCE_SPD_MODE 为 0 时,速率来自 MDIO 自动轮询的结果。

  • FORCEDFULLDUP 置 1 时,MAC 强制工作在全双工模式;为 0 时,双工状态来自 MDIO 自动轮询的结果。

MAC to MAC 连接没有 PHY 参与,必须使用强制配置。

状态读取

链路和协商状态可以从 MSR 寄存器读取,以下为只读状态位:

位

含义

LINKB

链路状态的反码。0 表示链路正常,1 表示链路断开。

NWCOMPLETE

自协商完成。

FULLDUPREG

来自 MDIO 结果的双工状态,1 表示全双工。

链路状态发生变化时,ISR 寄存器的 LINKCHG 位置位。

描述符与 DMA

MAC 通过 DMA 与内存交换数据。软件通过内存中的描述符向 MAC 提交数据缓冲区,缓冲区的地址、长度和状态都记录在描述符中,数据搬运由 DMA 完成。

../../_images/eth_desc_ring.svg

描述符和缓冲区

描述符环

发送和接收各有一个描述符环,环中的每个描述符对应一个数据缓冲区。描述符的长度由描述符格式决定,见下文“描述符格式”。

  • 发送环的首地址由 TXFDP1 寄存器设置。

  • 接收环的首地址由 RXFDP1 寄存器设置,环中描述符的数量由 RX_RINGSIZE1 寄存器设置。该寄存器是掩码形式,数值为描述符数量减 1,例如 0x00F 表示 16 个描述符,因此接收描述符的数量必须是 2 的幂,驱动要求取值范围为 4~4096。使能接收巨型帧时,接收描述符的数量不得小于 16。

  • 环中最后一个描述符的 EOR 位置 1,硬件处理完该描述符后回到环的首地址。

  • TXCDO1、RXCDO1 寄存器指示硬件当前处理的描述符相对于环首地址的偏移。

备注

本模块只支持一个发送描述符环和一个接收描述符环,不支持多个描述符环。寄存器中带编号 2 及以上的描述符环相关寄存器(例如 TXFDP2 ~ TXFDP5、RXFDP2 ~ RXFDP6)不可使用,软件不需要配置。

描述符所有权

每个描述符的 OWN 位(Word 0 的 bit31)表示当前由谁处理该描述符:

  • OWN 为 1:描述符归 DMA 所有。对发送描述符,表示软件已准备好待发送的数据;对接收描述符,表示软件已分配好空闲缓冲。此时软件不应修改该描述符。

  • OWN 为 0:描述符归 CPU 所有。DMA 完成数据搬运后清零该位,软件可以回收已发送的缓冲,或读取新接收的数据。

发送流程:

  1. 软件检查当前发送描述符的 OWN 为 0,即描述符可用。

  2. 软件填写数据缓冲区地址(Word 1)、长度和控制位(Word 0)。

  3. 软件将 OWN 置 1,把描述符交给 DMA。

  4. 软件将 ETH_ETHER_IO_CMD 寄存器的 TXFN1ST 位置 1,通知 DMA 开始发送。

  5. DMA 读取数据并发送,完成后清零 OWN。

警告

描述符位于普通内存,TXFN1ST 是对设备寄存器的写入,两者之间不保证访问顺序。置位 OWN 之后、写 TXFN1ST 之前,必须插入内存屏障(例如 ARM 的 dsb 指令),否则 DMA 可能在看到 OWN 之前就被唤醒。

接收流程:

  1. 软件在每个接收描述符的 Word 0 中写入 OWN 和缓冲区大小,并在 Word 1 中写入缓冲区地址。

  2. MAC 将收到的帧写入缓冲区,写完后清零 OWN,并在 Word 0 中回写帧长度和接收状态。

  3. 软件检测到 OWN 为 0,读取接收状态和数据。

  4. 软件重新写入 OWN 和缓冲区大小,把描述符还给 DMA。

接收描述符耗尽时,ISR 寄存器的 RDU1 位置位,MAC 停止取接收描述符,直到软件释放描述符并向该位写 1 清除,接收才会恢复。

硬件要求描述符环的首地址和接收缓冲区的地址按 4 字节对齐。描述符和数据缓冲区如果位于带缓存的内存中,还需要满足缓存行对齐,并由软件保证 DMA 与 CPU 看到的内容一致,具体要求请参考以太网应用笔记。

一帧占用多个描述符时,FS 置位的描述符是帧的第一个,LS 置位的描述符是帧的最后一个。

描述符格式

本模块仅支持 Apollo 格式的短描述符。发送描述符占 5 个字(20 字节),接收描述符占 4 个字(16 字节),格式分别如 发送描述符 和 接收描述符 所示。

同一个描述符在使用过程中,软件在提交之前设置命令字段,DMA 处理完成后,接收方向由硬件回写帧长度和接收状态,发送方向除 OWN 外其他字段保持不变。所有权的交接见“描述符所有权”。

../../_images/eth_desc_tx.svg

发送描述符

../../_images/eth_desc_rx.svg

接收描述符

发送描述符

发送描述符是命令描述符,软件在置位 OWN 之前设置好各字段。发送完成后,硬件只清零 OWN,其他字段保持不变,软件通过 OWN 判断该描述符是否可以复用。

发送描述符的字段

字

位

名称

含义

Word 0

[31]

OWN

所有权,1 表示归 DMA,0 表示归 CPU。

Word 0

[30]

EOR

1 表示该描述符是环中的最后一个。

Word 0

[29]

FS

1 表示该描述符包含帧的开头。

Word 0

[28]

LS

1 表示该描述符包含帧的结尾。

Word 0

[27]

IPCS

1 表示由硬件计算 IPv4 头校验和。

Word 0

[26]

L4CS

1 表示由硬件计算 TCP/UDP 校验和。置位时 IPCS 也必须置位。

Word 0

[23]

CRC

1 表示由硬件在帧末尾追加帧校验序列。

Word 0

[16:0]

Data Length

该描述符指向的缓冲区中的有效字节数。

Word 1

[31:0]

Buffer Address

缓冲区的起始地址。

Word 2

[26:25]

VLAN_ACT

VLAN 标签动作,详见 VLAN 一节。

Word 2

[15:0]

VLAN_TAG

插入或重标记时使用的标签内容。

Word 4

[31]

LGSEN

1 表示该帧使用大包发送卸载(Large Send Offload, LSO),由硬件按 LGMTU 自动分段,详见 LSO 一节。

Word 4

[30:20]

LGMTU

LSO 分段后每个帧的 IP 总长度,单位为字节,详见 LSO 一节。

图中灰色的位不使用,软件写 0。

接收描述符

接收描述符的 OWN、EOR、缓冲区地址和缓冲区大小由软件在交给 DMA 之前设置。收到帧后,MAC 把帧写入缓冲区,清零 OWN,并回写帧长度和接收状态,软件检测到 OWN 为 0 后读取。

接收描述符的字段

字

位

名称

有效时机

含义

Word 0

[31]

OWN

接收前设置,接收后清零

接收前置 1,表示描述符归 DMA,对应的缓冲区空闲。收到帧后由硬件清零,表示描述符归 CPU,已收到数据。

Word 0

[30]

EOR

接收前设置

1 表示该描述符是环中的最后一个。

Word 1

[31:0]

Buffer Address

接收前设置

缓冲区的起始地址。

Word 0

[29]

FS

接收后有效

1 表示该描述符包含帧的开头。

Word 0

[28]

LS

接收后有效

1 表示该描述符包含帧的结尾。

Word 0

[27]

CRCERR

接收后有效

1 表示帧存在 CRC 错误。仅当 RCR 寄存器的 AER 位置 1 时才会收到带 CRC 错误的帧。

Word 0

[26]

IPV4CSF

接收后有效

1 表示硬件检测到 IPv4 头校验和错误。仅当 PKTTYPE 为 1~6 时有效;为其他值时该位固定为 1,不表示校验错误。

Word 0

[25]

L4CSF

接收后有效

1 表示硬件检测到 TCP/UDP/ICMP/IGMP 校验和错误。仅当 PKTTYPE 为 3、4、5、6、8、9、0xA 时有效;为 0、1、2、7 时该位固定为 1,不表示校验错误。

Word 0

[23]

IPFRAG

接收后有效

1 表示该帧是 IP 分片。

Word 0

[20:17]

PKTTYPE

接收后有效

包类型,0 表示以太网帧(非 IPv4、非 IPv6),1 表示 IPv4,2 表示 IPv4/PPTP,3 表示 IPv4/ICMP,4 表示 IPv4/IGMP,5 表示 IPv4/TCP,6 表示 IPv4/UDP,7 表示 IPv6,8 表示 ICMPv6,9 表示 IPv6/TCP,0xA 表示 IPv6/UDP。

Word 0

[11:0]

Data Length

接收前设置,接收后回写

接收前写入缓冲区的大小,单位为字节;接收完成后,硬件回写该描述符中实际接收的字节数,包含 MAC 在帧数据前插入的 2 字节填充。

Word 2

[29]

SVLAN

接收后有效

1 表示帧带有 S-tag。

Word 2

[16]

CTAVA

接收后有效

1 表示帧带有 C-tag,并且已被剥离。

图中灰色的位不使用,软件设置描述符时写 0,接收完成后不需要读取。

大包发送卸载(LSO)

大包发送卸载(LSO)允许软件提交一个超过最大传输单元(Maximum Transmission Unit, MTU)的大帧,由 MAC 硬件按 MTU 将其切分成多个帧发送,并重新计算各帧的 IP 头和校验和,从而减轻 CPU 的分段负担。LSO 只作用于发送方向。

MAC 支持三类大帧的切分:

  • TCP:将 TCP 数据分段,每段的 IP 长度不超过 LGMTU。

  • UDP:按 MTU 将 UDP 数据报分片,最大 64 KB。

  • 其他协议:由硬件做 IP 分片,此时不支持 L4 校验和卸载。

使能

每个需要切分的帧,在其发送描述符中将 LGSEN (Word 4 的 bit31)置 1,并在 bit[30:20] 填入 LGMTU。

LGMTU 是 MTU,即包含 L3 和 L4 头在内的单个帧的 IP 长度,不是 TCP 的最大报文段长度(Maximum Segment Size, MSS)。MAC 内部用 LGMTU 减去 L3 和 L4 头长得到 MSS。因此需要 MSS 为 1448(IPv4 加 TCP,头长共 40 字节)时,应写入 1488。

LGMTU 字段为 11 位,应小于 0x680(受发送 FIFO 容量的限制)。

备注

部分资料(例如寄存器规格书的描述符表、驱动头文件)把该字段称为 LGMSS,其含义仍然是 MTU,不是 MSS。按 MSS 填写会使每个分段的 IP 总长度少了 L3 和 L4 头长。

数据格式要求

发送缓冲区中的数据必须是以下格式之一:

  1. DA + SA + C-tag + 类型 + IP + L4(TCP 或 UDP)

  2. DA + SA + 类型 + IP + L4(TCP 或 UDP)

  3. DA + SA + C-tag + 类型 + IP

  4. DA + SA + 类型 + IP

发送描述符中校验和卸载位的要求因协议而异:

  • TCP:IPCS 和 L4CS 都需要置位。

  • UDP:L4CS 可选。置位时,硬件计算整个报文的 UDP 校验和;不使用 UDP 校验和时清零。

  • 其他协议:硬件只做 IP 分片,不支持 L4 校验和卸载,L4CS 不能置位。

LSO 不支持携带 S-tag 的帧。

TCP 的限制

  • 单个帧的 MTU 不能大于 MSS 加 L3、L4 头长,否则 LSO 无法工作,因为硬件不会再自动做 IP 分片。

  • 大帧中 IP 头的 MF 标志和分片偏移,以及 TCP 头的 URG、RST、SYN 标志和紧急指针必须全部为 0。

  • 不支持 TCP 重传、拥塞控制和流量控制(滑动窗口)。

  • 帧占用多个发送描述符时,DA、SA、类型、IP 头和 TCP 头必须在同一个描述符内。

UDP 的限制

  • 只有切分出的第一个帧带有 UDP 头,其余帧只有数据。

  • 切分后,除最后一个帧外,各帧的 IP 头 MF 标志置位,总长度均为 MTU;最后一个帧的总长度为剩余数据长度加 IP 头长度。每个帧的 IP 头校验和由硬件重新计算。

  • 第一个帧的 UDP 校验和是整个报文的校验和。

  • 发送描述符可以使用以下两种方式提交:描述符 0 仅包含 L2/L3/L4 头、描述符 1 仅包含 L4 数据;或者描述符 0 包含头和部分 L4 数据,此时 Data Length 必须大于头长加 LGMTU,描述符 1 包含其余 L4 数据。

中断与计数器

MAC 的中断状态由 ISR 寄存器指示,中断屏蔽由 IMR 寄存器控制,两者的位一一对应。IMR 对应位为 1 时,ISR 中该位置位会向 CPU 产生中断。

ISR 的各位均为写 1 清零。

警告

清除 ISR 时必须直接写入要清除的位,不能使用读-改-写(例如 ISR |= x)。读-改-写会把读到的所有挂起位一并写回,从而同时清除其他尚未处理的中断。

中断源

ISR 的位定义

位

名称

含义

0

ROK

接收完成。接收帧数达到接收中断合并设置的数量,或接收定时器超时时置位;小于 128 字节的帧在 DMA 完成后立即置位。

1

CNT_WRAP

发送或接收计数器回绕。

2

RER_RUNT

接收到长度小于 64 字节的 runt 帧。

4

RER_OVF

接收 FIFO 溢出,原因可能是接收描述符耗尽、系统总线性能不足或总线流量过载。

5

RDU1

接收描述符不可用。

6

TOK_TI

发送完成。发送帧数达到发送中断合并设置的数量时,最后一个描述符已处理完成。

7

TER

发送错误,由于过度冲突导致发送被中止。

8

LINKCHG

链路状态变化。

9

TDU

发送描述符不可用。

10

SWINT

软件中断。向 SWINT 寄存器的 bit24 写 1 可强制该位置位。

其余位保留,不使用。

RDU1 置位后,MAC 停止获取接收描述符,软件释放接收描述符并向 RDU1 写 1 清除后,接收才会恢复。

中断合并

为减少中断次数,发送和接收中断都支持合并:累计到设定的帧数后才产生中断,同时提供定时器,保证帧数不足时中断也能及时产生。这些参数位于 ETH_ETHER_IO_CMD 寄存器。

中断合并参数

字段

含义

RXINTMITIGATION

产生 ROK 中断前需要接收的帧数。取值 0 对应 1 帧,取值 1 起每增加 1 对应增加 4 帧,即 4、8、12、16、20、24、28 帧。

TXINTMITIGATION

产生 TOK_TI 中断前需要发送的帧数,取值与 RXINTMITIGATION 相同。

RXPKTTIMER

接收定时器。设置后,即使接收帧数未达到合并数量,定时器超时也会产生 ROK 中断。取值 0 表示不使用定时器。该定时器仅对大于 128 字节的帧有效,小于 128 字节的帧在 DMA 完成后立即触发 ROK。

TXPKTTIMER

发送定时器,作用与 RXPKTTIMER 类似。

INT_TIMER_SEL

选择定时器的单位。

定时器的单位与链路速率有关。100 Mbps 下,INT_TIMER_SEL 取 0、1、2、3 时,单位分别为 2.56 μs、10.24 μs、40.96 μs、160 μs;10 Mbps 下分别为 25.6 μs、102.4 μs、409.6 μs、1.6 ms。定时间隔 = 定时器取值 × 4 × 该单位。

统计计数器

MAC 提供一组 16 位的统计计数器,计满后自动回绕,向寄存器写入可将其清零。任一计数器回绕时,ISR 的 CNT_WRAP 位置位。

统计计数器

计数器

统计内容

RXOKCNT

接收成功的帧数。

TXOKCNT

发送成功的帧数。

RXERR

因接收错误被丢弃的帧数。RX FIFO 未满时,如果 RCR 的 AR 位为 0 而帧长小于 64 字节,或 AER 位为 0 而帧存在 CRC 错误,则该计数器加 1。

TXERR

发送出错的帧数,包括发送下溢、半双工下的发送中止和链路错误。

FAE

帧对齐错误的帧数。该计数器只统计被接收的帧,因此需要 RCR 的 AER 位为 1;这类帧不会使 RXERR 加 1。

MISSPKT

丢失的帧数。

RDU_MISSPKTC

因接收描述符不可用而丢失的帧数。

TXMCOL

经历冲突后最终发送成功的帧数,冲突次数少于 16 次(或配置的重试次数)。

TX1COL

只经历一次冲突后发送成功的帧数。

TXABT

发送被中止的帧数,原因包括过度冲突、下溢和链路故障。

TXUNDERC

发送下溢的帧数。

RXOKBRD

目的地址为广播地址的接收成功帧数。

RXOKPHY

目的地址与本机物理地址匹配的接收成功帧数。

RXOKMUL

目的地址为组播地址的接收成功帧数。

RCR 的 AER 位控制错误帧的处理方式:

  • AER 为 1:存在 CRC 错误、对齐错误或冲突碎片的帧被接收并上送,RXOKCNT 加 1,RXERR 不变,接收描述符的 CRCERR 位置 1。

  • AER 为 0:这类帧被丢弃,RXERR 加 1,RXOKCNT 不变。

流量控制

流量控制用于在接收缓冲耗尽之前通知对端暂停发送,避免丢包。以太网 MAC 遵循 IEEE 802.3x,仅在全双工模式下有效,通过 PAUSE 帧实现。

PAUSE 帧

PAUSE 帧是一种 MAC 控制帧,目的地址为保留的组播地址 01:80:C2:00:00:01,类型字段为 0x8808,操作码为 0x0001,携带一个 16 位的暂停时间,单位为 512 比特时间。

  • 暂停时间不为 0:通知对端暂停发送,暂停的时长为该时间。

  • 暂停时间为 0:通知对端立即恢复发送。

暂停时间以 pause quanta 为单位,1 个 pause quanta 等于传输 512 位所需的时间,因此实际时长与链路速率有关。暂停时间为最大值 0xFFFF 时:100 Mbps 下约为 335.5 ms,10 Mbps 下约为 3.355 s。

MAC 发送的 PAUSE 帧由硬件自动生成,暂停时间不可配置。使能发送 PAUSE 功能后,接收资源达到暂停阈值时,MAC 发送暂停时间为最大值 0xFFFF 的 PAUSE 帧;达到恢复阈值时,发送暂停时间为 0 的 PAUSE 帧。阈值的含义见“发送 PAUSE 帧的触发条件”。

发送与响应

MAC 同时支持发送和响应 PAUSE 帧,分别由 MSR 寄存器的两个位使能:

流量控制使能位

位

含义

TXFCE

使能发送 PAUSE 帧。接收缓冲接近耗尽时,MAC 向对端发送 PAUSE 帧。

RXFCE

使能响应 PAUSE 帧。MAC 收到对端的 PAUSE 帧后暂停发送;该位仅在全双工模式下有效。

TXFCE 使能时,RCR 寄存器的 AER 位(接收错误帧)不能同时使能。

MSR 寄存器提供两个只读状态位:RXPF 为 1 表示 MAC 因收到 PAUSE 帧而处于暂停(backoff)状态;TXPF 为 1 表示 MAC 已发送 PAUSE 帧,为 0 表示最近发送的是暂停时间为 0 的 PAUSE 帧(暂停结束的通知帧)。

自协商与强制流控

流量控制的能力通过自协商与对端交换。

没有自协商时,流量控制无法通过协商确定。例如对端关闭了自协商,或本端强制速率与双工、工作在 MAC to MAC 方式下。此时仅将 MSR 寄存器的 TXFCE 或 RXFCE 置 1 不会生效,还必须将 FORCE_TRXFCE 位置 1,流量控制才能工作。

发送 PAUSE 帧的触发条件

发送 PAUSE 帧由空闲的接收描述符数量触发。空闲的接收描述符是软件已经归还给 MAC、可以用来接收新帧的描述符。接收一个帧会用掉一个或多个空闲描述符,软件归还描述符后空闲数量回升。

两个阈值都以空闲接收描述符的数量表示:

  • RX_PSE_DES_THRES_ON:空闲描述符减少到该数量时,MAC 发起暂停请求,向对端发送暂停时间为 0xFFFF 的 PAUSE 帧。

  • RX_PSE_DES_THRES_OFF:空闲描述符回升到该数量时,MAC 解除暂停请求,向对端发送暂停时间为 0 的 PAUSE 帧。

RX_PSE_DES_THRES_ON 需要小于 RX_PSE_DES_THRES_OFF。

例如接收描述符共 4 个,RX_PSE_DES_THRES_ON 设为 1,RX_PSE_DES_THRES_OFF 设为 2,如图所示:

../../_images/eth_pause_threshold.svg

PAUSE 帧的发送时机

  • 空闲描述符还剩 2 个时,MAC 不发起暂停请求。再接收完一个帧、用掉一个描述符后,空闲描述符剩 1 个,MAC 发起暂停请求并发送暂停时间为 0xFFFF 的 PAUSE 帧。

  • 对端暂停发送后,软件处理并归还描述符,空闲描述符回升到 2 个,MAC 解除暂停请求并发送暂停时间为 0 的 PAUSE 帧。

软件处理完接收数据、把接收描述符归还给 MAC 之后,必须更新 ETHRNTRXCPU_DES_NUM 字段,告知 MAC 已经归还的描述符数量。MAC 据此计算空闲描述符数量。

RX_PSE_DES_THRES_OFF 必须小于接收描述符总数减去单个入口帧最多占用的描述符数。

备注

RCR 寄存器的 AFLOW 位置 1 时,MAC 会将收到的 PAUSE 帧也作为普通帧送入接收缓冲,仅用于调试。

VLAN

MAC 支持 IEEE 802.1Q VLAN 标签的硬件处理。VLAN 标签是插入在以太网帧源地址之后、类型字段之前的 4 字节字段。支持在标签外再嵌套一层标签(QinQ),外层标签称为 S-tag,内层标签称为 C-tag。

../../_images/eth_vlan_frame.svg

VLAN 帧格式

硬件限制

  • 最多识别两层标签(S-tag 和 C-tag),不支持三层及以上的嵌套标签。

  • 发送方向每次只能对一层标签执行一个动作。

  • 接收方向只能剥离内层 C-tag。

发送方向

发送方向的 VLAN 处理由发送描述符逐帧指定。发送描述符的第 2 个字(Word 2)包含两个与 VLAN 相关的字段:

发送描述符中的 VLAN 字段

字段

位

含义

VLAN_ACT

[26:25]

对帧的 VLAN 标签执行的动作,见下表。

VLAN_TAG

[15:0]

插入或重标记时使用的 16 位标签内容,包含 VID、优先级(PRI)和 CFI。

VLAN_ACT 的取值:

发送方向的 VLAN 动作

取值

动作

说明

00

保持原样

不修改帧中的标签。

01

插入

在帧中插入一个新标签,标签内容取自 VLAN_TAG。

10

移除

移除帧中指定的一个标签。

11

重标记

保留原有标签结构,仅替换 VID。

动作作用于 S-tag 还是 C-tag,由 VLAN_REG 寄存器的 TDSC_VLAN_TYPE 位决定:

  • TDSC_VLAN_TYPE 为 0:描述符中的动作作用于 C-tag。

  • TDSC_VLAN_TYPE 为 1:描述符中的动作作用于 S-tag。

S-tag 协议标识

S-tag 的 TPID 由 VLAN_REG 寄存器的 STAG_PID 字段设置,复位值为 0x88A8。发送和接收方向使用同一个值识别 S-tag。STAG_PID 不得与 IPv4、ARP 等常见 EtherType 冲突,否则帧中的类型字段会被误识别为 S-tag。

接收方向

ETH_CR 寄存器的 RXVLAN 位为 1 时,MAC 剥离接收帧中的内层 C-tag,并将剥离出的标签内容写入接收状态描述符:

  • 接收状态描述符 Word 2 的 CTAVA 位置 1,表示该帧带有 C-tag。

  • Word 2 的低 16 位保存被剥离的标签内容。

  • 如果帧还带有 S-tag,SVLAN 位置 1。

接收帧占用多个描述符时,VLAN 信息只出现在最后一个描述符中。

RXVLAN 为 0 时,MAC 不剥离标签,帧中的标签保留在接收数据里,CTAVA 为 0。

节能以太网(EEE)

节能以太网(EEE)基于 IEEE 802.3az,核心机制是低功耗空闲(LPI):链路建立后,如果没有数据传输,设备可以通过协议交互进入低功耗状态,以降低功耗。

EEE 由 MAC 和 PHY 协同完成:

../../_images/eth_eee_arch.svg

节能以太网架构

  • LPI 客户端 位于 MAC 中,根据发送队列的状态发起 LPI 请求。

  • PHY 对 RMII 信号进行编码,并通过线路与对端交互。

使用 EEE 的前提:

  • 必须开启自协商,EEE 能力通过自协商的 Next Page 与对端交换。

  • 必须工作在全双工模式。

  • PHY 和对端设备均需支持 EEE。

RMII 上的 LPI 信号

标准 RMII 去掉了 MII 的 TX_ER 信号,因此无法直接使用 IEEE 802.3az 的信号组合,RMII 通过 TX_EN、CRS_DV 与数据线的组合表示进入和退出 LPI。

../../_images/eth_eee_trx_lpi.svg

发送、接收路径进出 LPI

发送路径 由 MAC 决定何时让 PHY 进入或退出低功耗:

  • 进入 LPI:MAC 驱动 TX_EN=0、TXD=01,PHY 检测到该状态后关闭模拟发送电路。

  • 保持 LPI:MAC 维持 TX_EN=0、TXD=01。

  • 退出 LPI:MAC 将 TXD[1:0] 由 01 恢复为 00 (此时 TX_EN 仍为 0),表示唤醒请求。经过唤醒时间后,MAC 拉高 TX_EN 开始发送数据。

接收路径 由 PHY 检测对端状态并通知 MAC:

  • 进入 LPI:PHY 在线路上检测到对端的 LPI 信号后,将 CRS_DV 拉低,并将 RXD[1:0] 驱动为 01。MAC 检测到该状态后,进入接收低功耗状态。

  • 保持 LPI:PHY 维持 RXD[1:0] 为 01,直到线路状态改变。

  • 退出 LPI:PHY 在线路上检测到空闲码流或数据后,将 RXD[1:0] 由 01 恢复为 00,MAC 随之恢复接收。

PHY 检测到 RMII 接口上的 LPI 请求后,在线路上依次经历休眠(Sleep)、静默(Quiet)、刷新(Refresh)和唤醒(Wake):

../../_images/eth_eee_lpi.svg

LPI 状态

  • 休眠 :本端 PHY 发送 SLEEP 码组通知对端。

  • 静默 :发送 SLEEP 后停止发送信号。

  • 刷新 :静默期间周期性发送刷新信号,用于维持链路参数。

  • 唤醒 :发送唤醒信号,通知对端恢复正常工作。

发送路径的决策

接收路径的 LPI 由 PHY 决定,MAC 被动配合。发送路径的进入和退出由 MAC 内部的决策器决定,通过 EEE_CR1 寄存器的位分别使能。

进入 LPI 的决策器:

进入 LPI 的决策器

位

决策条件

EEE_REQ_SET0

按速率:统计窗口 T_tx_rate 内的发送流量低于阈值 EEE_TX_THR 时,请求进入 LPI。

EEE_REQ_SET1

发送队列为空时,请求进入 LPI。

EEE_REQ_SET2

收到对端的 PAUSE 帧时,请求进入 LPI,T_pause 为该决策器使用的定时。

退出 LPI 的决策器:

退出 LPI 的决策器

位

决策条件

EEE_WAKE_SET0

发送队列中有数据需要发送时,退出 LPI。

EEE_WAKE_SET1

某个待发送帧大于 512 字节时,退出 LPI。

软件有较多数据待发送时,可以将 EEE_OUTQ_LOWQ_OVER 置 1,通知硬件退出 LPI。

EEE_CR1 的 EN_EEE_TX 和 EN_EEE_RX 位分别使能发送和接收方向的 EEE 能力。

定时参数

100 Mbps 下的定时参数位于 EEE_CR3 寄存器:

100 Mbps 的 EEE 定时参数

参数

复位值

单位

含义

EEE_TIMER_TW_100

0x1E

EEE_TIMER_UNIT_100_1

唤醒时间 T_wakeup。该值应不小于 PHY 要求的唤醒时间。

EEE_TIMER_TR_100

0x0A

EEE_TIMER_UNIT_100_1

速率统计窗口 T_tx_rate。

EEE_TIMER_TP_100

0x0A

EEE_TIMER_UNIT_100_1

PAUSE 决策器使用的定时 T_pause。

EEE_TIMER_TD_100

0xF4

EEE_TIMER_UNIT_100_2 × 4

QoS 决策延迟 T_tx_delay。

表中为各字段的复位值,实际时间等于字段取值乘以对应的单位。

EEE_CR1 寄存器中的两个字段设置上述参数的单位:

  • EEE_TIMER_UNIT_100_1:00 表示 1 μs,01 表示 16 μs,10 表示 128 μs,11 表示 1024 μs。

  • EEE_TIMER_UNIT_100_2:00 表示 8 μs,01 表示 64 μs,10 表示 512 μs,11 表示 1024 μs。

速率阈值 EEE_TX_THR_100 位于 EEE_CR4 寄存器的低 16 位,单位为字节,计算公式为:

EEE_TX_THR = Round[(T_tx_rate × Rate) / 8]

例如 T_tx_rate 为 10 μs、速率为 100 Mbps 时,阈值为 0x7D (125 字节),复位值为 0x3E,约为半速率。阈值越大越容易进入 LPI,阈值越小越难进入 LPI。

状态与统计

EEE_CR1 寄存器提供以下只读状态位:

位

含义

EEE_TX_STS

发送路径处于 LPI。

EEE_RX_STS

接收路径处于 LPI。

EEE_STS

发送和接收路径同时处于 LPI。

EEE_PAUSEFLAG

因收到 PAUSE 帧而发起了 LPI 请求。

EEE_CR1 寄存器的 EEE_TXTIMER_EN 和 EEE_RXTIMER_EN 位使能后,MAC 分别累计发送和接收路径处于 LPI 的时间,单位为 μs,累计值为 22 位。发送路径的累计时间从 EEE_LPI_TM1_REG 寄存器的 EEE_TXLPI_TIME 字段读取,接收路径的累计时间从 EEE_LPI_TMO_REG 寄存器的 EEE_RXLPI_TIME 字段读取。这两个字段均为读清零,读取后计数从 0 重新累计。

环回测试

MAC 提供环回功能,用于驱动开发、中断测试以及链路连通性验证。环回模式由 TCR 寄存器的 LBK 字段选择。

环回模式

LBK

模式

说明

00

正常工作

不环回。

01

R2T 环回

将接收到的数据直接送回发送路径,作为出口帧发出。

10

保留

不要使用。

11

T2R 环回

发送的数据在 MAC 内部送回接收路径。

../../_images/eth_loopback_modes.svg

环回测试模式

R2T 环回

R2T 环回(Receive to Transmit)将从 RMII 接收到的帧原样回送到 RMII 发送方向,用于从对端验证 MAC 的收发通路,无需软件搬运帧。

R2T 环回的数据不经过发送和接收 FIFO,而是通过异步 FIFO 在接收时钟域与发送时钟域之间传递。接收时钟来自引脚,发送时钟由 MAC 自身产生,两者相互独立。

备注

R2T 环回回送的帧计入接收成功计数器 RXOKCNT,不计入发送成功计数器 TXOKCNT。使用 TXOKCNT 判断 R2T 环回是否工作时请注意这一点。

T2R 环回

T2R 环回(Transmit to Receive)将发送的数据在 MAC 内部送回接收路径,用于验证 MAC 自身的收发逻辑。该模式的数据路径为:发送缓冲区 → 发送 DMA 和 FIFO → MAC 内部环回 → 接收 DMA → 接收缓冲区。

该模式下,RCR 寄存器的推荐值为 0xF,即 AAP、APM、AM、AB 置 1,使 MAC 接受各种目的地址的帧,环回的帧不会因地址过滤被丢弃。正常收发时,应根据地址过滤策略配置 RCR。

寄存器

Base Address: 0x4011A000

Name

Address offset

Access

Description

REG_IDR0

000h

R/W

ID Register 0 -3.

REG_IDR4

004h

R/W

ID Register 4-5.

REG_MAR0

008h

R/W

Multicast Register 0-3

REG_MAR4

00Ch

R/W

Multicast Register 4-7

REG_RXOKCNT

010h

R/W

16-bit counter of Rx Ok packets.

REG_TXOKCNT

012h

R/W

16-bit counter of Tx DMA Ok packets.

REG_RXERR

014h

R/W

16-bit packet counter of Rx errors including CRC error packets (should be larger than 8 bytes) and missed packets.

REG_TXERR

016h

R/W

16-bit packet counter of Tx errors including Tx abort, carrier lost and out of window collision.

REG_FAE

018h

R/W

16-bit counter of Frame Alignment Error packets (MII mode only)

REG_MISSPKT

01Ah

R/W

16-bit counter of missed packets resulting from Rx FIFO full.

REG_TXMCOL

01Ch

R/W

16-bit counter of those Tx Ok packets with more than 1, and less than 16 collisions happened before Tx Ok.

REG_TX1COL

01Eh

R/W

16-bit counter of those Tx Ok packets with only 1 collision happened before Tx Ok.

REG_RXOKBRD

020h

R/W

16-bit counter of all Rx Ok packets with broadcast destination ID.

REG_RXOKPHY

022h

R/W

16-bit counter of all Rx Ok packets with physical address matched destination ID.

REG_TXABT

024h

R/W

16-bit counter of Tx abort packets.

REG_RXOKMU1

026h

R/W

16-bit counter of all Rx Ok packets with multicast destination ID.

REG_MISSPKT_RDU

028h

R/W

16-bit counter of miss packet due to rdu in rx multiple ring mode. Rolls over automatically. Write to clear. gmac only.

REG_TXUNDERC

02Ah

R/W

16-bit counter of Tx Underrun packets. Rolls over automatically. Write to clear. gmac only.

REG_TRSR

034h

R

Tx/Rx Status Register

REG_CR

038h

R/W

Command Register

REG_ISR

03Ch

R/W

REG_IMR

03Eh

R

REG_TCR

040h

R/W

Transmit (Tx) Configuration Register

REG_RCR

044h

R/W

Receive (Rx) Configuration Register

REG_CPUTAG

048h

R/W

CPU tag control register.

REG_CONFIG

04Ch

R/W

Configuration register

REG_CPUTAG1

050h

R/W

CPUTAG1 control register

REG_MSR

058h

R/W

Media Status Register

REG_MIIAR

05Ch

R/W

MII Access Register

REG_SWINT

060h

R/W

SWINT Register

REG_VLAN_REG

064h

R/W

Vlan tag register

REG_LED_CTRL

070h

R/W

Led control register

REG_BIST

080h

R/W

Memory bist

REG_PGLBK

084h

R/W

Packet generator register.

REG_EEE_CR1

088h

R/W

REG_EEE_CR2

08Ch

R/W

REG_EEE_CR3

090h

R/W

REG_EEE_CR4

094h

R/W

REG_EEE_LPI_TMO_REG

098h

R

REG_EEE_LPI_TM1_REG

09Ch

R/W

REG_EEEP_CR1

0B0h

R/W

REG_EEEP_CR2

0B4h

R/W

REG_EEEP_CR3

0B8h

R/W

REG_EEEP_CR4

0BCh

R/W

REG_EEEP_CR5

0C0h

R/W

REG_EEEP_CR6

0C4h

R/W

REG_EEEP_CR7

0C8h

R/W

REG_IMR0_REG

0D0h

R/W

REG_IMR1_REG

0D4h

R/W

REG_ISR1_REG

0D8h

R/W

REG_INT_R_REG

0DCh

R/W

Interrupt routing register

REG_RST_PWR_DOWN_OPERATION_CTRL_REG

0E0h

R/W

Reset and Power Down Operation Control Register

REG_CLK_CTRL_REG

0E4h

R/W

Clock Control Register

REG_INTERUPT_MASK_REG

0F0h

R/W

Interrupt Mask Register

REG_INTERUPT_STATUS_REG

0F4h

R/W

Interrupt Status Register

REG_TXFDP1

1300h

R/W

Tx First Descriptor Pointer (FDP) for 1st priority queue. 32 bits

REG_TXCDO1

1304h

R

Tx Current Descriptor Offset (CDO) for 1st priority queue.16 bits

REG_TXFDP2

1310h

R/W

Tx First Descriptor Pointer (FDP) for 2nd priority queue. 32 bits

REG_TXCDO2

1314h

R

Tx Current Descriptor Offset (CDO) for 2nd priority queue.16 bits

REG_TXFDP3

1320h

R/W

Tx First Descriptor Pointer (FDP) for 3rd priority queue. 32 bits

REG_TXCDO3

1324h

R

Tx Current Descriptor Offset (CDO) for 3rd priority queue.16 bits

REG_TXFDP4

1330h

R/W

Tx First Descriptor Pointer (FDP) for 4th priority queue. 32 bits

REG_TXCDO4

1334h

R

Tx Current Descriptor Offset (CDO) for 4th priority queue.16 bits

REG_TXFDP5

1340h

R/W

Tx First Descriptor Pointer (FDP) for 5th priority queue. 32 bits

REG_TXCDO5

1344h

R

Tx Current Descriptor Offset (CDO) for 5th priority queue.16 bits

REG_RRING_MAP1

1370h

R/W

Rx ring mapping for 1st queue.

REG_RRING_MAP2

1374h

R/W

Rx ring mapping for 1st queue.

REG_RRING_MAP3

1378h

R/W

Rx ring mapping for 1st queue.

REG_RRING_MAP4

137Ch

R/W

Rx ring mapping for 1st queue.

REG_RRING_MAP5

1380h

R/W

Rx ring mapping for 1st queue.

REG_RRING_MAP6

1384h

R/W

Rx ring mapping for 1st queue.

REG_RXFDP2

1390h

R/W

Rx First Descriptor Pointer (FDP) for 2nd priority queue. 32 bits

REG_RXRINGSIZE2

1394h

R/W

Rx Ring Size2 (number of Descriptors)

REG_RXCDO2

1396h

R

Rx Current Descriptor Offset (CDO) for 2nd priority queue. 16 bits

REG_RX_CPU_DESN2

1398h

R/W

This is the descriptor which the CPU has finished processing for 2nd priority queue and returned to IO. CPU needs to update this.

REG_RX_DES_THRES2

139Ch

R/W

This is the descriptor which the Ethernet module has filled up to for 2st priority queue. Compare with CPU_Des_Num to determine whether to assert flow control.

REG_RXFDP3

13A0h

R/W

Rx First Descriptor Pointer (FDP) for 2nd priority queue. 32 bits

REG_RXRINGSIZE3

13A4h

R/W

Rx Ring Size2 (number of Descriptors)

REG_RXCDO3

13A6h

R

Rx Current Descriptor Offset (CDO) for 2nd priority queue. 16 bits

REG_RX_CPU_DESN3

13A8h

R/W

This is the descriptor which the CPU has finished processing for 2nd priority queue and returned to IO. CPU needs to update this.

REG_RX_DES_THRES3

13ACh

R/W

This is the descriptor which the Ethernet module has filled up to for 2st priority queue. Compare with CPU_Des_Num to determine whether to assert flow control.

REG_RXFDP4

13B0h

R/W

Rx First Descriptor Pointer (FDP) for 2nd priority queue. 32 bits

REG_RXRINGSIZE4

13B4h

R/W

Rx Ring Size2 (number of Descriptors)

REG_RXCDO4

13B6h

R

Rx Current Descriptor Offset (CDO) for 2nd priority queue. 16 bits

REG_RX_CPU_DESN4

13B8h

R/W

This is the descriptor which the CPU has finished processing for 2nd priority queue and returned to IO. CPU needs to update this.

REG_RX_DES_THRES4

13BCh

R/W

This is the descriptor which the Ethernet module has filled up to for 2st priority queue. Compare with CPU_Des_Num to determine whether to assert flow control.

REG_RXFDP5

13C0h

R/W

Rx First Descriptor Pointer (FDP) for 2nd priority queue. 32 bits

REG_RXRINGSIZE5

13C4h

R/W

Rx Ring Size2 (number of Descriptors)

REG_RXCDO5

13C6h

R

Rx Current Descriptor Offset (CDO) for 2nd priority queue. 16 bits

REG_RX_CPU_DESN5

13C8h

R/W

This is the descriptor which the CPU has finished processing for 2nd priority queue and returned to IO. CPU needs to update this.

REG_RX_DES_THRES5

13CCh

R/W

This is the descriptor which the Ethernet module has filled up to for 2st priority queue. Compare with CPU_Des_Num to determine whether to assert flow control.

REG_RXFDP6

13D0h

R/W

Rx First Descriptor Pointer (FDP) for 2nd priority queue. 32 bits

REG_RXRINGSIZE6

13D4h

R/W

Rx Ring Size2 (number of Descriptors)

REG_RXCDO6

13D6h

R

Rx Current Descriptor Offset (CDO) for 2nd priority queue. 16 bits

REG_RX_CPU_DESN6

13D8h

R/W

This is the descriptor which the CPU has finished processing for 2nd priority queue and returned to IO. CPU needs to update this.

REG_RX_DES_THRES6

13DCh

R/W

This is the descriptor which the Ethernet module has filled up to for 2st priority queue. Compare with CPU_Des_Num to determine whether to assert flow control.

REG_RX_FDP1

13F0h

R/W

Rx First Descriptor Pointer (FDP) for 1th priority queue. 32 bits

REG_RX_RINGSIZE1

13F4h

R/W

Rx Ring Size1 (number of Descriptors)

REG_RX_CDO1

13F6h

R

Rx Current Descriptor Offset (CDO) for 1th priority queue. 16 bits

REG_SMSA

13FCh

R/W

Sram mapping start address

REG_PROBE_SELEXCT

1400h

R/W

Probe signal select

REG_DIAG1

1404h

R

For debug./

REG_CONFIG_CLK_AND_RX_PSE_DES_THRES_H

142Ch

R/W

Bit[3:0] is the Rx_Pse_Des_Thres_off[11:8]. Bit [21:16] set txc delay and rxc delay sel.

REG_ETHRNTRXCPU_DES_NUM1

1430h

R/W

This is the descriptor which the CPU has finished processing and returned to IO for 1st priority queue. CPU needs to update this.

REG_ETHER_IO_CMD

1434h

R/W

ETHER_IO_CMD

REG_IO_CMD1

1438h

R/W

ETHER_IO_CMD1

REG_WOL

143Ch

R/W

WOL_REG

REG_IDR0

  • Size: 32

  • Address offset: 000h

  • Read/write access: R/W

ID Register 0 -3.

31:24 IDR0 23:16 IDR1 15:8 IDR2 7:0 IDR3

Bit

Symbol

Access

INI

Description

31:24

IDR0

R/W

0

The ID register0-5 are only permitted to write by 4-byte access. Read access can be byte, word, or double word access.

23:16

IDR1

R/W

0

15:8

IDR2

R/W

0

7:0

IDR3

R/W

0

REG_IDR4

  • Size: 32

  • Address offset: 004h

  • Read/write access: R/W

ID Register 4-5.

31:24 IDR4 23:16 IDR5 15:0 RSVD

Bit

Symbol

Access

INI

Description

31:24

IDR4

R/W

0

23:16

IDR5

R/W

0

15:0

RSVD

R

-

Reserved

REG_MAR0

  • Size: 32

  • Address offset: 008h

  • Read/write access: R/W

Multicast Register 0-3

31:24 MAR0 23:16 MAR1 15:8 MAR2 7:0 MAR3

Bit

Symbol

Access

INI

Description

31:24

MAR0

R/W

0

Multicast Register 0, The MAR register0-7 are only permitted to write by 4-byte access. Read access can be byte, word, or double word access. Driver is responsible for initializing these registers. The MAR7-0 define 64 bits which is a bit wise index of the multicast function of multicast addresses. The hash function of multicast address is the upper 6 MSB's of the CRC32 of the address (destination). The index then is the numerical representation of those 6 bits in hex format.

23:16

MAR1

R/W

0

Multicast Register 1

15:8

MAR2

R/W

0

Multicast Register 2

7:0

MAR3

R/W

0

Multicast Register 3

REG_MAR4

  • Size: 32

  • Address offset: 00Ch

  • Read/write access: R/W

Multicast Register 4-7

31:24 MAR4 23:16 MAR5 15:8 MAR6 7:0 MAR7

Bit

Symbol

Access

INI

Description

31:24

MAR4

R/W

0

Multicast Register 4

23:16

MAR5

R/W

0

Multicast Register 5

15:8

MAR6

R/W

0

7:0

MAR7

R/W

0

Multicast Register 7

REG_RXOKCNT

  • Size: 16

  • Address offset: 010h

  • Read/write access: R/W

16-bit counter of Rx Ok packets.

15:0 RXOK

Bit

Symbol

Access

INI

Description

15:0

RXOK

R/W

0

16-bit counter of Rx Ok packets. Rolls over automatically. Write to clear.

REG_TXOKCNT

  • Size: 16

  • Address offset: 012h

  • Read/write access: R/W

16-bit counter of Tx DMA Ok packets.

15:0 TXOK

Bit

Symbol

Access

INI

Description

15:0

TXOK

R/W

0

16-bit counter of Tx Ok packets. Rolls over automatically. Write to clear.

REG_RXERR

  • Size: 16

  • Address offset: 014h

  • Read/write access: R/W

16-bit packet counter of Rx errors including CRC error packets (should be larger than 8 bytes) and

missed packets.

15:0 RXERR

Bit

Symbol

Access

INI

Description

15:0

RXERR

R/W

0

16-bit counter of RxErr packets. Rolls over automatically. Write to clear. The source of RxErr are GMAC meets the following condition when rx fifo is not full.:

  1. RCR.accept runt = 0, but the ingress pkt length < 64B.

2. RCR.accepterr = 0, but the ingress pkt is a CRC error pkt.

REG_TXERR

  • Size: 16

  • Address offset: 016h

  • Read/write access: R/W

16-bit packet counter of Tx errors including Tx abort, carrier lost and out of window collision.

15:0 TXERR

Bit

Symbol

Access

INI

Description

15:0

TXERR

R/W

0

16-bit counter of TxErr packets. Rolls over automatically. Write to clear. The source of TxErr are txunder, txabt(in half-duplex mode) or txlinkerr.

REG_FAE

  • Size: 16

  • Address offset: 018h

  • Read/write access: R/W

16-bit counter of Frame Alignment Error packets (MII mode only)

15:0 FAE

Bit

Symbol

Access

INI

Description

15:0

FAE

R/W

0

16-bit counter of FAE (Frame Alignment Error) packets. Rolls over automatically. Write to clear. RCR.AER should be high.

When FAE occurs in 10/100mode, the following thins happens:

  • Rx status des.CRC error does not assert if the ingress(exclude alignment error nibble) if correct.

  • RxErr_reg increased by 1.

  • FAE_reg increased by 1

  • Rx status des.RCDF does not asserts.

Data length does not include alignment error nibble.

REG_MISSPKT

  • Size: 16

  • Address offset: 01Ah

  • Read/write access: R/W

16-bit counter of missed packets resulting from Rx FIFO full.

15:0 MISSPKT

Bit

Symbol

Access

INI

Description

15:0

MISSPKT

R/W

0

16-bit counter of Missed packets.

Rolls over automatically.

Write to clear.

REG_TXMCOL

  • Size: 16

  • Address offset: 01Ch

  • Read/write access: R/W

16-bit counter of those Tx Ok packets with more than 1, and less than 16 collisions happened before

Tx Ok.

15:0 TXMCOL

Bit

Symbol

Access

INI

Description

15:0

TXMCOL

R/W

0

16-bit counter of TxCol packets. Rolls over automatically. Write to clear. This keeps track of those packets with less than 16 collisions (or the configured retry count) before Tx Ok

REG_TX1COL

  • Size: 16

  • Address offset: 01Eh

  • Read/write access: R/W

16-bit counter of those Tx Ok packets with only 1 collision happened before Tx Ok.

15:0 TX1COL

Bit

Symbol

Access

INI

Description

15:0

TX1COL

R/W

0

16-bit counter of TxCol packets. Rolls over automatically. Write to clear. This only record which have entered just one collision before Tx OK

REG_RXOKBRD

  • Size: 16

  • Address offset: 020h

  • Read/write access: R/W

16-bit counter of all Rx Ok packets with broadcast destination ID.

15:0 RXOKBRD

Bit

Symbol

Access

INI

Description

15:0

RXOKBRD

R/W

0

16-bit counter of Rx Ok packets with broadcast destination address..

Rolls over automatically.

Write to clear.

REG_RXOKPHY

  • Size: 16

  • Address offset: 022h

  • Read/write access: R/W

16-bit counter of all Rx Ok packets with physical address matched destination ID.

15:0 RXOKPHY

Bit

Symbol

Access

INI

Description

15:0

RXOKPHY

R/W

0

16-bit counter of Rx Ok packets with physical address matching destination address. Rolls over automatically. Write to clear.

REG_TXABT

  • Size: 16

  • Address offset: 024h

  • Read/write access: R/W

16-bit counter of Tx abort packets.

15:0 TXABT

Bit

Symbol

Access

INI

Description

15:0

TXABT

R/W

0

16-bit counter of Tx aborted packets. Rolls over automatically.

Write to clear.

This accounts for over collision, underrun, LNK failure conditions.

REG_RXOKMU1

  • Size: 16

  • Address offset: 026h

  • Read/write access: R/W

16-bit counter of all Rx Ok packets with multicast destination ID.

15:0 RXOKMUL

Bit

Symbol

Access

INI

Description

15:0

RXOKMUL

R/W

0

16-bit counter of Rx Ok packets with multicast destination address.

Rolls over automatically.

Write to clear.

REG_MISSPKT_RDU

  • Size: 16

  • Address offset: 028h

  • Read/write access: R/W

16-bit counter of miss packet due to rdu in rx multiple ring mode. Rolls over automatically. Write

to clear. gmac only.

15:0 RDU_MISSPKTC

Bit

Symbol

Access

INI

Description

15:0

RDU_MISSPKTC

R/W

0

16-bit counter of miss packets due to rx descriptor is unavailable. Rolls over automatically.

Write to clear.

Gmac only.

REG_TXUNDERC

  • Size: 16

  • Address offset: 02Ah

  • Read/write access: R/W

16-bit counter of Tx Underrun packets. Rolls over automatically. Write to clear. gmac only.

15:0 TXUNDERC

Bit

Symbol

Access

INI

Description

15:0

TXUNDERC

R/W

0

16-bit counter of Tx Underrun packets. Rolls over automatically.

Write to clear.

Gmac only.

REG_TRSR

  • Size: 32

  • Address offset: 034h

  • Read/write access: R

Tx/Rx Status Register

31:4 RSVD 3 TOK 2 TXUNDER 1 RXFIFOEMPTY 0 RBU

Bit

Symbol

Access

INI

Description

31:4

RSVD

R

-

Reserved

3

TOK

R

Transmit OK: Set to 1 indicates that the transmission of a packet was completed successfully and no transmit underrun occurs.

2

TXUNDER

R

Transmit FIFO Underrun: Set to 1 if the Tx FIFO was exhausted during the transmission of a packet.

1

RXFIFOEMPTY

R

Rx Fifo is Empty.

0

RBU

R

Rx buff is un-available, rx full

REG_CR

  • Size: 32

  • Address offset: 038h

  • Read/write access: R/W

Command Register

31:6 RSVD 5 TDSC_DEBUG 4 DIS_LSO_ERR 3 RXJUMBO 2 RXVLAN 1 RXCHKSUM 0 RST

Bit

Symbol

Access

INI

Description

31:6

RSVD

R

-

Reserved

5

TDSC_DEBUG

R/W

0

Tx descriptor debug

4

DIS_LSO_ERR

R/W

0

Disable LSO error

3

RXJUMBO

R/W

0

  • 1: support jumbo packet receiving. The maximum packet size is 16384B(0x4000).

  • 0: Does not support jumbo packet receiving.

When rxjumbo sets to 1, the minium rx descriptor ring size is 16.

2

RXVLAN

R/W

0

Receive VLAN de-tagging enable.1: Enable. 0: Disable.

  • 1: detag vlan and set rx status dsc.tava = 1 when ingress packet has vlantag.

  • 0: disable detag vlan and rx status dsc.tava = 0.

1

RXCHKSUM

R/W

0

Receive checksum offload enable. 1: Enable. 0: Disable.

0

RST

R/W

0

Reset: Setting to 1 forces the Ethernet module to a software reset state which disables the transmitter and receiver, reinitializes the FIFOs, triggers interrupt Swint for RISC to reset the system buffer pointer to the initial value Tx/Rx FDP. The values of IDR0-5 and MAR0-7 will have no changes. This bit is 1 during the reset operation, and is cleared to 0 by the Ethernet Module when the reset operation is complete.

REG_ISR

  • Size: 16

  • Address offset: 03Ch

  • Read/write access: R/W

15 ISR_RDU6 14 ISR_RDU5 13 ISR_RDU4 12 ISR_RDU3 11 ISR_RDU2 10 ISR_SWINT 9 ISR_TDU 8 ISR_LINKCHG 7 ISR_TER 6 ISR_TOK_TI 5 ISR_RDU1 4 ISR_RER_OVF 3 RSVD 2 ISR_RER_RUNT 1 ISR_CNT_WRAP 0 ISR_ROK

Bit

Symbol

Access

INI

Description

15

ISR_RDU6

R/W

Rx Descriptor Unavailable for RING6:

When set, indicates Rx descriptor is unavailable.

Write 1 to clear.

14

ISR_RDU5

R/W

Rx Descriptor Unavailable for RING5:

When set, indicates Rx descriptor is unavailable.

Write 1 to clear.

13

ISR_RDU4

R/W

Rx Descriptor Unavailable for RING4:

When set, indicates Rx descriptor is unavailable.

Write 1 to clear.

12

ISR_RDU3

R/W

Rx Descriptor Unavailable for RING3:

When set, indicates Rx descriptor is unavailable.

Write 1 to clear.

11

ISR_RDU2

R/W

Rx Descriptor Unavailable for RING2:

When set, indicates Rx descriptor is unavailable.

Write 1 to clear.

10

ISR_SWINT

R/W

Software Interrupt pending:

When set to 1 indicates a software interrupt was forced.

Write 1 to clear.

9

ISR_TDU

R/W

Tx Descriptor Unavailable:

When set, indicates Tx descriptor is unavailable.

Write 1 to clear.

8

ISR_LINKCHG

R/W

Link Change:

Write 1 to clear.

7

ISR_TER

R/W

Transmit (Tx) Error:

Indicates that a packet transmission was aborted, due to excessive collisions, according to the TXRR's setting.

Write 1 to clear.

6

ISR_TOK_TI

R/W

Transmit Interrupt:

Indicates that the DMA of the last descriptor of TxIntMitigation number of Tx packet has completed and the last descriptor has been closed.

Write 1 to clear.

5

ISR_RDU1

R/W

Rx Descriptor Unavailable for RING1:

When set, indicates Rx descriptor is unavailable.

Write 1 to clear.

4

ISR_RER_OVF

R/W

Rx FIFO Overflow, caused by RBO/RDU, poor system bus (Lexra bus) performance, or overloaded Lexra bus traffic.

Write 1 to clear.

3

RSVD

R

-

Reserved

2

ISR_RER_RUNT

R/W

Rx error caused by runt error characterized by the frame length in bytes being less than 64 bytes.

Write 1 to clear.

1

ISR_CNT_WRAP

R/W

Tx/rx counter wrap interrupt.

0

ISR_ROK

R/W

Receive (Rx) OK: This interrupt is set either when RxIntMitigation packet is met or RxPktTimer expires.

Write 1 to clear.

REG_IMR

  • Size: 16

  • Address offset: 03Eh

  • Read/write access: R

15:0 RSVD

Bit

Symbol

Access

INI

Description

15:0

RSVD

R

-

Reserved

REG_TCR

  • Size: 32

  • Address offset: 040h

  • Read/write access: R/W

Transmit (Tx) Configuration Register

31:13 RSVD 12:10 IFG2_0 9:8 LBK 7:0 RSVD

Bit

Symbol

Access

INI

Description

31:13

RSVD

R

-

Reserved

12:10

IFG2_0

R/W

0x0

InterFrameGap Time: This field allows the user to adjust the interframe gap time longer than the standard: 9.6 us for 10Mbps, 960 ns for 100Mbps. The time can be programmed from 9.6 us to 14.4 us (10Mbps) and 960ns to 1440ns (100Mbps). The formula for the inter frame gap is:

IFG[2:0] IFGx1000MHz (nS) IFGx100MHz (nS) IFGx10MHz (uS)

0 1 1 96 960 9.6

1 0 0 96 +8 * 1 960 +8 * 10 9.6 +8 * 0.1

1 0 1 96 + 16 * 1 960 + 16 * 10 9.6 + 16 * 0.1

1 1 0 96 + 24 * 1 960 + 24 * 10 9.6 + 24 * 0.1

1 1 1 96 + 32 * 1 960 + 32 * 10 9.6 + 32 * 0.1

0 0 0 96 + 40 * 1 960 + 40 * 10 9.6 + 40 * 0.1

0 0 1 96 + 48 * 1 960 + 48 * 10 9.6 + 48 * 0.1

0 1 0 96 + 96 * 1 960 + 96 * 01 9.6 + 96 * 0.1

9:8

LBK

R/W

0x0

The loopback function must be independent of the link state.

  • 2'b00 : normal operation

  • 2'b01 : Loopback mode_R2T(lbkmode_r2t) :

Lbk methld: no SW requirement.

  1. receive ingress data.

  2. assign rxd to txd (txd).

  3. egress pkt. b10 : Reserved

  • 2'b11 : Loopback mode(lbk_mode).

Lbk method: 1. rx fet descriptor.

  1. tx fet descriptor and data

  2. put data in txfifo

  3. assign txd to rxd.(lbk)

  4. gmac mv data to lxb.

In this mode(lbk_mode), the recommended value of RC_REG(0x44) is 0xf.

7:0

RSVD

R

-

Reserved

REG_RCR

  • Size: 32

  • Address offset: 044h

  • Read/write access: R/W

Receive (Rx) Configuration Register

31:8 RSVD 7 HOMEPNA 6 AFLOW 5 AER 4 AR 3 AB 2 AM 1 APM 0 AAP

Bit

Symbol

Access

INI

Description

31:8

RSVD

R

-

Reserved

7

HOMEPNA

R/W

1'b0

Home PNA mode

6

AFLOW

R/W

1'b0

Accept flow control :

When set to 1, flow control packet will also be received & DMA to rx buffer for debug. Default is 0.

5

AER

R/W

1'b0

Accept Error Packet:

When set to 1, all packets with CRC error, alignment error, and/or collided fragments will be accepted.

Rxerrc keeps,

Rxokc +1,

Rx status dsc.CRC =1,

Rx status dsc.RCDF =0.

When set to 0, all packets with CRC error, alignment error, and/or collided fragments will be rejected.

Rxerrc +1,

Rxokc keeps,

Rx status dsc.CRC =0,

Rx status dsc.RCDF =1.

4

AR

R/W

1'b0

Accept Runt: This bit allows the receiver to accept packets that are smaller than 64 bytes. The packet must be at least 8 bytes long to be accepted as a runt. Set to 1 to accept runt packets.

3

AB

R/W

1'b0

Set to 1 to accept broadcast packets, 0 to reject.

2

AM

R/W

1'b0

Set to 1 to accept multicast packets, 0 to reject. RC_REG.AB and AM should be enabled simulatanously.

1

APM

R/W

1'b0

Set to 1 to accept physical match packets, 0 to reject.

0

AAP

R/W

1'b0

Set to 1 to accept all packets with physical destination address, 0 to reject.

REG_CPUTAG

  • Size: 32

  • Address offset: 048h

  • Read/write access: R/W

CPU tag control register.

31 CTEN_RX 30:27 CT_TSIZE 26:25 CT_RSIZE_3_2 24 CT_DSLRN 23 CT_NORMK 22 CT_ASPRI 21:18 CT_SWITCH 17:16 CT_RSIZE_1_0 15:8 CTPM 7:0 CTPV

Bit

Symbol

Access

INI

Description

31

CTEN_RX

R/W

0

Enable parsing ingress packet with cputag format.

30:27

CT_TSIZE

R/W

0

Cputag size in egress pkt.

CTT_size: 4'h0: 0 Byte

  • 4'h1: 4 Byte

  • 4'h2: 8Byte

  • 4'h3: 12 Byte

26:25

CT_RSIZE_3_2

R/W

0

After rl8681 (including), this field is only for ingress pkt.

CTR_size: 4'h0: 0 Byte

  • 4'h1: 4 Byte

  • 4'h2: 8Byte F

Or Apollo cputag with PTP timestamp, set CT_RSIZE to h2.

24

CT_DSLRN

R/W

1

In rtl8370s, Setting of Disable Learning field in tx cputag.

Setting of Disable Learning field in RTL8368 or DSLRN field in RTL8307h tx cputag when short_dsc_format = 0.

23

CT_NORMK

R/W

0

Setting of NORMK field in RTL8307h tx cputag when short_dsc_format = 0.

22

CT_ASPRI

R/W

1

In RTL8307h, setting ASPRI field in tx cputag when short_dsc_format = 0.

In RTL8370S, setting priority select field in tx cputag when short_dsc_format =0..

21:18

CT_SWITCH

R/W

0

Support cputag format of switch

  • 0: no cputag support

  • 1: 8368

  • 2: 8306

  • 3: 8307

  • 4: 8370

  • 5: gmac in 8681.

  • 6: gmac in Apollo, rle0371, rl6266 and rtl9601(rle0639)

17:16

CT_RSIZE_1_0

R/W

0

15:8

CTPM

R/W

0

CPU tag protocol mask.

  • 8306:0xf0

  • 8368:0xe0

  • 8370:0xff

  • 8307h:0xff

7:0

CTPV

R/W

0

CPU tag protocol value.

  • 8306:0x90

  • 8368:0xa0 or 0xb0

  • 8370:0x04

  • 8307h:0x04

REG_CONFIG

  • Size: 32

  • Address offset: 04Ch

  • Read/write access: R/W

Configuration register

31:30 RSVD 29:28 RFF_SIZE_SEL 27 R_TSO_ID_SEL 26 R_MDSLV_OUTEDGE 25 EN_INT_ROUTE 24 EN_INT_SPLIT 23:0 RSVD

Bit

Symbol

Access

INI

Description

31:30

RSVD

R

-

Reserved

29:28

RFF_SIZE_SEL

R/W

2'b10

Set gmac_rxfifo size.

  • 2'b00: 1KB

  • 2'b01: 1664B

  • 2'b10: 2KB

27

R_TSO_ID_SEL

R/W

1'b0

  • 0: each ID of IP header is same as original ID.

  • 1: increment 1 from original ID. Default value is 0.

26

R_MDSLV_OUTEDGE

R/W

0

This bit works only in phy_mode

  • 0: change mdio output data in falling edge

  • 1: change mdio output data in rising edge

25

EN_INT_ROUTE

R/W

0

  • 0: disable interrupt routing, IMR0_reg, IMR1_reg.

  • 1: enable interrupt routing, IMR0_reg, IMR1_reg.

24

EN_INT_SPLIT

R/W

0

When, en_int_route = 0,

  • 0: only int.tdu, tok and rok present.

  • 1: IMR0_reg, IMR1_reg and ISR1_reg present.

When en_int_route = 1, this field is 1.

23:0

RSVD

R

-

Reserved

REG_CPUTAG1

  • Size: 32

  • Address offset: 050h

  • Read/write access: R/W

CPUTAG1 control register

31:7 RSVD 6:4 SPA_DSL 3 RSVD 2:0 SPA_PON

Bit

Symbol

Access

INI

Description

31:7

RSVD

R

-

Reserved

6:4

SPA_DSL

R/W

0

3

RSVD

R

-

Reserved

2:0

SPA_PON

R/W

0

The ingress cputag.SPA=PON field. Used in Apollo cputag.

REG_MSR

  • Size: 32

  • Address offset: 058h

  • Read/write access: R/W

Media Status Register

31 FORCE_TRXFCE 30 RXFCE 29 TXFCE 28:27 SPEED 26 LINKB 25 TXPF 24 RXPF 23 SEL_RGMII 22 FULLDUPREG 21 NWCOMPLETE 20 SEL_MII 19 FORCEDFULLDUP 18 FORCELINK 17:16 FORCE_SPD 15 GMAC_SEL_PHYIF_0 14 RSVD 13 GMAC_PHY_MODE 12 RGMII_RX_DECODE_STS 11 RGMII_TX_ENCODE_STS 10 FORCE_SPD_MODE 9:8 EEE_ABY 7 REG_RMII2MII_EN 6 GMAC_MD_MST 5:2 RSVD 1 REFCLK_PHASE 0 REFCLK_ON

Bit

Symbol

Access

INI

Description

31

FORCE_TRXFCE

R/W

1'b0

Force Tx/RX Flow Control:

1 = enabled Flow control in the absence of NWAY.

0 = disables Flow control in the absence of NWAY.

Version effect: rl6166(ECO) and after.

30

RXFCE

R/W

1'b0

RX Flow control Enable: The flow control is enabled in full-duplex mode only.

Packets are dropped if buffer is exhausted. Default is 0.

1 = Rx Flow Control Enabled.

0 = Rx Flow Control Disabled.

29

TXFCE

R/W

1'b0

Tx Flow Control Enable:

1 = tx flow control enabled.

0 = tx flow control disabled.

ACCEPT ERROR MUST NOT BE ENABLED

28:27

SPEED

R

{SPEED_1000, SPEED_10}

  • 00: 100Mbps,

  • 01: 10Mbps

  • 10: 1000Mbps,

  • 11: not allowed

26

LINKB

R

Inverse of Link status.

0 = Link OK.

1 = Link Fail.

25

TXPF

R

Tx Pause frame:

1 = Ethernet module has sent a pause packet.

0 = the Ethernet module has sent a timer done packet.

24

RXPF

R

Pause Flag:

1 = Ethernet module is in backoff state because a pause packet received.

0 = pause state is clear.

23

SEL_RGMII

R/W

0

Gmac_sel_rgmii

22

FULLDUPREG

R

0

Indicates Full duplex mode from mdio results.

21

NWCOMPLETE

R

0

Nway complete

20

SEL_MII

R

0

Indicates in mii mode.

19

FORCEDFULLDUP

R/W

0

Force gmac operates at full duplex mode.

This bit is Write only in RLE0315.

This bit is R/W in RLE0390 (原RL6166).

  • 1'b1: force gmac in full duplex mode.

  • 1'b0: duplex status is from MDIO auto-polling.

Not means gmac is in half duplex mode.

18

FORCELINK

R/W

0

Force gmac in link ok mode.

This bit is Write only in RLE0315.

This bit is R/W in RLE0390 (RL6166).

  • 1'b1: force gmac in linkok.

  • 1'b0: link status is from MDIO auto-polling.

17:16

FORCE_SPD

R/W

2'b11

Force gmac in 10/100/GIGA mode.

  • 2'b00: 100M

  • 2'b01: 10M

  • 2'b10: GIGA

  • 2'b11: not force mode.

These bits are Write only in RLE0390 (RL6166). The current speed status of gmac can be checked in MSR_reg.{speed1000, speed_10}.

In force mode, SW can set gmac operates in , FD and Link ok(for example) and SW can not set gmac operates in , HD and Link ok. When FORCEDFULLDUP is b0, the duplex status is from MDIO auto-polling, therefore, it is not controlled by SW.

15

GMAC_SEL_PHYIF_0

R

1

  • 1: phy interface 0.works.

  • 0: phy interface 1 works.

14

RSVD

R

-

Reserved

13

GMAC_PHY_MODE

R/W

0

  • 1: in phy mode. (bit[6] will be read as ‘0')

  • 0: not in phy mode. (bit[6] will be read as ‘1')

12

RGMII_RX_DECODE_STS

R/W

0

  • 0: Does not support rgmii in band status(link status, speed and duplex mode of the PHY) by decoding rxd.

  • 1: Supports rgmii in band status(link status, speed and duplex mode of the PHY) by decoding rxd.

11

RGMII_TX_ENCODE_STS

R/W

0

This field is valid only in phy mode.

  • 0: Does not support rgmii in band status(link status, speed and duplex mode of the PHY) by encoding txd.

  • 1: Supports rgmii in band status(link status, speed and duplex mode of the PHY) by encoding txd.

10

FORCE_SPD_MODE

R/W

0

  • 1: gmac is in force speed mode. The real speed in force mode is set in MS_REG.FORCE_SPD.

  • 0: gmac speed status is from md operation.

9:8

EEE_ABY

R

0

Indicates eee ability of PCS.

Eee_aby[0]: eee ability in 100M

Eee_aby[1]: eee ability in giga mode.

7

REG_RMII2MII_EN

R/W

1'b1

  • 1: transfer MII signals to RMII signals

This function is only valid in MII mode.

(default 0: for AmebaI//AmebaPro/AmebaPro2)

6

GMAC_MD_MST

R

1

  • 1: GMAC is used to be MDIO master. (When bit[13] is setting as ‘0')

  • 0: GMAC is used to be MDIO slave. (When bit[13] is setting as ‘1')

5:2

RSVD

R

-

Reserved

1

REFCLK_PHASE

R/W

0

  • 1: for Tx transaction, TXEN & TXD signals are changed on the falling edge of REF_CLK; for Rx transaction, RXD signals are sampled on the falling edge of REF_CLK

  • 0: for Tx transaction, TXEN & TXD signals are changed on the rising edge of REF_CLK; for Rx transaction, RXD signals are sampled on the rising edge of REF_CLK

0

REFCLK_ON

R/W

1

  • 1: REF_CLK on

  • 0: REF_CLK off

REG_MIIAR

  • Size: 32

  • Address offset: 05Ch

  • Read/write access: R/W

MII Access Register

31 FLAG 30:26 PHYADDRESS 25 MDIO_BUSY 24 RSVD 23 EN_EEEP_AUTO_WRITE 22 DISABLE_AUTO_POLLING 21 POLLING_EEE_REG 20:16 REGADDR4_0 15:0 DATA15_0

Bit

Symbol

Access

INI

Description

31

FLAG

R/W

0

Flag bit, used to identify access to MII register:

  • 1: Write data to MII register. Turns to 0 automatically upon completion of MAC writing to the specified MII register.

  • 0: Read data from MII register. Turns to 1 automatically upon completion of MAC reading the specified MII register.

Read write turn around time I s about 64 us.

30:26

PHYADDRESS

R/W

1

Defines the Phy address for the MII.

25

MDIO_BUSY

R

MDIO is busy

24

RSVD

R

-

Reserved

23

EN_EEEP_AUTO_WRITE

R/W

0

HW auto writes PCS.page4.reg20 and reg27 to adjust analog parameters based on eeep_lpi state.

SW should change page to page4 then set MIIA_REG.en_eeep_auto_write. HW will write eeep_abig_on/off and eeep_ldvbias_on/off (in EEEP_CR6_REG and EEEP_CR7_REG) to PCS.page4.reg20 and reg27, respectively, based on eeep_lpi state.

If SW wants to access another page of PCS, SW should disable MIIA_REG.en_eeep_auto_write.

22

DISABLE_AUTO_POLLING

R/W

0

Disable auto polling feature of mdio operation.

  • 0: HW auto polling PCS status.

  • 1: HW does not auto polling PCS status.

21

POLLING_EEE_REG

R/W

0

Polling PCS EEE advertisement register (7.60). In rl6166(原rle0315) and before: this bit is not supported.

In rle0390: In in-direct method, gmac had to access PCS register by multiples R/W of reg13 and 14. It is OK for PCS to be aborted in the middle of indirect method.

In rle0371: HW will complete current indirect access to PCS then stop in-direct method. Please refer to EEE_CR1_reg.

20:16

REGADDR4_0

R/W

0

Defines 5-bit MII register address.

15:0

DATA15_0

R/W

0

Defines 16 bit MII resgister data.

REG_SWINT

  • Size: 32

  • Address offset: 060h

  • Read/write access: R/W

SWINT Register

31:25 RSVD 24 SWINT 23:0 RSVD

Bit

Symbol

Access

INI

Description

31:25

RSVD

R

-

Reserved

24

SWINT

R/W

Write 1 will force ISR register bit 10 set to 1

23:0

RSVD

R

-

Reserved

REG_VLAN_REG

  • Size: 32

  • Address offset: 064h

  • Read/write access: R/W

Vlan tag register

31:16 STAG_PID 15 TDSC_VLAN_TYPE 14:0 RSVD

Bit

Symbol

Access

INI

Description

31:16

STAG_PID

R/W

0x88a8

Set the s-tag protocol identifier. This field is valid only when COM_REG.TDSC_VLAN_TYPE is high.

15

TDSC_VLAN_TYPE

R/W

0

  • 1: tx command descriptor.tx_vlan_action is for s-tag.

  • 0: tx command descriptor.tx_vlan_action is for c-tag.

14:0

RSVD

R

-

Reserved

REG_LED_CTRL

  • Size: 32

  • Address offset: 070h

  • Read/write access: R/W

Led control register

31:20 RSVD 19 EEE_EN_LED 18 CUSTOM_LED 17:16 LEDSEL 15:12 LEDSEL3 11:8 LEDSEL2 7:4 LEDSEL1 3:0 LEDSEL0

Bit

Symbol

Access

INI

Description

31:20

RSVD

R

-

Reserved

19

EEE_EN_LED

R/W

0

Enable/disable lpi led.

18

CUSTOM_LED

R/W

0

Custom led mode. 1: using custom led matrix table. 0: using Non-custom led table.

17:16

LEDSEL

R/W

0

Non custom led select. Following EEE spec, combine the Link signal and LPI signal in the same LED pin. While entering LPI state, LED will blink with 2784ms cycle, of which the first 2349ms LED light is turned off, after 435ms is turned on.

NO EEE in RL6166.

15:12

LEDSEL3

R/W

0

Custom led3 select.

11:8

LEDSEL2

R/W

0

Custom led2 select.

7:4

LEDSEL1

R/W

0

Custom led1 select.

3:0

LEDSEL0

R/W

0

Custom led0 select.

REG_BIST

  • Size: 32

  • Address offset: 080h

  • Read/write access: R/W

Memory bist

31:15 RSVD 14 CSR_RFF_TMCK 13 CSR_RFF_NAP 12 CSR_RFF_DVSE 11:8 CSR_RFF_DVS 7 RSVD 6 CSR_TFF_TMCK 5 CSR_TFF_NAP 4 CSR_TFF_DVSE 3:0 CSR_TFF_DVS

Bit

Symbol

Access

INI

Description

31:15

RSVD

R

-

Reserved

14

CSR_RFF_TMCK

R/W

1'b0

Set TMCK for RXFIFO

13

CSR_RFF_NAP

R/W

1'b0

Set NAP for RXFIFO

12

CSR_RFF_DVSE

R/W

1'b0

Set DVSE for RXFIFO

11:8

CSR_RFF_DVS

R/W

4'b0000

Set DVS for RXFIFO

7

RSVD

R

-

Reserved

6

CSR_TFF_TMCK

R/W

1'b0

Set TMCK for TXFIFO

5

CSR_TFF_NAP

R/W

1'b0

Set NAP for TXFIFO

4

CSR_TFF_DVSE

R/W

1'b0

Set DVSE for TXFIFO

3:0

CSR_TFF_DVS

R/W

4'b0000

Set DVS for TXFIFO

REG_PGLBK

  • Size: 32

  • Address offset: 084h

  • Read/write access: R/W

Packet generator register.

31:16 RSVD 15 EN_PGLBK 14 PGLBK_DATA_PAT_SEL 13 PGLBK_DONE 12 PGLBK_FAIL 11 PBLBK_PKT_LENGTH_SEL 10:9 PGLBK_PKT_NUM_SEL 8 R_DISABLE_TXCRC 7:0 PGLBK_DATA_PAT

Bit

Symbol

Access

INI

Description

31:16

RSVD

R

-

Reserved

15

EN_PGLBK

R/W

0

Enable packet generator mode

14

PGLBK_DATA_PAT_SEL

R/W

0

  • 1: fixed pattern, 0: pseudo random

13

PGLBK_DONE

R

0

Packet generator in wire lbk mode status. 1: done

12

PGLBK_FAIL

R

0

Packet generator in wire lbk mode status. 1: fail

11

PBLBK_PKT_LENGTH_SEL

R/W

0

  • 0: random (range: 64-1504B), 1: 64B

10:9

PGLBK_PKT_NUM_SEL

R/W

0

  • 2'b00: 100 pkts,

  • 2'b10: 5 pkts.

  • 2'b01: 1 pkt

  • 2'b11: reserved.

8

R_DISABLE_TXCRC

R/W

0

  • 1: not append CRC for egress packet.

  • 0: append CRC for egress packet.

7:0

PGLBK_DATA_PAT

R/W

0

Pattern inside tx packet when pglbk_data_pat_sel is high. For RLE0516, only pglbk_data_pat[3:0] are used.

REG_EEE_CR1

  • Size: 32

  • Address offset: 088h

  • Read/write access: R/W

31 EN_FRC_EEE 30 FRC_EEE_GIGA 29 FRC_EEE 28 EN_EEE 27 EN_EEE_TX 26 EN_EEE_RX 25:24 RSVD 23 EEE_OUTQ_LOWQ_OVER 22:20 RSVD 19 EEE_STS 18 EEE_TX_STS 17 EEE_RX_STS 16 EEE_PAUSEFLAG 15 RSVD 14 EEE_WAKE_SET1 13 EEE_WAKE_SET0 12 EEE_REQ_SET2 11 EEE_REQ_SET1 10 EEE_REQ_SET0 9 EEE_RXTIMER_EN 8 EEE_TXTIMER_EN 7:6 EEE_TIMER_UNIT_GIGA_1 5:4 EEE_TIMER_UNIT_GIGA_2 3:2 EEE_TIMER_UNIT_100_1 1:0 EEE_TIMER_UNIT_100_2

Bit

Symbol

Access

INI

Description

31

EN_FRC_EEE

R/W

0

Enable EEE force mode

  • 0: Disable EEE FORCE Mode

  • 1: Enable EEE FORCE Mode If EN_FRC_EEE=1, both FRC_EEE_Giga and FRC_EEE_100 are used to force MAC operation ability.

30

FRC_EEE_GIGA

R/W

0

If EN_FRC_EEE=1, FRC_EEE_Giga:

  • 0: Disable MAC EEE ability for 1000BASE-T.

  • 1: Enable MAC EEE ability for 1000BASE-T. If EN_FRC_EEE=0, FRC_EEE_Giga means EEE advertisement register 7.60 bit[2]

29

FRC_EEE

R/W

0

If EN_FRC_EEE=1, FRC_EEE_100

  • 0: Disable MAC EEE ability for 100BASE-TX.

  • 1: Enable MAC EEE ability for 100BASE-TX. If EN_FRC_EEE=0, FRC_EEE_100 means EEE advertisement register 7.60 bit[1]

28

EN_EEE

R/W

0

Set same as PHY setting, for LED.

27

EN_EEE_TX

R/W

0

Enable MAC TX EEE ability

  • 0: Disable EEE ability for TX.

  • 1: Enable EEE ability for TX.

26

EN_EEE_RX

R/W

0

Enable MAC RX EEE ability

  • 0: Disable EEE ability for RX.

  • 1: Enable EEE ability for RX. Application note : The following methods could be used to disable EEE function. a) n[1:0] = 00 -> completely disable EEE function, or b) n[3:2] = 00 -> disable /1000Mbps EEE capability (excludes 10Mbps ).

25:24

RSVD

R

-

Reserved

23

EEE_OUTQ_LOWQ_OVER

R/W

0

SW has many packets to be tranmitted, then set this bit to tell HW leave lpi state in condition2.

22:20

RSVD

R

-

Reserved

19

EEE_STS

R

0

Indicate EEE status, both TX and RX.

  • 1: Both TX and RX in LPI mode simultaneously.

  • 0: not both TX and RX in LPI mode simultaneously

18

EEE_TX_STS

R

0

Indicate EEE TX status

  • 1: TX is in LPI mode.

  • 0: TX is in normal mode.

17

EEE_RX_STS

R

0

Indicate Port 0 EEE RX status

  • 1: RX is in LPI mode.

  • 0: RX is in normal mode.

16

EEE_PAUSEFLAG

R

0

Set indication for LPI request due to RX pause on frame.

  • 1: indicate RX pause on frame;

  • 0: no indicate.

15

RSVD

R

-

Reserved

14

EEE_WAKE_SET1

R/W

0

Enable LPI TX high priority pkt Wakeup decision maker for EEE.

  • 1: enable;

  • 0: disable. Gmac will leave lpi mode when EEE_CR1_reg.txq_th is met or one of the egress is larger than 512B.

13

EEE_WAKE_SET0

R/W

0

Enable LPI TX transmit wakeup decision maker for EEE.

  • 1: enable;

  • 0: disable.

12

EEE_REQ_SET2

R/W

0

Enable LPI TX request RX pause on frame decision maker for EEE.

  • 1: enable;

  • 0: disable.

11

EEE_REQ_SET1

R/W

0

Enable LPI TX request queue empty decision maker for EEE.

  • 1: enable;

  • 0: disable. For RLE0390(原RL6166), only for tx is single descriptor operation. For next version, this bit can support multi-descriptor operation.

10

EEE_REQ_SET0

R/W

0

Enable LPI TX request Rate decision maker for EEE.

  • 1: enable;

  • 0: disable.

9

EEE_RXTIMER_EN

R/W

0

Enable RX meter to count RX LPI status time

8

EEE_TXTIMER_EN

R/W

0

Enable TX meter to count TX LPI status time

7:6

EEE_TIMER_UNIT_GIGA_1

R/W

0

Set the unit for timer T_wakeup, T_tx_rate, and T_pause in EEE function.

  • 00: 1uS;

  • 01: 16 uS;

  • 10: 128 uS;

  • 11: 1024uS.

5:4

EEE_TIMER_UNIT_GIGA_2

R/W

0

Set the unit for timer T_tx_delay in EEE function.

  • 00: 8uS;

  • 01: 64uS;

  • 10: 256uS;

  • 11: 1024uS.

3:2

EEE_TIMER_UNIT_100_1

R/W

0

Set the unit for timer T_wakeup, T_tx_rate, and T_pause in EEE function.

  • 00: 1uS;

  • 01: 16uS;

  • 10: 128uS;

  • 11: 1024uS.

1:0

EEE_TIMER_UNIT_100_2

R/W

0

Set the unit for timer T_tx_delay in EEE function.

  • 00: 8uS;

  • 01: 64uS;

  • 10: 512uS;

  • 11: 1024uS.

REG_EEE_CR2

  • Size: 32

  • Address offset: 08Ch

  • Read/write access: R/W

31:24 EEE_TIMER_TW_GIGA 23:16 EEE_TIMER_TR_GIGA 15:8 EEE_TIMER_TD_GIGA 7:0 EEE_TIMER_TP_GIGA

Bit

Symbol

Access

INI

Description

31:24

EEE_TIMER_TW_GIGA

R/W

0x10

Timer value in EEE function for T_wakeup. Value from 0~256.

Unit: EEE_Timer_Unit_Giga_1.

Default value is 16 us.

23:16

EEE_TIMER_TR_GIGA

R/W

0x0a

Timer value in EEE function for T_tx_rate.

Unit: EEE_Timer_Unit_Giga_1.

Default value is 10 us.

15:8

EEE_TIMER_TD_GIGA

R/W

0xc4

Timer value in EEE function for QoS based LPI decision maker T_tx_delay.

Unit: EEE_Timer_Unit_Giga_2*4.

Default value is 200 ms.

7:0

EEE_TIMER_TP_GIGA

R/W

0x0a

Timer value in EEE function for TX decision maker T_pause.

Unit: EEE_Timer_Unit_Giga_1.

Default value is 10 us.

REG_EEE_CR3

  • Size: 32

  • Address offset: 090h

  • Read/write access: R/W

31:24 EEE_TIMER_TW_100 23:16 EEE_TIMER_TR_100 15:8 EEE_TIMER_TD_100 7:0 EEE_TIMER_TP_100

Bit

Symbol

Access

INI

Description

31:24

EEE_TIMER_TW_100

R/W

0x1e

Timer value in EEE function for T_wakeup. Value from 0~256.

Unit: EEE_Timer_Unit_100_1

Default value is 30 us.

23:16

EEE_TIMER_TR_100

R/W

0x0a

Timer value in EEE function for T_tx_rate.

Unit: EEE_Timer_Unit_100_1.

Default value is 10 us.

15:8

EEE_TIMER_TD_100

R/W

0xf4

Timer value in EEE function for QoS based LPI decision maker T_tx_delay.

Unit: EEE_Timer_Unit_100_2*4.

Default value is 1s.

7:0

EEE_TIMER_TP_100

R/W

0x0a

Timer value in EEE function for TX decision maker T_pause.

Unit: EEE_Timer_Unit_100_1.

Default value is 10 us.

REG_EEE_CR4

  • Size: 32

  • Address offset: 094h

  • Read/write access: R/W

31:16 EEE_TX_THR_GIGA 15:0 EEE_TX_THR_100

Bit

Symbol

Access

INI

Description

31:16

EEE_TX_THR_GIGA

R/W

0x0271

Set the TX threshold in EEE function. Unit is Byte. EEE_TX_THR=Round [(T_tx_rate×Rate) / 8 ]. If you set T_tx_rate=10us, Rate=1000Mbps, so set EEE_TX_THR = 0x4E2 (1250bytes).

Default value is 0x271(~half rate).

15:0

EEE_TX_THR_100

R/W

0x003e

Set the TX threshold in EEE function. Unit is Byte. EEE_TX_THR=Round [(T_tx_rate×Rate) / 8 ]. If you set T_tx_rate=10us, Rate=100Mbps, so set EEE_TX_THR = 0x7D (125bytes).

Default value is 0x3E (~half rate).

REG_EEE_LPI_TMO_REG

  • Size: 32

  • Address offset: 098h

  • Read/write access: R

31:22 RSVD 21:0 EEE_RXLPI_TIME

Bit

Symbol

Access

INI

Description

31:22

RSVD

R

-

Reserved

21:0

EEE_RXLPI_TIME

R

0x0

RX in LPI time. (unit: 1us) (accumulation)Valid as (PORT_MASK[0]==1&&RXTimer_EN==1)

REG_EEE_LPI_TM1_REG

  • Size: 32

  • Address offset: 09Ch

  • Read/write access: R/W

31:24 RSVD 23 EEE_STOP_TXC 22 EEE_TRXCTL_LEVEL 21:0 EEE_TXLPI_TIME

Bit

Symbol

Access

INI

Description

31:24

RSVD

R

-

Reserved

23

EEE_STOP_TXC

R/W

0

This bit works in rgmii_1000 and rgmii_100 modes only.

  • 1: gmac halts gmac_rgmii_txc_out when gmac enters lpi.

  • 0: gmac does not halt gmac_rgmii_txc_out when gmac enters lpi. This bit should always be b0 for RLE0390(原RL6166). Gmac can halt gmac_rgmii_txc_out in the next version.

22

EEE_TRXCTL_LEVEL

R/W

0

The gmac_rgmii_txe and gmac_rgmii_rxdv level when gmac is in lpi.

  • 1: tx_ctl and rx_ctl is high when in lpi.

  • 0: reserved.

21:0

EEE_TXLPI_TIME

R

0x0

TX in LPI time. (unit: 1us ) (accumulation)Valid as (PORT_MASK[0]==1&&TXTimer_EN==1)

REG_EEEP_CR1

  • Size: 32

  • Address offset: 0B0h

  • Read/write access: R/W

31 EN_EEEP 30 CFG_EN_EEEP_RX 29 CFG_EN_EEEP_TX 28 CFG_EN_EEEP_GIGA 27 CFG_EN_EEEP 26 CFG_EEEP_DEFER_TXLPI 25 RSVD 24 PHY_MST_MODE 23 RSVD 22:16 EEEP_DBGO_SEL 15:0 RSVD

Bit

Symbol

Access

INI

Description

31

EN_EEEP

R/W

0x0

Enable EEEP function 0b0: Disable EEEP function. 0b1: Enable EEEP function.

30

CFG_EN_EEEP_RX

R/W

0x0

  • 1: Enable EEEP RX.

  • 0: Disable EEEP RX.

29

CFG_EN_EEEP_TX

R/W

0x0

  • 1: Enable EEEP TX.

  • 0: Disable EEEP TX.

28

CFG_EN_EEEP_GIGA

R/W

0x0

  • 1: Enable EEEP in giga mode.

  • 0: Disable EEEP in giga mode.

27

CFG_EN_EEEP

R/W

0x0

  • 1: Enable EEEP in mode.

  • 0: Disable EEEP in mode.

26

CFG_EEEP_DEFER_TXLPI

R/W

0x0

???

25

RSVD

R

-

Reserved

24

PHY_MST_MODE

R/W

0x0

When PMA is in master clock role, the EEEP_RX can work. SW needs to configure PCS reg9.bit12(Master-slave manual config enable) and reg9.bit11(Master-slave config value). Then setting EEEP_CR1_REG.PHY_MST_MODE.

23

RSVD

R

-

Reserved

22:16

EEEP_DBGO_SEL

R/W

0x0

Eeep module debug signals selection.

15:0

RSVD

R

-

Reserved

REG_EEEP_CR2

  • Size: 32

  • Address offset: 0B4h

  • Read/write access: R/W

31:8 RSVD 7:0 EEEP_SLEEP_STEP

Bit

Symbol

Access

INI

Description

31:8

RSVD

R

-

Reserved

7:0

EEEP_SLEEP_STEP

R/W

0x1

Value from 1 to 255, indicate the rx sleep step in EEEP function. Value 0 is the same as 1. EEPROM and register configurable.//???

REG_EEEP_CR3

  • Size: 32

  • Address offset: 0B8h

  • Read/write access: R/W

31:16 EEEP_TX_THR 15:0 EEEP_RX_THR

Bit

Symbol

Access

INI

Description

31:16

EEEP_TX_THR

R/W

0xF0

Set the TX threshold in EEEP function. Unit: Byte; EEEP_TX_THR=Round [(T_rx_rate×Rate) / 8 ].

If you set T_rx_rate=192us,Rate=10Mbps, so set EEEP_TX_THR= 0xF0 (240 bytes). EEPROM and register configurable.//HYH???

15:0

EEEP_RX_THR

R/W

0xF0

Set the RX threshold in EEEP function. Unit: Byte; EEEP_RX_THR=Round [(T_rx_rate×Rate) / 8 ].

If you set T_rx_rate=192us,Rate=10Mbps, so set EEEP_TX_THR= 0xF0 (240 bytes). EEPROM and register configurable. //HYH???

REG_EEEP_CR4

  • Size: 32

  • Address offset: 0BCh

  • Read/write access: R/W

31:24 EEEP_TIMER_RX_RATE 23:16 EEEP_TIMER_RX_WAKE 15:8 EEEP_TIMER_TX_WAIT 7:0 EEEP_TIMER_PAUSE

Bit

Symbol

Access

INI

Description

31:24

EEEP_TIMER_RX_RATE

R/W

0xC

Timer value in EEEP function for T_rx_rate.

Unit: microsecond.

Default value is 192 us.

EEPROM and register configurable.

23:16

EEEP_TIMER_RX_WAKE

R/W

0x2

Timer value in EEEP function for T_rx_wake.

Unit: microsecond.

Default value is 32 us.

EEPROM and register configurable.

15:8

EEEP_TIMER_TX_WAIT

R/W

0x1

Timer value in EEEP function for T_tx_wait.

Unit: microsecond.

Default value is 16 us.

EEPROM and register configurable.

7:0

EEEP_TIMER_PAUSE

R/W

0x1

Timer value in EEEP function for T_pause_on.

Unit:refer to EEEP_Timer_Unit.

Default value is 16 us.

EEPROM and register configurable.

REG_EEEP_CR5

  • Size: 32

  • Address offset: 0C0h

  • Read/write access: R/W

31:24 RSVD 23:16 EEEP_TX_RATE 15:10 RSVD 9:8 EEEP_TIMER_UNIT 7:0 EEEP_TIMER_RX_SLEEP

Bit

Symbol

Access

INI

Description

31:24

RSVD

R

-

Reserved

23:16

EEEP_TX_RATE

R/W

0x0

15:10

RSVD

R

-

Reserved

9:8

EEEP_TIMER_UNIT

R/W

0x1

Set the unit for timer in EEEP function.

  • 00: 1us;

  • 01: 16us;

  • 10: 128us;

  • 11: 1024us.

EEPROM and register configurable.

7:0

EEEP_TIMER_RX_SLEEP

R/W

0xC

Value of Timer in EEEP function for T_rx_sleep.

Unit: microsecond.

Default value is 192 us.

EEPROM and register configurable.

REG_EEEP_CR6

  • Size: 32

  • Address offset: 0C4h

  • Read/write access: R/W

31:16 EEEP_ABIG_ON 15:0 EEEP_ABIG_OFF

Bit

Symbol

Access

INI

Description

31:16

EEEP_ABIG_ON

R/W

0xb80a

15:0

EEEP_ABIG_OFF

R/W

0x800a

REG_EEEP_CR7

  • Size: 32

  • Address offset: 0C8h

  • Read/write access: R/W

31:16 EEEP_LDVBIAS_ON 15:0 EEEP_LDVBIAS_OFF

Bit

Symbol

Access

INI

Description

31:16

EEEP_LDVBIAS_ON

R/W

0x7550

15:0

EEEP_LDVBIAS_OFF

R/W

0x0550

REG_IMR0_REG

  • Size: 32

  • Address offset: 0D0h

  • Read/write access: R/W

31:29 RSVD 28 IMR0_TDU5 27 IMR0_TDU4 26 IMR0_TDU3 25 IMR0_TDU2 24 IMR0_TDU1 23:21 RSVD 20 IMR0_TOK5 19 IMR0_TOK4 18 IMR0_TOK3 17 IMR0_TOK2 16 IMR0_TOK1 15:6 RSVD 5 IMR0_ROK6 4 IMR0_ROK5 3 IMR0_ROK4 2 IMR0_ROK3 1 IMR0_ROK2 0 IMR0_ROK1

Bit

Symbol

Access

INI

Description

31:29

RSVD

R

-

Reserved

28

IMR0_TDU5

R/W

0

27

IMR0_TDU4

R/W

0

26

IMR0_TDU3

R/W

0

25

IMR0_TDU2

R/W

0

24

IMR0_TDU1

R

0

This bit is IMR.tdu

23:21

RSVD

R

-

Reserved

20

IMR0_TOK5

R/W

0

19

IMR0_TOK4

R/W

0

18

IMR0_TOK3

R/W

0

17

IMR0_TOK2

R/W

0

16

IMR0_TOK1

R

0

This bit is IMR.tok

15:6

RSVD

R

-

Reserved

5

IMR0_ROK6

R/W

0

4

IMR0_ROK5

R/W

0

3

IMR0_ROK4

R/W

0

2

IMR0_ROK3

R/W

0

1

IMR0_ROK2

R/W

0

0

IMR0_ROK1

R

0

This bit is IMR.rok

REG_IMR1_REG

  • Size: 32

  • Address offset: 0D4h

  • Read/write access: R/W

31:29 RSVD 28 IMR1_TDU5 27 IMR1_TDU4 26 IMR1_TDU3 25 IMR1_TDU2 24 IMR1_TDU1 23:21 RSVD 20 IMR1_TOK5 19 IMR1_TOK4 18 IMR1_TOK3 17 IMR1_TOK2 16 IMR1_TOK1 15:14 RSVD 13 IMR1_RDU6 12 IMR1_RDU5 11 IMR1_RDU4 10 IMR1_RDU3 9 IMR1_RDU2 8 IMR1_RDU1 7:6 RSVD 5 IMR1_ROK6 4 IMR1_ROK5 3 IMR1_ROK4 2 IMR1_ROK3 1 IMR1_ROK2 0 IMR1_ROK1

Bit

Symbol

Access

INI

Description

31:29

RSVD

R

-

Reserved

28

IMR1_TDU5

R/W

0

27

IMR1_TDU4

R/W

0

26

IMR1_TDU3

R/W

0

25

IMR1_TDU2

R/W

0

24

IMR1_TDU1

R/W

0

23:21

RSVD

R

-

Reserved

20

IMR1_TOK5

R/W

0

19

IMR1_TOK4

R/W

0

18

IMR1_TOK3

R/W

0

17

IMR1_TOK2

R/W

0

16

IMR1_TOK1

R/W

0

15:14

RSVD

R

-

Reserved

13

IMR1_RDU6

R/W

0

12

IMR1_RDU5

R/W

0

11

IMR1_RDU4

R/W

0

10

IMR1_RDU3

R/W

0

9

IMR1_RDU2

R/W

0

8

IMR1_RDU1

R/W

0

7:6

RSVD

R

-

Reserved

5

IMR1_ROK6

R/W

0

4

IMR1_ROK5

R/W

0

3

IMR1_ROK4

R/W

0

2

IMR1_ROK3

R/W

0

1

IMR1_ROK2

R/W

0

0

IMR1_ROK1

R/W

0

REG_ISR1_REG

  • Size: 32

  • Address offset: 0D8h

  • Read/write access: R/W

31:29 RSVD 28 ISR_TDU5 27 ISR_TDU4 26 ISR_TDU3 25 ISR_TDU2 24 ISR_TDU1 23:21 RSVD 20 ISR_TOK5 19 ISR_TOK4 18 ISR_TOK3 17 ISR_TOK2 16 ISR_TOK1 15:6 RSVD 5 ISR_ROK6 4 ISR_ROK5 3 ISR_ROK4 2 ISR_ROK3 1 ISR_ROK2 0 ISR_ROK1

Bit

Symbol

Access

INI

Description

31:29

RSVD

R

-

Reserved

28

ISR_TDU5

R/W

0

Tx Descriptor Ring5 Unavailable: When set, indicates Tx descriptor Ring5 is unavailable.

Write 1 to clear.

27

ISR_TDU4

R/W

0

Tx Descriptor Ring4 Unavailable: When set, indicates Tx descriptor Ring5 is unavailable.

Write 1 to clear.

26

ISR_TDU3

R/W

0

Tx Descriptor Ring3 Unavailable: When set, indicates Tx descriptor Ring5 is unavailable.

Write 1 to clear.

25

ISR_TDU2

R/W

0

Tx Descriptor Ring2 Unavailable: When set, indicates Tx descriptor Ring5 is unavailable.

Write 1 to clear.

24

ISR_TDU1

R

0

This bit is ISR.tdu

23:21

RSVD

R

-

Reserved

20

ISR_TOK5

R/W

0

Transmit Interrupt: Indicates that the DMA of the last Ring5 descriptor of TxIntMitigation number of Tx packet has completed and the last descriptor has been closed.

Write 1 to clear.

19

ISR_TOK4

R/W

0

Transmit Interrupt: Indicates that the DMA of the last Ring4 descriptor of TxIntMitigation number of Tx packet has completed and the last descriptor has been closed.

Write 1 to clear.

18

ISR_TOK3

R/W

0

Transmit Interrupt: Indicates that the DMA of the last Ring3 descriptor of TxIntMitigation number of Tx packet has completed and the last descriptor has been closed.

Write 1 to clear.

17

ISR_TOK2

R/W

0

Transmit Interrupt: Indicates that the DMA of the last Ring2 descriptor of TxIntMitigation number of Tx packet has completed and the last descriptor has been closed.

Write 1 to clear.

16

ISR_TOK1

R

0

This bit is ISR.tok

15:6

RSVD

R

-

Reserved

5

ISR_ROK6

R/W

0

Receive (Rx) OK: This interrupt is set either when RxIntMitigation packet is met or RxPktTimer expires in Ring6.

Write 1 to clear.

4

ISR_ROK5

R/W

0

Receive (Rx) OK: This interrupt is set either when RxIntMitigation packet is met or RxPktTimer expires in Ring5.

Write 1 to clear.

3

ISR_ROK4

R/W

0

Receive (Rx) OK: This interrupt is set either when RxIntMitigation packet is met or RxPktTimer expires in Ring4.

Write 1 to clear.

2

ISR_ROK3

R/W

0

Receive (Rx) OK: This interrupt is set either when RxIntMitigation packet is met or RxPktTimer expires in Ring3.

Write 1 to clear.

1

ISR_ROK2

R/W

0

Receive (Rx) OK: This interrupt is set either when RxIntMitigation packet is met or RxPktTimer expires in Ring2.

Write 1 to clear.

0

ISR_ROK1

R

0

This bit is ISR.rok

REG_INT_R_REG

  • Size: 32

  • Address offset: 0DCh

  • Read/write access: R/W

Interrupt routing register

31:25 RSVD 24 TR5_INT_ROUTING 23 RSVD 22 TR4_INT_ROUTING 21 RSVD 20 TR3_INT_ROUTING 19 RSVD 18 TR2_INT_ROUTING 17 RSVD 16 TR1_INT_ROUTING 15:11 RSVD 10 RR6_INT_ROUTING 9 RSVD 8 RR5_INT_ROUTING 7 RSVD 6 RR4_INT_ROUTING 5 RSVD 4 RR3_INT_ROUTING 3 RSVD 2 RR2_INT_ROUTING 1 RSVD 0 RR1_INT_ROUTING

Bit

Symbol

Access

INI

Description

31:25

RSVD

R

-

Reserved

24

TR5_INT_ROUTING

R/W

0

23

RSVD

R

-

Reserved

22

TR4_INT_ROUTING

R/W

0

21

RSVD

R

-

Reserved

20

TR3_INT_ROUTING

R/W

0

19

RSVD

R

-

Reserved

18

TR2_INT_ROUTING

R/W

0

17

RSVD

R

-

Reserved

16

TR1_INT_ROUTING

R/W

0

15:11

RSVD

R

-

Reserved

10

RR6_INT_ROUTING

R/W

0

9

RSVD

R

-

Reserved

8

RR5_INT_ROUTING

R/W

0

7

RSVD

R

-

Reserved

6

RR4_INT_ROUTING

R/W

0

5

RSVD

R

-

Reserved

4

RR3_INT_ROUTING

R/W

0

3

RSVD

R

-

Reserved

2

RR2_INT_ROUTING

R/W

0

1

RSVD

R

-

Reserved

0

RR1_INT_ROUTING

R/W

0

REG_RST_PWR_DOWN_OPERATION_CTRL_REG

  • Size: 32

  • Address offset: 0E0h

  • Read/write access: R/W

Reset and Power Down Operation Control Register

31:4 RSVD 3 AUTORXCLKDIS 2 AUTOTXCLKDIS 1 AUTOISOU 0 AUTOLSU

Bit

Symbol

Access

INI

Description

31:4

RSVD

R

-

Reserved

3

AUTORXCLKDIS

R/W

0

  • 1: Auto Disable Rx Clock when AUTOISOU=1

2

AUTOTXCLKDIS

R/W

0

  • 1: Auto Disable Tx Clock when AUTOISOU=1

1

AUTOISOU

R/W

0

Auto Isolate Update

0

AUTOLSU

R/W

0

Auto Link Status Update

REG_CLK_CTRL_REG

  • Size: 32

  • Address offset: 0E4h

  • Read/write access: R/W

Clock Control Register

31:8 RSVD 7 REV_00E4_7 6 REV_00E4_6 5 REV_00E4_5 4 REV_00E4_4 3 REV_00E4_3 2 DMA_DATA_SWAP 1 RXCLK_EN 0 TXCLK_EN

Bit

Symbol

Access

INI

Description

31:8

RSVD

R

-

Reserved

7

REV_00E4_7

R/W

0

Reserved bit

6

REV_00E4_6

R/W

0

Reserved bit

5

REV_00E4_5

R/W

0

Reserved bit

4

REV_00E4_4

R/W

1

Reserved bit

3

REV_00E4_3

R/W

1

Reserved bit

2

DMA_DATA_SWAP

R/W

1

  • 1: Swap data order for dma_mst

1

RXCLK_EN

R/W

1

  • 0: Rx Clock Gated (txc_out)

0

TXCLK_EN

R/W

1

  • 0: Tx Clock Gated (rxc_out)

REG_INTERUPT_MASK_REG

  • Size: 32

  • Address offset: 0F0h

  • Read/write access: R/W

Interrupt Mask Register

31:6 RSVD 5 LX_MST_TO_INTEN 4 LX_SLV_TO_INTEN 3 ISON 2 PWRDWNN 1 LPBKN 0 RSTN

Bit

Symbol

Access

INI

Description

31:6

RSVD

R

-

Reserved

5

LX_MST_TO_INTEN

R/W

0

Interrupt enable of lexra master timeout

4

LX_SLV_TO_INTEN

R/W

0

Interrupt enable of lexra slave timeout

3

ISON

R/W

0

Isolate Notify

2

PWRDWNN

R/W

0

Power Down Notify

1

LPBKN

R/W

0

Loopback Notify

0

RSTN

R/W

0

Reset Notify

REG_INTERUPT_STATUS_REG

  • Size: 32

  • Address offset: 0F4h

  • Read/write access: R/W

Interrupt Status Register

31:6 RSVD 5 LX_MST_TO_INT 4 LX_SLV_TO_INT 3 ISONS 2 PWRDWNNS 1 LPBKNS 0 RSTNS

Bit

Symbol

Access

INI

Description

31:6

RSVD

R

-

Reserved

5

LX_MST_TO_INT

R/W

0

Interrupt status of lexra master timeout

4

LX_SLV_TO_INT

R/W

0

Interrupt status of lexra slave timeout

3

ISONS

R/W

0

Isolate Notify When set, indicate Isolate is detected.

Write 1 to clear.

2

PWRDWNNS

R/W

0

Power Down Notify When set, indicate Isolate is detected.

Write 1 to clear.

1

LPBKNS

R/W

0

Loopback Notify When set, indicate Isolate is detected.

Write 1 to clear.

0

RSTNS

R/W

0

Reset Notify When set, indicate Isolate is detected.

Write 1 to clear.

REG_TXFDP1

  • Size: 32

  • Address offset: 1300h

  • Read/write access: R/W

Tx First Descriptor Pointer (FDP) for 1st priority queue. 32 bits

31:2 TXFDP1 1:0 RSVD

Bit

Symbol

Access

INI

Description

31:2

TXFDP1

R/W

0

Tx 1st priority Descriptor Pointer to the Tx Ring

1:0

RSVD

R

-

Reserved

REG_TXCDO1

  • Size: 32

  • Address offset: 1304h

  • Read/write access: R

Tx Current Descriptor Offset (CDO) for 1st priority queue.16 bits

31:12 RSVD 11:0 TXCDO1

Bit

Symbol

Access

INI

Description

31:12

RSVD

R

-

Reserved

11:0

TXCDO1

R

Tx 1st priority Current Descriptor Offset: FDP+CDO = current descriptor pointer. CDO increments by 16 bytes each time.

REG_TXFDP2

  • Size: 32

  • Address offset: 1310h

  • Read/write access: R/W

Tx First Descriptor Pointer (FDP) for 2nd priority queue. 32 bits

31:2 TXFDP2 1:0 RSVD

Bit

Symbol

Access

INI

Description

31:2

TXFDP2

R/W

0

Tx 2st priority Descriptor Pointer to the Tx Ring

1:0

RSVD

R

-

Reserved

REG_TXCDO2

  • Size: 32

  • Address offset: 1314h

  • Read/write access: R

Tx Current Descriptor Offset (CDO) for 2nd priority queue.16 bits

31:12 RSVD 11:0 TXCDO2

Bit

Symbol

Access

INI

Description

31:12

RSVD

R

-

Reserved

11:0

TXCDO2

R

Tx 2st priority Current Descriptor Offset: FDP+CDO = current descriptor pointer. CDO increments by 16 bytes each time.

REG_TXFDP3

  • Size: 32

  • Address offset: 1320h

  • Read/write access: R/W

Tx First Descriptor Pointer (FDP) for 3rd priority queue. 32 bits

31:2 TXFDP3 1:0 RSVD

Bit

Symbol

Access

INI

Description

31:2

TXFDP3

R/W

0

Tx 3st priority Descriptor Pointer to the Tx Ring

1:0

RSVD

R

-

Reserved

REG_TXCDO3

  • Size: 32

  • Address offset: 1324h

  • Read/write access: R

Tx Current Descriptor Offset (CDO) for 3rd priority queue.16 bits

31:12 RSVD 11:0 TXCDO3

Bit

Symbol

Access

INI

Description

31:12

RSVD

R

-

Reserved

11:0

TXCDO3

R

Tx 3st priority Current Descriptor Offset: FDP+CDO = current descriptor pointer. CDO increments by 16 bytes each time.

REG_TXFDP4

  • Size: 32

  • Address offset: 1330h

  • Read/write access: R/W

Tx First Descriptor Pointer (FDP) for 4th priority queue. 32 bits

31:2 TXFDP4 1:0 RSVD

Bit

Symbol

Access

INI

Description

31:2

TXFDP4

R/W

0

Tx 4st priority Descriptor Pointer to the Tx Ring

1:0

RSVD

R

-

Reserved

REG_TXCDO4

  • Size: 32

  • Address offset: 1334h

  • Read/write access: R

Tx Current Descriptor Offset (CDO) for 4th priority queue.16 bits

31:12 RSVD 11:0 TXCDO4

Bit

Symbol

Access

INI

Description

31:12

RSVD

R

-

Reserved

11:0

TXCDO4

R

Tx 4st priority Current Descriptor Offset: FDP+CDO = current descriptor pointer. CDO increments by 16 bytes each time.

REG_TXFDP5

  • Size: 32

  • Address offset: 1340h

  • Read/write access: R/W

Tx First Descriptor Pointer (FDP) for 5th priority queue. 32 bits

31:2 TXFDP5 1:0 RSVD

Bit

Symbol

Access

INI

Description

31:2

TXFDP5

R/W

0

Tx 5st priority Descriptor Pointer to the Tx Ring

1:0

RSVD

R

-

Reserved

REG_TXCDO5

  • Size: 32

  • Address offset: 1344h

  • Read/write access: R

Tx Current Descriptor Offset (CDO) for 5th priority queue.16 bits

31:12 RSVD 11:0 TXCDO5

Bit

Symbol

Access

INI

Description

31:12

RSVD

R

-

Reserved

11:0

TXCDO5

R

Tx 5st priority Current Descriptor Offset: FDP+CDO = current descriptor pointer. CDO increments by 16 bytes each time.

REG_RRING_MAP1

  • Size: 32

  • Address offset: 1370h

  • Read/write access: R/W

Rx ring mapping for 1st queue.

31 RSVD 30:28 EXT1_PRI7_ROUTE 27 RSVD 26:24 EXT1_PRI6_ROUTE 23 RSVD 22:20 EXT1_PRI5_ROUTE 19 RSVD 18:16 EXT1_PRI4_ROUTE 15 RSVD 14:12 EXT1_PRI3_ROUTE 11 RSVD 10:8 EXT1_PRI2_ROUTE 7 RSVD 6:4 EXT1_PRI1_ROUTE 3 RSVD 2:0 EXT1_PRI0_ROUTE

Bit

Symbol

Access

INI

Description

31

RSVD

R

-

Reserved

30:28

EXT1_PRI7_ROUTE

R/W

0

Cputag.priority = 7 route select. {0,1,7} ring1, {2} ring2, {3} ring3,…

27

RSVD

R

-

Reserved

26:24

EXT1_PRI6_ROUTE

R/W

0

Cputag.priority = 6 route select. {0,1,7} ring1, {2} ring2, {3} ring3,…

23

RSVD

R

-

Reserved

22:20

EXT1_PRI5_ROUTE

R/W

0

Cputag.priority = 5 route select. {0,1,7} ring1, {2} ring2, {3} ring3,…

19

RSVD

R

-

Reserved

18:16

EXT1_PRI4_ROUTE

R/W

0

Cputag.priority = 4 route select. {0,1,7} ring1, {2} ring2, {3} ring3,…

15

RSVD

R

-

Reserved

14:12

EXT1_PRI3_ROUTE

R/W

0

Cputag.priority = 3 route select. {0,1,7} ring1, {2} ring2, {3} ring3,…

11

RSVD

R

-

Reserved

10:8

EXT1_PRI2_ROUTE

R/W

0

Cputag.priority = 2 route select. {0,1,7} ring1, {2} ring2, {3} ring3,…

7

RSVD

R

-

Reserved

6:4

EXT1_PRI1_ROUTE

R/W

0

Cputag.priority = 1 route select. {0,1,7} ring1, {2} ring2, {3} ring3,…

3

RSVD

R

-

Reserved

2:0

EXT1_PRI0_ROUTE

R/W

0

Cputag.priority = 0 route select. {0,1,7} ring1, {2} ring2, {3} ring3,…

REG_RRING_MAP2

  • Size: 32

  • Address offset: 1374h

  • Read/write access: R/W

Rx ring mapping for 1st queue.

31 RSVD 30:28 EXT2_PRI7_ROUTE 27 RSVD 26:24 EXT2_PRI6_ROUTE 23 RSVD 22:20 EXT2_PRI5_ROUTE 19 RSVD 18:16 EXT2_PRI4_ROUTE 15 RSVD 14:12 EXT2_PRI3_ROUTE 11 RSVD 10:8 EXT2_PRI2_ROUTE 7 RSVD 6:4 EXT2_PRI1_ROUTE 3 RSVD 2:0 EXT2_PRI0_ROUTE

Bit

Symbol

Access

INI

Description

31

RSVD

R

-

Reserved

30:28

EXT2_PRI7_ROUTE

R/W

0

Cputag.priority = 7 route select. {0,1,7} ring1, {2} ring2, {3} ring3,…

27

RSVD

R

-

Reserved

26:24

EXT2_PRI6_ROUTE

R/W

0

Cputag.priority = 6 route select. {0,1,7} ring1, {2} ring2, {3} ring3,…

23

RSVD

R

-

Reserved

22:20

EXT2_PRI5_ROUTE

R/W

0

Cputag.priority = 5 route select. {0,1,7} ring1, {2} ring2, {3} ring3,…

19

RSVD

R

-

Reserved

18:16

EXT2_PRI4_ROUTE

R/W

0

Cputag.priority = 4 route select. {0,1,7} ring1, {2} ring2, {3} ring3,…

15

RSVD

R

-

Reserved

14:12

EXT2_PRI3_ROUTE

R/W

0

Cputag.priority = 3 route select. {0,1,7} ring1, {2} ring2, {3} ring3,…

11

RSVD

R

-

Reserved

10:8

EXT2_PRI2_ROUTE

R/W

0

Cputag.priority = 2 route select. {0,1,7} ring1, {2} ring2, {3} ring3,…

7

RSVD

R

-

Reserved

6:4

EXT2_PRI1_ROUTE

R/W

0

Cputag.priority = 1 route select. {0,1,7} ring1, {2} ring2, {3} ring3,…

3

RSVD

R

-

Reserved

2:0

EXT2_PRI0_ROUTE

R/W

0

Cputag.priority = 0 route select. {0,1,7} ring1, {2} ring2, {3} ring3,…

REG_RRING_MAP3

  • Size: 32

  • Address offset: 1378h

  • Read/write access: R/W

Rx ring mapping for 1st queue.

31 RSVD 30:28 EXT3_PRI7_ROUTE 27 RSVD 26:24 EXT3_PRI6_ROUTE 23 RSVD 22:20 EXT3_PRI5_ROUTE 19 RSVD 18:16 EXT3_PRI4_ROUTE 15 RSVD 14:12 EXT3_PRI3_ROUTE 11 RSVD 10:8 EXT3_PRI2_ROUTE 7 RSVD 6:4 EXT3_PRI1_ROUTE 3 RSVD 2:0 EXT3_PRI0_ROUTE

Bit

Symbol

Access

INI

Description

31

RSVD

R

-

Reserved

30:28

EXT3_PRI7_ROUTE

R/W

0

Cputag.priority = 7 route select. {0,1,7} ring1, {2} ring2, {3} ring3,…

27

RSVD

R

-

Reserved

26:24

EXT3_PRI6_ROUTE

R/W

0

Cputag.priority = 6 route select. {0,1,7} ring1, {2} ring2, {3} ring3,…

23

RSVD

R

-

Reserved

22:20

EXT3_PRI5_ROUTE

R/W

0

Cputag.priority = 5 route select. {0,1,7} ring1, {2} ring2, {3} ring3,…

19

RSVD

R

-

Reserved

18:16

EXT3_PRI4_ROUTE

R/W

0

Cputag.priority = 4 route select. {0,1,7} ring1, {2} ring2, {3} ring3,…

15

RSVD

R

-

Reserved

14:12

EXT3_PRI3_ROUTE

R/W

0

Cputag.priority = 3 route select. {0,1,7} ring1, {2} ring2, {3} ring3,…

11

RSVD

R

-

Reserved

10:8

EXT3_PRI2_ROUTE

R/W

0

Cputag.priority = 2 route select. {0,1,7} ring1, {2} ring2, {3} ring3,…

7

RSVD

R

-

Reserved

6:4

EXT3_PRI1_ROUTE

R/W

0

Cputag.priority = 1 route select. {0,1,7} ring1, {2} ring2, {3} ring3,…

3

RSVD

R

-

Reserved

2:0

EXT3_PRI0_ROUTE

R/W

0

Cputag.priority = 0 route select. {0,1,7} ring1, {2} ring2, {3} ring3,…

REG_RRING_MAP4

  • Size: 32

  • Address offset: 137Ch

  • Read/write access: R/W

Rx ring mapping for 1st queue.

31 RSVD 30:28 EXT4_PRI7_ROUTE 27 RSVD 26:24 EXT4_PRI6_ROUTE 23 RSVD 22:20 EXT4_PRI5_ROUTE 19 RSVD 18:16 EXT4_PRI4_ROUTE 15 RSVD 14:12 EXT4_PRI3_ROUTE 11 RSVD 10:8 EXT4_PRI2_ROUTE 7 RSVD 6:4 EXT4_PRI1_ROUTE 3 RSVD 2:0 EXT4_PRI0_ROUTE

Bit

Symbol

Access

INI

Description

31

RSVD

R

-

Reserved

30:28

EXT4_PRI7_ROUTE

R/W

0

Cputag.priority = 7 route select. {0,1,7} ring1, {2} ring2, {3} ring3,…

27

RSVD

R

-

Reserved

26:24

EXT4_PRI6_ROUTE

R/W

0

Cputag.priority = 6 route select. {0,1,7} ring1, {2} ring2, {3} ring3,…

23

RSVD

R

-

Reserved

22:20

EXT4_PRI5_ROUTE

R/W

0

Cputag.priority = 5 route select. {0,1,7} ring1, {2} ring2, {3} ring3,…

19

RSVD

R

-

Reserved

18:16

EXT4_PRI4_ROUTE

R/W

0

Cputag.priority = 4 route select. {0,1,7} ring1, {2} ring2, {3} ring3,…

15

RSVD

R

-

Reserved

14:12

EXT4_PRI3_ROUTE

R/W

0

Cputag.priority = 3 route select. {0,1,7} ring1, {2} ring2, {3} ring3,…

11

RSVD

R

-

Reserved

10:8

EXT4_PRI2_ROUTE

R/W

0

Cputag.priority = 2 route select. {0,1,7} ring1, {2} ring2, {3} ring3,…

7

RSVD

R

-

Reserved

6:4

EXT4_PRI1_ROUTE

R/W

0

Cputag.priority = 1 route select. {0,1,7} ring1, {2} ring2, {3} ring3,…

3

RSVD

R

-

Reserved

2:0

EXT4_PRI0_ROUTE

R/W

0

Cputag.priority = 0 route select. {0,1,7} ring1, {2} ring2, {3} ring3,…

REG_RRING_MAP5

  • Size: 32

  • Address offset: 1380h

  • Read/write access: R/W

Rx ring mapping for 1st queue.

31 RSVD 30:28 EXT5_PRI7_ROUTE 27 RSVD 26:24 EXT5_PRI6_ROUTE 23 RSVD 22:20 EXT5_PRI5_ROUTE 19 RSVD 18:16 EXT5_PRI4_ROUTE 15 RSVD 14:12 EXT5_PRI3_ROUTE 11 RSVD 10:8 EXT5_PRI2_ROUTE 7 RSVD 6:4 EXT5_PRI1_ROUTE 3 RSVD 2:0 EXT5_PRI0_ROUTE

Bit

Symbol

Access

INI

Description

31

RSVD

R

-

Reserved

30:28

EXT5_PRI7_ROUTE

R/W

0

Cputag.priority = 7 route select. {0,1,7} ring1, {2} ring2, {3} ring3,…

27

RSVD

R

-

Reserved

26:24

EXT5_PRI6_ROUTE

R/W

0

Cputag.priority = 6 route select. {0,1,7} ring1, {2} ring2, {3} ring3,…

23

RSVD

R

-

Reserved

22:20

EXT5_PRI5_ROUTE

R/W

0

Cputag.priority = 5 route select. {0,1,7} ring1, {2} ring2, {3} ring3,…

19

RSVD

R

-

Reserved

18:16

EXT5_PRI4_ROUTE

R/W

0

Cputag.priority = 4 route select. {0,1,7} ring1, {2} ring2, {3} ring3,…

15

RSVD

R

-

Reserved

14:12

EXT5_PRI3_ROUTE

R/W

0

Cputag.priority = 3 route select. {0,1,7} ring1, {2} ring2, {3} ring3,…

11

RSVD

R

-

Reserved

10:8

EXT5_PRI2_ROUTE

R/W

0

Cputag.priority = 2 route select. {0,1,7} ring1, {2} ring2, {3} ring3,…

7

RSVD

R

-

Reserved

6:4

EXT5_PRI1_ROUTE

R/W

0

Cputag.priority = 1 route select. {0,1,7} ring1, {2} ring2, {3} ring3,…

3

RSVD

R

-

Reserved

2:0

EXT5_PRI0_ROUTE

R/W

0

Cputag.priority = 0 route select. {0,1,7} ring1, {2} ring2, {3} ring3,…

REG_RRING_MAP6

  • Size: 32

  • Address offset: 1384h

  • Read/write access: R/W

Rx ring mapping for 1st queue.

31 RSVD 30:28 EXT6_PRI7_ROUTE 27 RSVD 26:24 EXT6_PRI6_ROUTE 23 RSVD 22:20 EXT6_PRI5_ROUTE 19 RSVD 18:16 EXT6_PRI4_ROUTE 15 RSVD 14:12 EXT6_PRI3_ROUTE 11 RSVD 10:8 EXT6_PRI2_ROUTE 7 RSVD 6:4 EXT6_PRI1_ROUTE 3 RSVD 2:0 EXT6_PRI0_ROUTE

Bit

Symbol

Access

INI

Description

31

RSVD

R

-

Reserved

30:28

EXT6_PRI7_ROUTE

R/W

0

Cputag.priority = 7 route select. {0,1,7} ring1, {2} ring2, {3} ring3,…

27

RSVD

R

-

Reserved

26:24

EXT6_PRI6_ROUTE

R/W

0

Cputag.priority = 6 route select. {0,1,7} ring1, {2} ring2, {3} ring3,…

23

RSVD

R

-

Reserved

22:20

EXT6_PRI5_ROUTE

R/W

0

Cputag.priority = 5 route select. {0,1,7} ring1, {2} ring2, {3} ring3,…

19

RSVD

R

-

Reserved

18:16

EXT6_PRI4_ROUTE

R/W

0

Cputag.priority = 4 route select. {0,1,7} ring1, {2} ring2, {3} ring3,…

15

RSVD

R

-

Reserved

14:12

EXT6_PRI3_ROUTE

R/W

0

Cputag.priority = 3 route select. {0,1,7} ring1, {2} ring2, {3} ring3,…

11

RSVD

R

-

Reserved

10:8

EXT6_PRI2_ROUTE

R/W

0

Cputag.priority = 2 route select. {0,1,7} ring1, {2} ring2, {3} ring3,…

7

RSVD

R

-

Reserved

6:4

EXT6_PRI1_ROUTE

R/W

0

Cputag.priority = 1 route select. {0,1,7} ring1, {2} ring2, {3} ring3,…

3

RSVD

R

-

Reserved

2:0

EXT6_PRI0_ROUTE

R/W

0

Cputag.priority = 0 route select. {0,1,7} ring1, {2} ring2, {3} ring3,…

REG_RXFDP2

  • Size: 32

  • Address offset: 1390h

  • Read/write access: R/W

Rx First Descriptor Pointer (FDP) for 2nd priority queue. 32 bits

31:2 RXFDP2 1:0 RSVD

Bit

Symbol

Access

INI

Description

31:2

RXFDP2

R/W

0

Rx queue Descriptor Pointer to the Rx Ring

1:0

RSVD

R

-

Reserved

REG_RXRINGSIZE2

  • Size: 16

  • Address offset: 1394h

  • Read/write access: R/W

Rx Ring Size2 (number of Descriptors)

15:12 RSVD 11:0 RXRINGSIZE2

Bit

Symbol

Access

INI

Description

15:12

RSVD

R

-

Reserved

11:0

RXRINGSIZE2

R/W

0

The total number of descriptors in the Rx descriptor rings of queue.

Act as bit mask, eg. RxRingSize [11:0]:

0000_0000_1111: 16 descriptors

0000_0001_1111: 32 descriptors

0000_0011_1111: 64 descriptors

0000_0111_1111: 128 descriptors

0000_1111_1111: 256 descriptors

0001_1111_1111: 512 descriptors

0011_1111_1111: 1024 descriptors

0111_1111_1111: 2048 descriptors

1111_1111_1111: 4096 descriptors

Any other value in this register yields undefined results.

REG_RXCDO2

  • Size: 16

  • Address offset: 1396h

  • Read/write access: R

Rx Current Descriptor Offset (CDO) for 2nd priority queue. 16 bits

15:12 RSVD 11:0 RXCDO2

Bit

Symbol

Access

INI

Description

15:12

RSVD

R

-

Reserved

11:0

RXCDO2

R

0

Rx Current Descriptor Offset of queue: RxFDP+RxCDO = current descriptor pointer. CDO increments by 16 each time (each increment is one byte)

REG_RX_CPU_DESN2

  • Size: 32

  • Address offset: 1398h

  • Read/write access: R/W

This is the descriptor which the CPU has finished processing for 2nd priority queue and returned to

IO. CPU needs to update this.

31:12 RSVD 11:0 ETHRNTRXCPU_DES_NUM2

Bit

Symbol

Access

INI

Description

31:12

RSVD

R

-

Reserved

11:0

ETHRNTRXCPU_DES_NUM2

R/W

0

Indicate the number of descriptor of queue, which has been finished Rx process and returned to IO by CPU. After ending Rx process, CPU needs to update this field.

REG_RX_DES_THRES2

  • Size: 32

  • Address offset: 139Ch

  • Read/write access: R/W

This is the descriptor which the Ethernet module has filled up to for 2st priority queue. Compare

with CPU_Des_Num to determine whether to assert flow control.

31:28 RSVD 27:16 RX_PSE_DES_THRES_ON2 15:12 RSVD 11:0 RX_PSE_DES_THRES_OFF2

Bit

Symbol

Access

INI

Description

31:28

RSVD

R

-

Reserved

27:16

RX_PSE_DES_THRES_ON2

R/W

0

Specifies the difference between EthrnetRxCPU_Des_Num2 and the descriptor of queue currently in use by Ethernet Module in which flow control will be assert.

15:12

RSVD

R

-

Reserved

11:0

RX_PSE_DES_THRES_OFF2

R/W

0

Specifies the difference between EthrnetRxCPU_Des_Num2 and the descriptor of queue currently in use by Ethernet Module in which flow control will be de-assert. Rx_Pse_Des_Thress_off_ should be less than (EthrntRxCPU_DES_NUM_ - X). X is the maximum rx descriptors will be used for single ingress packet.

REG_RXFDP3

  • Size: 32

  • Address offset: 13A0h

  • Read/write access: R/W

Rx First Descriptor Pointer (FDP) for 2nd priority queue. 32 bits

31:2 RXFDP3 1:0 RSVD

Bit

Symbol

Access

INI

Description

31:2

RXFDP3

R/W

0

Rx queue Descriptor Pointer to the Rx Ring

1:0

RSVD

R

-

Reserved

REG_RXRINGSIZE3

  • Size: 16

  • Address offset: 13A4h

  • Read/write access: R/W

Rx Ring Size2 (number of Descriptors)

15:12 RSVD 11:0 RXRINGSIZE3

Bit

Symbol

Access

INI

Description

15:12

RSVD

R

-

Reserved

11:0

RXRINGSIZE3

R/W

0

The total number of descriptors in the Rx descriptor rings of queue.

Act as bit mask, eg. RxRingSize [11:0]:

0000_0000_1111: 16 descriptors

0000_0001_1111: 32 descriptors

0000_0011_1111: 64 descriptors

0000_0111_1111: 128 descriptors

0000_1111_1111: 256 descriptors

0001_1111_1111: 512 descriptors

0011_1111_1111: 1024 descriptors

0111_1111_1111: 2048 descriptors

1111_1111_1111: 4096 descriptors

Any other value in this register yields undefined results.

REG_RXCDO3

  • Size: 16

  • Address offset: 13A6h

  • Read/write access: R

Rx Current Descriptor Offset (CDO) for 2nd priority queue. 16 bits

15:12 RSVD 11:0 RXCDO3

Bit

Symbol

Access

INI

Description

15:12

RSVD

R

-

Reserved

11:0

RXCDO3

R

0

Rx Current Descriptor Offset of queue: RxFDP+RxCDO = current descriptor pointer. CDO increments by 16 each time (each increment is one byte)

REG_RX_CPU_DESN3

  • Size: 32

  • Address offset: 13A8h

  • Read/write access: R/W

This is the descriptor which the CPU has finished processing for 2nd priority queue and returned to

IO. CPU needs to update this.

31:12 RSVD 11:0 ETHRNTRXCPU_DES_NUM3

Bit

Symbol

Access

INI

Description

31:12

RSVD

R

-

Reserved

11:0

ETHRNTRXCPU_DES_NUM3

R/W

0

Indicate the number of descriptor of queue, which has been finished Rx process and returned to IO by CPU. After ending Rx process, CPU needs to update this field.

REG_RX_DES_THRES3

  • Size: 32

  • Address offset: 13ACh

  • Read/write access: R/W

This is the descriptor which the Ethernet module has filled up to for 2st priority queue. Compare

with CPU_Des_Num to determine whether to assert flow control.

31:28 RSVD 27:16 RX_PSE_DES_THRES_ON3 15:12 RSVD 11:0 RX_PSE_DES_THRES_OFF3

Bit

Symbol

Access

INI

Description

31:28

RSVD

R

-

Reserved

27:16

RX_PSE_DES_THRES_ON3

R/W

0

Specifies the difference between EthrnetRxCPU_Des_Num2 and the descriptor of queue currently in use by Ethernet Module in which flow control will be assert.

15:12

RSVD

R

-

Reserved

11:0

RX_PSE_DES_THRES_OFF3

R/W

0

Specifies the difference between EthrnetRxCPU_Des_Num2 and the descriptor of queue currently in use by Ethernet Module in which flow control will be de-assert. Rx_Pse_Des_Thress_off_ should be less than (EthrntRxCPU_DES_NUM_ - X). X is the maximum rx descriptors will be used for single ingress packet.

REG_RXFDP4

  • Size: 32

  • Address offset: 13B0h

  • Read/write access: R/W

Rx First Descriptor Pointer (FDP) for 2nd priority queue. 32 bits

31:2 RXFDP4 1:0 RSVD

Bit

Symbol

Access

INI

Description

31:2

RXFDP4

R/W

0

Rx queue Descriptor Pointer to the Rx Ring

1:0

RSVD

R

-

Reserved

REG_RXRINGSIZE4

  • Size: 16

  • Address offset: 13B4h

  • Read/write access: R/W

Rx Ring Size2 (number of Descriptors)

15:12 RSVD 11:0 RXRINGSIZE4

Bit

Symbol

Access

INI

Description

15:12

RSVD

R

-

Reserved

11:0

RXRINGSIZE4

R/W

0

The total number of descriptors in the Rx descriptor rings of queue.

Act as bit mask, eg. RxRingSize [11:0]:

0000_0000_1111: 16 descriptors

0000_0001_1111: 32 descriptors

0000_0011_1111: 64 descriptors

0000_0111_1111: 128 descriptors

0000_1111_1111: 256 descriptors

0001_1111_1111: 512 descriptors

0011_1111_1111: 1024 descriptors

0111_1111_1111: 2048 descriptors

1111_1111_1111: 4096 descriptors

Any other value in this register yields undefined results.

REG_RXCDO4

  • Size: 16

  • Address offset: 13B6h

  • Read/write access: R

Rx Current Descriptor Offset (CDO) for 2nd priority queue. 16 bits

15:12 RSVD 11:0 RXCDO4

Bit

Symbol

Access

INI

Description

15:12

RSVD

R

-

Reserved

11:0

RXCDO4

R

0

Rx Current Descriptor Offset of queue: RxFDP+RxCDO = current descriptor pointer. CDO increments by 16 each time (each increment is one byte)

REG_RX_CPU_DESN4

  • Size: 32

  • Address offset: 13B8h

  • Read/write access: R/W

This is the descriptor which the CPU has finished processing for 2nd priority queue and returned to

IO. CPU needs to update this.

31:12 RSVD 11:0 ETHRNTRXCPU_DES_NUM4

Bit

Symbol

Access

INI

Description

31:12

RSVD

R

-

Reserved

11:0

ETHRNTRXCPU_DES_NUM4

R/W

0

Indicate the number of descriptor of queue, which has been finished Rx process and returned to IO by CPU. After ending Rx process, CPU needs to update this field.

REG_RX_DES_THRES4

  • Size: 32

  • Address offset: 13BCh

  • Read/write access: R/W

This is the descriptor which the Ethernet module has filled up to for 2st priority queue. Compare

with CPU_Des_Num to determine whether to assert flow control.

31:28 RSVD 27:16 RX_PSE_DES_THRES_ON4 15:12 RSVD 11:0 RX_PSE_DES_THRES_OFF4

Bit

Symbol

Access

INI

Description

31:28

RSVD

R

-

Reserved

27:16

RX_PSE_DES_THRES_ON4

R/W

0

Specifies the difference between EthrnetRxCPU_Des_Num2 and the descriptor of queue currently in use by Ethernet Module in which flow control will be assert.

15:12

RSVD

R

-

Reserved

11:0

RX_PSE_DES_THRES_OFF4

R/W

0

Specifies the difference between EthrnetRxCPU_Des_Num2 and the descriptor of queue currently in use by Ethernet Module in which flow control will be de-assert. Rx_Pse_Des_Thress_off_ should be less than (EthrntRxCPU_DES_NUM_ - X). X is the maximum rx descriptors will be used for single ingress packet.

REG_RXFDP5

  • Size: 32

  • Address offset: 13C0h

  • Read/write access: R/W

Rx First Descriptor Pointer (FDP) for 2nd priority queue. 32 bits

31:2 RXFDP5 1:0 RSVD

Bit

Symbol

Access

INI

Description

31:2

RXFDP5

R/W

0

Rx queue Descriptor Pointer to the Rx Ring

1:0

RSVD

R

-

Reserved

REG_RXRINGSIZE5

  • Size: 16

  • Address offset: 13C4h

  • Read/write access: R/W

Rx Ring Size2 (number of Descriptors)

15:12 RSVD 11:0 RXRINGSIZE5

Bit

Symbol

Access

INI

Description

15:12

RSVD

R

-

Reserved

11:0

RXRINGSIZE5

R/W

0

The total number of descriptors in the Rx descriptor rings of queue.

Act as bit mask, eg. RxRingSize [11:0]:

0000_0000_1111: 16 descriptors

0000_0001_1111: 32 descriptors

0000_0011_1111: 64 descriptors

0000_0111_1111: 128 descriptors

0000_1111_1111: 256 descriptors

0001_1111_1111: 512 descriptors

0011_1111_1111: 1024 descriptors

0111_1111_1111: 2048 descriptors

1111_1111_1111: 4096 descriptors

Any other value in this register yields undefined results.

REG_RXCDO5

  • Size: 16

  • Address offset: 13C6h

  • Read/write access: R

Rx Current Descriptor Offset (CDO) for 2nd priority queue. 16 bits

15:12 RSVD 11:0 RXCDO5

Bit

Symbol

Access

INI

Description

15:12

RSVD

R

-

Reserved

11:0

RXCDO5

R

0

Rx Current Descriptor Offset of queue: RxFDP+RxCDO = current descriptor pointer. CDO increments by 16 each time (each increment is one byte)

REG_RX_CPU_DESN5

  • Size: 32

  • Address offset: 13C8h

  • Read/write access: R/W

This is the descriptor which the CPU has finished processing for 2nd priority queue and returned to

IO. CPU needs to update this.

31:12 RSVD 11:0 ETHRNTRXCPU_DES_NUM5

Bit

Symbol

Access

INI

Description

31:12

RSVD

R

-

Reserved

11:0

ETHRNTRXCPU_DES_NUM5

R/W

0

Indicate the number of descriptor of queue, which has been finished Rx process and returned to IO by CPU. After ending Rx process, CPU needs to update this field.

REG_RX_DES_THRES5

  • Size: 32

  • Address offset: 13CCh

  • Read/write access: R/W

This is the descriptor which the Ethernet module has filled up to for 2st priority queue. Compare

with CPU_Des_Num to determine whether to assert flow control.

31:28 RSVD 27:16 RX_PSE_DES_THRES_ON5 15:12 RSVD 11:0 RX_PSE_DES_THRES_OFF5

Bit

Symbol

Access

INI

Description

31:28

RSVD

R

-

Reserved

27:16

RX_PSE_DES_THRES_ON5

R/W

0

Specifies the difference between EthrnetRxCPU_Des_Num2 and the descriptor of queue currently in use by Ethernet Module in which flow control will be assert.

15:12

RSVD

R

-

Reserved

11:0

RX_PSE_DES_THRES_OFF5

R/W

0

Specifies the difference between EthrnetRxCPU_Des_Num2 and the descriptor of queue currently in use by Ethernet Module in which flow control will be de-assert. Rx_Pse_Des_Thress_off_ should be less than (EthrntRxCPU_DES_NUM_ - X). X is the maximum rx descriptors will be used for single ingress packet.

REG_RXFDP6

  • Size: 32

  • Address offset: 13D0h

  • Read/write access: R/W

Rx First Descriptor Pointer (FDP) for 2nd priority queue. 32 bits

31:2 RXFDP6 1:0 RSVD

Bit

Symbol

Access

INI

Description

31:2

RXFDP6

R/W

0

Rx queue Descriptor Pointer to the Rx Ring

1:0

RSVD

R

-

Reserved

REG_RXRINGSIZE6

  • Size: 16

  • Address offset: 13D4h

  • Read/write access: R/W

Rx Ring Size2 (number of Descriptors)

15:12 RSVD 11:0 RXRINGSIZE6

Bit

Symbol

Access

INI

Description

15:12

RSVD

R

-

Reserved

11:0

RXRINGSIZE6

R/W

0

The total number of descriptors in the Rx descriptor rings of queue.

Act as bit mask, eg. RxRingSize [11:0]:

0000_0000_1111: 16 descriptors

0000_0001_1111: 32 descriptors

0000_0011_1111: 64 descriptors

0000_0111_1111: 128 descriptors

0000_1111_1111: 256 descriptors

0001_1111_1111: 512 descriptors

0011_1111_1111: 1024 descriptors

0111_1111_1111: 2048 descriptors

1111_1111_1111: 4096 descriptors

Any other value in this register yields undefined results.

REG_RXCDO6

  • Size: 16

  • Address offset: 13D6h

  • Read/write access: R

Rx Current Descriptor Offset (CDO) for 2nd priority queue. 16 bits

15:12 RSVD 11:0 RXCDO6

Bit

Symbol

Access

INI

Description

15:12

RSVD

R

-

Reserved

11:0

RXCDO6

R

0

Rx Current Descriptor Offset of queue: RxFDP+RxCDO = current descriptor pointer. CDO increments by 16 each time (each increment is one byte)

REG_RX_CPU_DESN6

  • Size: 32

  • Address offset: 13D8h

  • Read/write access: R/W

This is the descriptor which the CPU has finished processing for 2nd priority queue and returned to

IO. CPU needs to update this.

31:12 RSVD 11:0 ETHRNTRXCPU_DES_NUM6

Bit

Symbol

Access

INI

Description

31:12

RSVD

R

-

Reserved

11:0

ETHRNTRXCPU_DES_NUM6

R/W

0

Indicate the number of descriptor of queue, which has been finished Rx process and returned to IO by CPU. After ending Rx process, CPU needs to update this field.

REG_RX_DES_THRES6

  • Size: 32

  • Address offset: 13DCh

  • Read/write access: R/W

This is the descriptor which the Ethernet module has filled up to for 2st priority queue. Compare

with CPU_Des_Num to determine whether to assert flow control.

31:28 RSVD 27:16 RX_PSE_DES_THRES_ON6 15:12 RSVD 11:0 RX_PSE_DES_THRES_OFF6

Bit

Symbol

Access

INI

Description

31:28

RSVD

R

-

Reserved

27:16

RX_PSE_DES_THRES_ON6

R/W

0

Specifies the difference between EthrnetRxCPU_Des_Num2 and the descriptor of queue currently in use by Ethernet Module in which flow control will be assert.

15:12

RSVD

R

-

Reserved

11:0

RX_PSE_DES_THRES_OFF6

R/W

0

Specifies the difference between EthrnetRxCPU_Des_Num2 and the descriptor of queue currently in use by Ethernet Module in which flow control will be de-assert. Rx_Pse_Des_Thress_off_ should be less than (EthrntRxCPU_DES_NUM_ - X). X is the maximum rx descriptors will be used for single ingress packet.

REG_RX_FDP1

  • Size: 32

  • Address offset: 13F0h

  • Read/write access: R/W

Rx First Descriptor Pointer (FDP) for 1th priority queue. 32 bits

31:2 RXFDP1 1:0 RSVD

Bit

Symbol

Access

INI

Description

31:2

RXFDP1

R/W

0

Rx 1st queue Descriptor Pointer to the Rx Ring

1:0

RSVD

R

-

Reserved

REG_RX_RINGSIZE1

  • Size: 16

  • Address offset: 13F4h

  • Read/write access: R/W

Rx Ring Size1 (number of Descriptors)

15:8 RXRINGSIZE_1_LOW 7:4 RSVD 3:0 RXRINGSIZE_1_HIGH

Bit

Symbol

Access

INI

Description

15:8

RXRINGSIZE_1_LOW

R/W

0

This is the total number of descriptors in the Rx descriptor rings of 1st queue.

Act as bit mask, eg. RxRingSize [11:0]:

0000_0000_1111: 16 descriptors

0000_0001_1111: 32 descriptors

0000_0011_1111: 64 descriptors

0000_0111_1111: 128 descriptors

0000_1111_1111: 256 descriptors

0001_1111_1111: 512 descriptors

0011_1111_1111: 1024 descriptors

0111_1111_1111: 2048 descriptors

1111_1111_1111: 4096 descriptors

Any other value in this register yields undefined results.

7:4

RSVD

R

-

Reserved

3:0

RXRINGSIZE_1_HIGH

R/W

0

This is the bits11-8 of RxRingSize1.

REG_RX_CDO1

  • Size: 16

  • Address offset: 13F6h

  • Read/write access: R

Rx Current Descriptor Offset (CDO) for 1th priority queue. 16 bits

15:12 RSVD 11:0 RXCDO1

Bit

Symbol

Access

INI

Description

15:12

RSVD

R

-

Reserved

11:0

RXCDO1

R

0

Rx Current Descriptor Offset of 1st queue: RxFDP+RxCDO = current descriptor pointer. CDO increments by 16 each time (each increment is one byte).

REG_SMSA

  • Size: 32

  • Address offset: 13FCh

  • Read/write access: R/W

Sram mapping start address

31:0 SMSA

Bit

Symbol

Access

INI

Description

31:0

SMSA

R/W

0

SRAM mapping start address for header mapping to sram

REG_PROBE_SELEXCT

  • Size: 32

  • Address offset: 1400h

  • Read/write access: R/W

Probe signal select

31:4 RSVD 3:0 PROBE_SIGNAL_SELECT

Bit

Symbol

Access

INI

Description

31:4

RSVD

R

-

Reserved

3:0

PROBE_SIGNAL_SELECT

R/W

0x0

For debug port signals use Value = 4: Tx/Rx related signals

REG_DIAG1

  • Size: 32

  • Address offset: 1404h

  • Read/write access: R

For debug./

31:6 RSVD 5:3 RXMRING_STATE 2:0 LSO_STATS

Bit

Symbol

Access

INI

Description

31:6

RSVD

R

-

Reserved

5:3

RXMRING_STATE

R

2:0

LSO_STATS

R

Reserved(3bits)

REG_CONFIG_CLK_AND_RX_PSE_DES_THRES_H

  • Size: 32

  • Address offset: 142Ch

  • Read/write access: R/W

Bit[3:0] is the Rx_Pse_Des_Thres_off[11:8]. Bit [21:16] set txc delay and rxc delay sel.

31:28 RSVD 27:24 RX_PSE_DES_THRES_OFF_1 23:6 RSVD 5 SET_D_TXC 4:0 RXC_DLY_SEL

Bit

Symbol

Access

INI

Description

31:28

RSVD

R

-

Reserved

27:24

RX_PSE_DES_THRES_OFF_1

R/W

0

This is the Rx_Pse_Des_Thres_off1[11:8].

23:6

RSVD

R

-

Reserved

5

SET_D_TXC

R/W

0

Add delay to gmii_txc_out. Used in clk.

Rgmii_1000: add 2nS delay.

Rgmii_100: add 4nS delay.

Rgmii_10: add 4nS delay.

4:0

RXC_DLY_SEL

R/W

0

32-tap delay chain for rxc. This field is valid when CONFIG_CLK_REG.dis_dly_mode is 0.

REG_ETHRNTRXCPU_DES_NUM1

  • Size: 32

  • Address offset: 1430h

  • Read/write access: R/W

This is the descriptor which the CPU has finished processing and returned to IO for 1st priority

queue. CPU needs to update this.

31:24 ETHRNTRXCPU_DES_NUM_1_7_0 23:16 RX_PSE_DES_THRES_ON_1_7_0 15:8 RX_PSE_DES_THRES_OFF_1_7_0 7:4 ETHRNTRXCPU_DES_NUM_1_11_8 3:0 RX_PSE_DES_THRES_ON_1_11_8

Bit

Symbol

Access

INI

Description

31:24

ETHRNTRXCPU_DES_NUM_1_7_0

R/W

0

Indicate the number of descriptor of 1st queue, which has been finished Rx process and returned to IO by CPU. After ending Rx process, CPU needs to update this field.

23:16

RX_PSE_DES_THRES_ON_1_7_0

R/W

0

Specifies the difference between EthrnetRxCPU_Des_Num1 and the descriptor of 1st queue currently in use by Ethernet Module in which flow control will be assert.

15:8

RX_PSE_DES_THRES_OFF_1_7_0

R/W

0

Specifies the difference between EthrnetRxCPU_Des_Num1 and the descriptor of 1st queue currently in use by Ethernet Module in which flow control will be de-assert. Rx_Pse_Des_Thress_off_1 should be less than (EthrntRxCPU_DES_NUM_1 - X). X is the maximum rx descriptors will be used for single ingress packet.

7:4

ETHRNTRXCPU_DES_NUM_1_11_8

R/W

0

This is the EthrntRxCPU_Des_Num1[11:8].

3:0

RX_PSE_DES_THRES_ON_1_11_8

R/W

0

This is the Rx_Pse_Des_Thres_on1[11:8].

REG_ETHER_IO_CMD

  • Size: 32

  • Address offset: 1434h

  • Read/write access: R/W

ETHER_IO_CMD

31 MAX_DMA_SEL_0 30 SHORTDESFORMAT 29 MAX_DMA_SEL_1 28 EN_EARLY_TX 27:24 TXPKTTIMER 23 TXINTMITIGATION_3 22 RXPKTTIMER_3 21 RXINTMITIGATION_3 20:19 TSH 18:16 TXINTMITIGATION_2_0 15:13 RXPKTTIMER_2_0 12:11 RXFTH 10:8 RXINTMITIGATION_2_0 7:6 REG_INT_TIMER_SEL 5 RE 4 TE 3 TXFN4TH 2 TXFN3RD 1 TXFN2ND 0 TXFN1ST

Bit

Symbol

Access

INI

Description

31

MAX_DMA_SEL_0

R/W

0

Select the dma burst size on bus(memory controller should assert continuous btrdy).

  • 00:16 DW(1DW=4B)

  • 01:32 DW 10:64 DW 11:128DW.

AmebaI/AmebaPro/AmebaPro2 only support DMA burst length = 16DW

30

SHORTDESFORMAT

R/W

0

Short descriptor format. Set 1 tx/rx descriptor will use old format - 4x32bit each item, set 0 use new format to support sram mapping AmebaI/AmebaPro/AmebaPro2 only support old format (1b'1)

29

MAX_DMA_SEL_1

R/W

0

See Ethernet_IO_CMD.bit31 AmebaI/AmebaPro/AmebaPro2 only support DMA burst length = 16DW

28

EN_EARLY_TX

R/W

0

Default 0,

  • 0: disable,

  • 1: enable.

Disable early tx by GAMC while tx command descriptor.IPCS, UDPCS or TCPCS are set to high. For multiple tx descriptor application, this field should be 0. For low lxbus throughput environment, this field should be 0. For slow clk_gmac application, this field should be 0.

27:24

TXPKTTIMER

R/W

0x0

Timer to trigger TxOK interrupt before receipt of TxIntMitigation pkts. 0000 – no timer set 0001 ~ 1111 : the timer interval defining a multiple of TU ex: 0011 = timer interval set to 3 x4 =12TU Once TxOK is asserted the timer mechanism is reinitialized.

23

TXINTMITIGATION_3

R/W

0

See Ethernet_IO_CMD.bit18-16

22

RXPKTTIMER_3

R/W

0

See Ethernet_IO_CMD.bit15-13

21

RXINTMITIGATION_3

R/W

0

See Ethernet_IO_CMD.bit10-8

20:19

TSH

R/W

0x0

Tx Threshold: Specifies the threshold level in the Tx FIFO to begin the transmission. When the byte count of the data in the Tx FIFO reaches this level, (or the FIFO contains at least one complete packet or the end of a packet) the Ethernet module will transmit this packet.

  • 00:128B.

  • 01:256B.

  • 10:512B.

  • 11:1024B.

For poor lxbus bandwidth, tsh should be set b11.

In rle0516, this field should be setted 0 or 1 (128B).

18:16

TXINTMITIGATION_2_0

R/W

0x0

This sets the number of packets received before TxOK interrupt is triggered.

0000- 1 pkt

0001- 4 pkts

0010- 8 pkts

0011- 12 pkts

0100- 16 pkts

0101- 20 pkts

0110- 24 pkts

0111- 28 pkts ...

15:13

RXPKTTIMER_2_0

R/W

0x0

Timer to trigger RxOK interrupt before receipt of RxIntMitigation pkts.

0000 – no timer set

0001 ~ 1111 : the timer interval defining a multiple of TU ex: 011 = timer interval set to 3 x4 =12TU This only applies to packets of size larger than 128 bytes.

Once RxOK is asserted the timer mechanism is reinitialized. For ingress pkt which is short than 128B, RxOK interrupt asserts after DMA completes.

12:11

RXFTH

R/W

0x0

Rx Threshold: Specifies the threshold level in the Rx FIFO to begin the transmission. When the byte count of the data in the Rx FIFO reaches this level, (or the FIFO contains at least one complete packet or the end of a packet) the Ethernet module will transmit this packet.

  • 00: 1024B

  • 01: 128B

  • 10: 256B

  • 11: 512B

The rx threshold should be larger than maximum dma burst size. The combination of max_dma_sel and rxfth are listed as followed:

Max_dma_sel rxfth

B00(64B) b00(1024B), b01 (128B), b10(256B), b11(512B).

B01(128B) b00(1024B), b10(256B), b11(512B).

B10(256B) b00(1024B), b11(512B),

In rle0516: SW should not set rxfth to 0b00 due to the rx fifo size is only 512B. The recommend value of rle0516 is 0b11 for performance concerns. 00 = no rx threshold. The Ethernet Module begins the transfer of data after having received a whole packet in the FIFO.

01 = 32 bytes

10 = 64 bytes

11 = 128 bytes

Max_dma_sel rxfth

B0(64B) b10(64B), b11(128B).

B1(128B) b11(128B).

10:8

RXINTMITIGATION_2_0

R/W

0x0

This sets the number of packets received before RxOK interrupt is triggered.

0000- 1 pkt

0001- 4 pkts

0010- 8 pkts

0011- 12pkts

0100- 16 pkts

0101- 20 pkts

0110- 24 pkts

0111- 28 pkts ...

7:6

REG_INT_TIMER_SEL

R/W

0x0

RXPktTimer, TXPktTimer Unit. (TU)

Speed TU

  • 00: 10M 25.6uS

  • 00: 100M 2.56uS

  • 00: 1000M 256nS

  • 01: 10M 102.4uS

  • 01: 100M 10.24uS

  • 01: 1000M 1.024uS

  • 10: 10M 409.6uS

  • 10: 100M 40.96uS

  • 10: 1000M 4.096uS

  • 11: 10M 1.6mS

  • 11: 100M 0.16mS

  • 11: 1000M 16uS

5

RE

R/W

0

MII Rx Enable

4

TE

R/W

0

MII Tx Enable

3

TXFN4TH

R/W

0

4th Priority DMA-Ethernet Transmit enable. 1: Enable. 0: Disable.

2

TXFN3RD

R/W

0

3rd Priority DMA-Ethernet Transmit enable. 1: Enable. 0: Disable.

1

TXFN2ND

R/W

0

2nd Priority DMA-Ethernet Transmit enable. 1: Enable. 0: Disable.

0

TXFN1ST

R/W

0

1st Priority DMA-Ethernet Transmit enable. 1: Enable. 0: Disable.

REG_IO_CMD1

  • Size: 32

  • Address offset: 1438h

  • Read/write access: R/W

ETHER_IO_CMD1

31 CF_ORGCOL_SEL 30:28 DSC_FORMAT_EXTRA 27 EN_PRECISE_DMA 26 RXOKINT_MSK_128B 25 EN_RX_MRING 24 EN_4GB 23:22 RSVD 21 RXRING6 20 RXRING5 19 RXRING4 18 RXRING3 17 RXRING2 16 RXRING1 15:14 TX_HL_PRI_SEL 13:9 RSVD 8 TXFN5TH 7:5 RSVD 4 TXQ5_H 3 TXQ4_H 2 TXQ3_H 1 TXQ2_H 0 TXQ1_H

Bit

Symbol

Access

INI

Description

31

CF_ORGCOL_SEL

R/W

1

  • 0: using GMAC internal generated collision signal

  • 1: using MII interface collision signal( (default 1: AmebaPro2)

30:28

DSC_FORMAT_EXTRA

R/W

3'b011

Extra descriptor format. In rle0437, bit28 is is write only. SW should set this field before set IO_CMD.TE or RE to 1. AmebaI/AmebaPro/AmebaPro

2 only support the fixed value 3b'011

27

EN_PRECISE_DMA

R/W

0

  • 0: disable precise DMA transfer.

  • 1: enable precise DMA transfer.

AmebaI/AmebaPro/AmebaPro2 only support 1b'0 (disable precise DMA transfer)

26

RXOKINT_MSK_128B

R/W

1

  • 1: For ingress pkt which is short than 128B, RxOK interrupt asserts after DMA completes (compatible issue). 0: For ingress pkt which is short than 128B, RxOK interrupt does not assert after DMA completes.

25

EN_RX_MRING

R/W

0

Enable rx multiple rings.

  • 1: rx using multiple rings. max: 6rings (ring1 to ring6).

0 rx using single ring (ring1 only).

SW should set this field before set IO_CMD.TE or RE to 1 AmebaI/AmebaPro/AmebaPro2 only support single rx ring

24

EN_4GB

R/W

1

  • 1: support 4GB addressing in lx master bus. For gmac used in rl0371 and after.

  • 0: no support. For project used in rle0390 and before.

SW should set this field before set IO_CMD.TE or RE to 1 AmebaPro2 support 4GB addressing AmebaI/AmebaPro only support 1GB addressing

23:22

RSVD

R

-

Reserved

21

RXRING6

R/W

0

Ethernet-DMA Receive Ring6 enable.

  • 1: Enable.

  • 0: Disable.

If RXRING6 is not used, SW should put one dummy rx command descriptor (own = 0) at RXFDP6_reg.

20

RXRING5

R/W

0

Ethernet-DMA Receive Ring5 enable.

  • 1: Enable.

  • 0: Disable.

If RXRING5 is not used, SW should put one dummy rx command descriptor (own = 0) at RXFDP5_reg.

19

RXRING4

R/W

0

Ethernet-DMA Receive Ring4 enable.

  • 1: Enable.

  • 0: Disable.

If RXRING4 is not used, SW should put one dummy rx command descriptor (own = 0) at RXFDP4_reg.

18

RXRING3

R/W

0

Ethernet-DMA Receive Ring3 enable.

  • 1: Enable.

  • 0: Disable.

If RXRING3 is not used, SW should put one dummy rx command descriptor (own = 0) at RXFDP3_reg.

17

RXRING2

R/W

0

Ethernet-DMA Receive Ring2 enable.

  • 1: Enable.

  • 0: Disable.

If RXRING2 is not used, SW should put one dummy rx command descriptor (own = 0) at RXFDP2_reg.

16

RXRING1

R/W

0

Ethernet-DMA Receive Ring1 enable.

  • 1: Enable.

  • 0: Disable.

If RXRING1 is not used, SW should put one dummy rx command descriptor (own = 0) at RXFDP1_reg.

15:14

TX_HL_PRI_SEL

R/W

0

  • b00: TX ring uses strict priority.

  • b01: TX ring uses high and low queue priority.

Inside high queue, tx ring is round robin.

Inside low queue, tx ring is round robin.

Strict priority is used for high and low queue selection. b10 and b11: reserved. In RL6266, when tx_hl_pri is 1, txq1_h and txq2_h are 1 and txq3_h, txq4_h and txq5_h are 0.

SW should set this field before set IO_CMD.TE to 1.

AmebaI/AmebaPro/AmebaPro2 only support the fixed value 2b'00

13:9

RSVD

R

-

Reserved

8

TXFN5TH

R/W

0

5th Priority DMA-Ethernet Transmit enable.

  • 1: Enable.

  • 0: Disable.

After IO_CMD.TE is set high, TxFN5th is writable.

7:5

RSVD

R

-

Reserved

4

TXQ5_H

R/W

0

  • 1: TxFN5th is a high queue.

  • 0: TxFN5th is a low queue.

This field is only used in eee.

3

TXQ4_H

R/W

0

  • 1: TxFN4th is a high queue.

  • 0: TxFN4th is a low queue.

This field is only used in eee.

2

TXQ3_H

R/W

0

  • 1: TxFN3rd is a high queue.

  • 0: TxFN3rd is a low queue.

This field is only used in eee.

1

TXQ2_H

R/W

0

  • 1: TxFN2nd is a high queue.

  • 0: TxFN2nd is a low queue.

This field is only used in eee.

0

TXQ1_H

R/W

0

  • 1: TxFN1st is a high queue.

  • 0: TxFN1st is a low queue.

This field is only used in eee.

REG_WOL

  • Size: 32

  • Address offset: 143Ch

  • Read/write access: R/W

WOL_REG

31:4 RSVD 3 WOL_IMR 2 WOL_PME 1 WOL_STS 0 WOL_CMD

Bit

Symbol

Access

INI

Description

31:4

RSVD

R

-

Reserved

3

WOL_IMR

R/W

0

Interrupt mask of wol_pme.

2

WOL_PME

R

0

HW asserts pme when

A.HW entered wol idle state and

B.received magic ingress pkt.

HW asserts pme to wake up system.

Wol_pme indicates:

  • 0: No magic pkt receives.

  • 1: HW had received one magic pkt and system should wake up.

1

WOL_STS

R

0

HW enters wol idle state when

  1. SW issues wol_cmd state and

  2. HW tx/rx function enter idle state.

Wol_sts indicates:

  • 0: HW is not in wol idle state.

  • 1: HW is in wol idle state.

0

WOL_CMD

R/W

0

Issue wol command by SW