/* ================================================================== >>>>>>>>>>>>>>>>>>>>>>> COPYRIGHT NOTICE <<<<<<<<<<<<<<<<<<<<<<<<< ------------------------------------------------------------------ Copyright (c) 2024-2024 by Lattice Semiconductor Corporation ALL RIGHTS RESERVED ------------------------------------------------------------------ IMPORTANT: THIS FILE IS USED BY OR GENERATED BY the LATTICE PROPELâ„¢ DEVELOPMENT SUITE, WHICH INCLUDES PROPEL BUILDER AND PROPEL SDK. Lattice grants permission to use this code pursuant to the terms of the Lattice Propel License Agreement. DISCLAIMER: LATTICE MAKES NO WARRANTIES ON THIS FILE OR ITS CONTENTS, WHETHER EXPRESSED, IMPLIED, STATUTORY, OR IN ANY PROVISION OF THE LATTICE PROPEL LICENSE AGREEMENT OR COMMUNICATION WITH LICENSEE, AND LATTICE SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. LATTICE DOES NOT WARRANT THAT THE FUNCTIONS CONTAINED HEREIN WILL MEET LICENSEE 'S REQUIREMENTS, OR THAT LICENSEE' S OPERATION OF ANY DEVICE, SOFTWARE OR SYSTEM USING THIS FILE OR ITS CONTENTS WILL BE UNINTERRUPTED OR ERROR FREE, OR THAT DEFECTS HEREIN WILL BE CORRECTED. LICENSEE ASSUMES RESPONSIBILITY FOR SELECTION OF MATERIALS TO ACHIEVE ITS INTENDED RESULTS, AND FOR THE PROPER INSTALLATION, USE, AND RESULTS OBTAINED THEREFROM. LICENSEE ASSUMES THE ENTIRE RISK OF THE FILE AND ITS CONTENTS PROVING DEFECTIVE OR FAILING TO PERFORM PROPERLY AND IN SUCH EVENT, LICENSEE SHALL ASSUME THE ENTIRE COST AND RISK OF ANY REPAIR, SERVICE, CORRECTION, OR ANY OTHER LIABILITIES OR DAMAGES CAUSED BY OR ASSOCIATED WITH THE SOFTWARE.IN NO EVENT SHALL LATTICE BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS, ARISING OUT OF THE USE OF THIS FILE OR ITS CONTENTS, EVEN IF LATTICE HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. LATTICE 'S SOLE LIABILITY, AND LICENSEE' S SOLE REMEDY, IS SET FORTH ABOVE. LATTICE DOES NOT WARRANT OR REPRESENT THAT THIS FILE, ITS CONTENTS OR USE THEREOF DOES NOT INFRINGE ON THIRD PARTIES' INTELLECTUAL PROPERTY RIGHTS, INCLUDING ANY PATENT. IT IS THE USER' S RESPONSIBILITY TO VERIFY THE USER SOFTWARE DESIGN FOR CONSISTENCY AND FUNCTIONALITY THROUGH THE USE OF FORMAL SOFTWARE VALIDATION METHODS. ------------------------------------------------------------------ ================================================================== */ #ifndef _TEN_G_ETHERNET_HW_H_ #define _TEN_G_ETHERNET_HW_H_ /** * @brief : Statistic registers offset */ #define TX_STAT_PKT_LNGTH 0x044 #define TX_STAT_ERR 0x04C #define TX_STAT_UNDER_RUN 0x054 #define TX_STAT_CRC_ERR 0x05C #define TX_STAT_LNGTH_ERR 0x064 #define TX_STAT_LNG_PKT 0x06C #define TX_STAT_MULTCST 0x074 #define TX_STAT_BRDCST 0x07C #define TX_STAT_CNT 0x084 #define TX_STAT_JMBO 0x08C #define TX_STAT_PAUSE 0x094 #define TX_STAT_VLN_TG 0x09C #define TX_STAT_PKT_OK 0x0A4 #define TX_STAT_PKT_64 0x0AC #define TX_STAT_PKT_65_127 0x0B4 #define TX_STAT_PKT_128_255 0x0BC #define TX_STAT_PKT_256_511 0x0C4 #define TX_STAT_PKT_512_1023 0x0CC #define TX_STAT_PKT_1024_1518 0x0D4 #define TX_STAT_PKT_1518 0x0DC #define TX_STAT_FRM_ERR 0x0E4 #define TX_STAT_PKT_1519_2047 0x0EC #define TX_STAT_PKT_2048_4095 0x0F4 #define TX_STAT_PKT_4096_9216 0x0FC #define TX_STAT_PKT_9217_16383 0x104 #define RX_STAT_PKT_LNGTH 0x10C #define RX_STAT_VLN_TG 0x114 #define RX_STAT_PAUSE 0x11C #define RX_STAT_FLT 0x124 #define RX_STAT_UNSP_OPCODE 0x12C #define RX_STAT_BRDCST 0x134 #define RX_STAT_MULTCST 0x13C #define RX_STAT_LNGTH_ERR 0x144 #define RX_STAT_LNG_PKT 0x14C #define RX_STAT_CRC_ERR 0x154 #define RX_STAT_PKT_DISCARD 0x15C #define RX_STAT_PKT_IGNORE 0x164 #define RX_STAT_PKT_FRAGMENTS 0x16C #define RX_STAT_PKT_JABBERS 0x174 #define RX_STAT_PKT_64 0x17C #define RX_STAT_PKT_65_127 0x184 #define RX_STAT_PKT_128_255 0x18C #define RX_STAT_PKT_256_511 0x194 #define RX_STAT_PKT_512_1023 0x19C #define RX_STAT_PKT_1024_1518 0x1A4 #define RX_STAT_PKT_UNDERSIZE 0x1AC #define RX_STAT_PKT_UNICAST 0x1B4 #define RX_STAT_PKT_RCVD 0x1BC #define RX_STAT_PKT_64_GOOD_CRC 0x1C4 #define RX_STAT_PKT_1518_GOOD_CRC 0x1CC #define RX_STAT_PKT_1519_2047 0x1D4 #define RX_STAT_PKT_2048_4095 0x1DC #define RX_STAT_PKT_4096_9216 0x1E4 #define RX_STAT_PKT_9217_16383 0x1EC /** * @brief : A lookup table returns the string representation of the statistics counter register * based on the offset of the statistics counter register. */ #define xg_ethernet_reg_name_str(Offset) \ (((Offset) == TX_STAT_PKT_LNGTH) ? "TX_STAT_PKT_LNGTH" : \ ((Offset) == TX_STAT_ERR) ? "TX_STAT_ERR" : \ ((Offset) == TX_STAT_UNDER_RUN) ? "TX_STAT_UNDER_RUN" : \ ((Offset) == TX_STAT_CRC_ERR) ? "TX_STAT_CRC_ERR" : \ ((Offset) == TX_STAT_LNGTH_ERR) ? "TX_STAT_LNGTH_ERR" : \ ((Offset) == TX_STAT_LNG_PKT) ? "TX_STAT_LNG_PKT" : \ ((Offset) == TX_STAT_MULTCST) ? "TX_STAT_MULTCST" : \ ((Offset) == TX_STAT_BRDCST) ? "TX_STAT_BRDCST" : \ ((Offset) == TX_STAT_CNT) ? "TX_STAT_CNT" : \ ((Offset) == TX_STAT_JMBO) ? "TX_STAT_JMBO" : \ ((Offset) == TX_STAT_PAUSE) ? "TX_STAT_PAUSE" : \ ((Offset) == TX_STAT_VLN_TG) ? "TX_STAT_VLN_TG" : \ ((Offset) == TX_STAT_PKT_OK) ? "TX_STAT_PKT_OK" : \ ((Offset) == TX_STAT_PKT_64) ? "TX_STAT_PKT_64" : \ ((Offset) == TX_STAT_PKT_65_127) ? "TX_STAT_PKT_65_127" : \ ((Offset) == TX_STAT_PKT_128_255) ? "TX_STAT_PKT_128_255" : \ ((Offset) == TX_STAT_PKT_256_511) ? "TX_STAT_PKT_256_511" : \ ((Offset) == TX_STAT_PKT_512_1023) ? "TX_STAT_PKT_512_1023" : \ ((Offset) == TX_STAT_PKT_1024_1518) ? "TX_STAT_PKT_1024_1518" : \ ((Offset) == TX_STAT_PKT_1518) ? "TX_STAT_PKT_1518" : \ ((Offset) == TX_STAT_FRM_ERR) ? "TX_STAT_FRM_ERR" : \ ((Offset) == TX_STAT_PKT_1519_2047) ? "TX_STAT_PKT_1519_2047" : \ ((Offset) == TX_STAT_PKT_2048_4095) ? "TX_STAT_PKT_2048_4095" : \ ((Offset) == TX_STAT_PKT_4096_9216) ? "TX_STAT_PKT_4096_9216" : \ ((Offset) == TX_STAT_PKT_9217_16383) ? "TX_STAT_PKT_9217_16383" : \ ((Offset) == RX_STAT_PKT_LNGTH) ? "RX_STAT_PKT_LNGTH" : \ ((Offset) == RX_STAT_VLN_TG) ? "RX_STAT_VLN_TG" : \ ((Offset) == RX_STAT_PAUSE) ? "RX_STAT_PAUSE" : \ ((Offset) == RX_STAT_FLT) ? "RX_STAT_FLT" : \ ((Offset) == RX_STAT_UNSP_OPCODE) ? "RX_STAT_UNSP_OPCODE" : \ ((Offset) == RX_STAT_BRDCST) ? "RX_STAT_BRDCST" : \ ((Offset) == RX_STAT_MULTCST) ? "RX_STAT_MULTCST" : \ ((Offset) == RX_STAT_LNGTH_ERR) ? "RX_STAT_LNGTH_ERR" : \ ((Offset) == RX_STAT_LNG_PKT) ? "RX_STAT_LNG_PKT" : \ ((Offset) == RX_STAT_CRC_ERR) ? "RX_STAT_CRC_ERR" : \ ((Offset) == RX_STAT_PKT_DISCARD) ? "RX_STAT_PKT_DISCARD" : \ ((Offset) == RX_STAT_PKT_IGNORE) ? "RX_STAT_PKT_IGNORE" : \ ((Offset) == RX_STAT_PKT_FRAGMENTS) ? "RX_STAT_PKT_FRAGMENTS" : \ ((Offset) == RX_STAT_PKT_JABBERS) ? "RX_STAT_PKT_JABBERS" : \ ((Offset) == RX_STAT_PKT_64) ? "RX_STAT_PKT_64" : \ ((Offset) == RX_STAT_PKT_65_127) ? "RX_STAT_PKT_65_127" : \ ((Offset) == RX_STAT_PKT_128_255) ? "RX_STAT_PKT_128_255" : \ ((Offset) == RX_STAT_PKT_256_511) ? "RX_STAT_PKT_256_511" : \ ((Offset) == RX_STAT_PKT_512_1023) ? "RX_STAT_PKT_512_1023" : \ ((Offset) == RX_STAT_PKT_1024_1518) ? "RX_STAT_PKT_1024_1518" : \ ((Offset) == RX_STAT_PKT_UNDERSIZE) ? "RX_STAT_PKT_UNDERSIZE" : \ ((Offset) == RX_STAT_PKT_UNICAST) ? "RX_STAT_PKT_UNICAST" : \ ((Offset) == RX_STAT_PKT_RCVD) ? "RX_STAT_PKT_RCVD" : \ ((Offset) == RX_STAT_PKT_64_GOOD_CRC) ? "RX_STAT_PKT_64_GOOD_CRC" : \ ((Offset) == RX_STAT_PKT_1518_GOOD_CRC) ? "RX_STAT_PKT_1518_GOOD_CRC" : \ ((Offset) == RX_STAT_PKT_1519_2047) ? "RX_STAT_PKT_1519_2047" : \ ((Offset) == RX_STAT_PKT_2048_4095) ? "RX_STAT_PKT_2048_4095" : \ ((Offset) == RX_STAT_PKT_4096_9216) ? "RX_STAT_PKT_4096_9216" : \ ((Offset) == RX_STAT_PKT_9217_16383) ? "RX_STAT_PKT_9217_16383" : \ "unknown") #endif