Part Number:MCU-PLUS-SDK-AM243X
MCU+ 器件中的 CPSW IP 支持调试/诊断统计信息。如何使用 MCU+ SDK Enet LLD 中提供的 GEL 文件打印这些统计信息?
Annie Liu:
可以通过以下步骤打印 CPSW 统计信息 –
1) 启动 CCS 并连接到主 R5F0_0 内核
2) 在顶级菜单中点击“Tools”–>“Gel Files”选项
3) 在新打开的“GEL Files”窗口中,右键点击并选择“Load GEL”
4) 选择文件 mcu_plus_sdk_xx_xx_xx\source\networking\enet\core\tools\debug_gels\cpsw_startup.gel
5) 点击“Scripts”–>“CPSW Statistics Print”–>“cpsw_2g_ststsprint_nonzero”,您将在 CCS 控制台上看到统计信息寄存器。
以下是 examples\networking\lwip\enet_lwip_cpsw 的样例输出(使用端口 1):
MAIN_Cortex_R5_0_0: GEL Output: STATS MAIN_Cortex_R5_0_0: GEL Output: ——————————– MAIN_Cortex_R5_0_0: GEL Output: PORT0 STATS MAIN_Cortex_R5_0_0: GEL Output: ——————————– MAIN_Cortex_R5_0_0: GEL Output: STAT_0_RXGOODFRAMES = 0x00000010 MAIN_Cortex_R5_0_0: GEL Output: STAT_0_RXBROADCASTFRAMES = 0x0000000A MAIN_Cortex_R5_0_0: GEL Output: STAT_0_RXOCTETS = 0x000007AC MAIN_Cortex_R5_0_0: GEL Output: STAT_0_TXGOODFRAMES = 0x000000E3 MAIN_Cortex_R5_0_0: GEL Output: STAT_0_TXBROADCASTFRAMES = 0x00000004 MAIN_Cortex_R5_0_0: GEL Output: STAT_0_TXMULTICASTFRAMES = 0x000000D7 MAIN_Cortex_R5_0_0: GEL Output: STAT_0_TXOCTETS = 0x0000779E MAIN_Cortex_R5_0_0: GEL Output: STAT_0_OCTETFRAMES64 = 0x00000021 MAIN_Cortex_R5_0_0: GEL Output: STAT_0_OCTETFRAMES65T127 = 0x00000095 MAIN_Cortex_R5_0_0: GEL Output: STAT_0_OCTETFRAMES128T255 = 0x00000025 MAIN_Cortex_R5_0_0: GEL Output: STAT_0_OCTETFRAMES256T511 = 0x00000018 MAIN_Cortex_R5_0_0: GEL Output: STAT_0_NETOCTETS = 0x00007F4A MAIN_Cortex_R5_0_0: GEL Output: STAT_0_TX_PRI_REG [0]= 0x000000E3 MAIN_Cortex_R5_0_0: GEL Output: STAT_0_TX_PRI_BCNT_REG [0]= 0x0000779E MAIN_Cortex_R5_0_0: GEL Output: ——————————– MAIN_Cortex_R5_0_0: GEL Output: PORT1 STATS MAIN_Cortex_R5_0_0: GEL Output: ——————————– MAIN_Cortex_R5_0_0: GEL Output: STAT_1_RXGOODFRAMES = 0x000000E3 MAIN_Cortex_R5_0_0: GEL Output: STAT_1_RXBROADCASTFRAMES = 0x00000004 MAIN_Cortex_R5_0_0: GEL Output: STAT_1_RXMULTICASTFRAMES = 0x000000D7 MAIN_Cortex_R5_0_0: GEL Output: STAT_1_RXOCTETS = 0x0000779E MAIN_Cortex_R5_0_0: GEL Output: STAT_1_TXGOODFRAMES = 0x00000010 MAIN_Cortex_R5_0_0: GEL Output: STAT_1_TXBROADCASTFRAMES = 0x0000000A MAIN_Cortex_R5_0_0: GEL Output: STAT_1_TXOCTETS = 0x000007AC MAIN_Cortex_R5_0_0: GEL Output: STAT_1_OCTETFRAMES64 = 0x00000021 MAIN_Cortex_R5_0_0: GEL Output: STAT_1_OCTETFRAMES65T127 = 0x00000095 MAIN_Cortex_R5_0_0: GEL Output: STAT_1_OCTETFRAMES128T255 = 0x00000025 MAIN_Cortex_R5_0_0: GEL Output: STAT_1_OCTETFRAMES256T511 = 0x00000018 MAIN_Cortex_R5_0_0: GEL Output: STAT_1_NETOCTETS = 0x00007F4A MAIN_Cortex_R5_0_0: GEL Output: STAT_1_ALE_UNKN_MLT = 0x00000008 MAIN_Cortex_R5_0_0: GEL Output: STAT_1_ALE_UNKN_MLT_BCNT = 0x000005A1 MAIN_Cortex_R5_0_0: GEL Output: STAT_1_ALE_UNKN_BRD = 0x00000001 MAIN_Cortex_R5_0_0: GEL Output: STAT_1_ALE_UNKN_BRD_BCNT = 0x00000040 MAIN_Cortex_R5_0_0: GEL Output: STAT_1_TX_PRI_REG [0]= 0x00000010 MAIN_Cortex_R5_0_0: GEL Output: STAT_1_TX_PRI_BCNT_REG [0]= 0x000007AC MAIN_Cortex_R5_0_0: GEL Output: ——————————– MAIN_Cortex_R5_0_0: GEL Output: PORT2 STATS MAIN_Cortex_R5_0_0: GEL Output: ——————————–