/**
*   @file       Eth_43_PFE_Cfg.h
*   @implements Eth_43_PFE_Cfg.h_Artifact
*
*   @brief   AUTOSAR Eth_43_PFE driver configuration header file
*   @details File containing the configuration for the Ethernet driver
*   @note    This file was generated on [!"$date"!].
*
*   @addtogroup ETH_43_PFE_DRIVER_CONFIGURATION
*   @{
*/
/*==================================================================================================
 *  Project              : AUTOSAR 4.4 MCAL
 *  Peripheral           : PFE
 *
 *  Autosar Version      : 4.4.0
 *  Autosar Revision     : ASR_REL_4_4_REV_0000
 *
 *  (c) Copyright 2006-2016 Freescale Semiconductor, Inc.
 *      Copyright 2017-2022 NXP
 *
 *  NXP Confidential. This software is owned or controlled by NXP and may only
 *  be used strictly in accordance with the applicable license terms. By
 *  expressly accepting such terms or by downloading, installing, activating
 *  and/or otherwise using the software, you are agreeing that you have read,
 *  and that you agree to comply with and are bound by, such license terms. If
 *  you do not agree to be bound by the applicable license terms, then you may
 *  not retain, install, activate or otherwise use the software.
 *  <<< PFE Restricted Software >>>
 *
==================================================================================================*/
/*==================================================================================================
==================================================================================================*/
[!AUTOSPACING!]
[!NOCODE!][!//
[!/*
*************************************
* Error checks of the configuration *
*************************************
*/!]
  [!INCLUDE "Eth_43_PFE_Checks.m"!][!// Configuration checks
  [!INCLUDE "Eth_43_PFE_GetDemParameters.m"!][!// Calculates register values from configuration paremeters
  [!INCLUDE "Eth_43_PFE_GetPfeParameters.m"!][!// Macros for calculation of values related to buffers
[!ENDNOCODE!][!//
#ifndef ETH_43_PFE_CFG_H
#define ETH_43_PFE_CFG_H

#ifdef __cplusplus
extern "C"{
#endif

/*==================================================================================================
*                                     FILE VERSION CHECK
==================================================================================================*/
#ifdef PFE_SRC_VERSION_CHECK
    #if (PFE_SRC_VERSION_CHECK != 43100440)
        #error "This header file was included from incompatible source file (different SW version)"
    #endif
#else
    #define PFE_SRC_VERSION_CHECK 43100440
#endif

[!IF "EthGeneral/EthDevErrorDetect = 'true'"!][!//
#include "Det.h"
[!ENDIF!][!//
[!IF "EthGeneral/EthVendorSpecific/EthDisableDemEventDetect = 'false'"!][!//
#include "Dem.h"
[!ENDIF!][!//
#include "Eth_GeneralTypes.h"
#include "Mcal.h"
#include "Soc_Ips.h"
#include "fifo.h"

[!IF "var:defined('postBuildVariant')"!]
[!LOOP "variant:all()"!][!//
#include "Eth_43_PFE_[!"."!]_PBcfg.h"
[!ENDLOOP!][!//
[!ELSE!]
#include "Eth_43_PFE_PBcfg.h"
[!ENDIF!]

/*==================================================================================================
*                              SOURCE FILE VERSION INFORMATION
==================================================================================================*/
#define ETH_43_PFE_VENDOR_ID_CFG                    43
#define ETH_43_PFE_MODULE_ID_CFG                    88
#define ETH_43_PFE_AR_RELEASE_MAJOR_VERSION_CFG     4
#define ETH_43_PFE_AR_RELEASE_MINOR_VERSION_CFG     4
#define ETH_43_PFE_AR_RELEASE_REVISION_VERSION_CFG  0
#define ETH_43_PFE_SW_MAJOR_VERSION_CFG             1
#define ETH_43_PFE_SW_MINOR_VERSION_CFG             0
#define ETH_43_PFE_SW_PATCH_VERSION_CFG             0

/*==================================================================================================
*                                     FILE VERSION CHECKS
==================================================================================================*/
#ifndef DISABLE_MCAL_INTERMODULE_ASR_CHECK
    /* Check if current file and MCAL header file are of the same Autosar version */
    #if ((ETH_43_PFE_AR_RELEASE_MAJOR_VERSION_CFG != MCAL_AR_RELEASE_MAJOR_VERSION) || \
         (ETH_43_PFE_AR_RELEASE_MINOR_VERSION_CFG != MCAL_AR_RELEASE_MINOR_VERSION))
        #error "AutoSar Version Numbers of Eth_43_PFE_Cfg.h and Mcal.h are different"
    #endif
    /* Check if current file and Soc_Ips header file are of the same Autosar version */
    #if ((ETH_43_PFE_AR_RELEASE_MAJOR_VERSION_CFG != SOC_IPS_AR_RELEASE_MAJOR_VERSION) || \
         (ETH_43_PFE_AR_RELEASE_MINOR_VERSION_CFG != SOC_IPS_AR_RELEASE_MINOR_VERSION))
        #error "AutoSar Version Numbers of Eth_43_PFE_Cfg.h and Soc_Ips.h are different"
    #endif
    /* Check if current file and DET header file are of the same Autosar version */
  [!IF "EthGeneral/EthDevErrorDetect = 'true'"!][!//
    #if ((ETH_43_PFE_AR_RELEASE_MAJOR_VERSION_CFG != DET_AR_RELEASE_MAJOR_VERSION) || \
         (ETH_43_PFE_AR_RELEASE_MINOR_VERSION_CFG != DET_AR_RELEASE_MINOR_VERSION))
        #error "AutoSar Version Numbers of Eth_43_PFE_Cfg.h and Det.h are different"
    #endif
  [!ENDIF!][!//
  [!IF "EthGeneral/EthVendorSpecific/EthDisableDemEventDetect = 'false'"!][!//
    /* Check if current file and Dem header file are of the same Autosar version */
    #if ((ETH_43_PFE_AR_RELEASE_MAJOR_VERSION_CFG != DEM_AR_RELEASE_MAJOR_VERSION) || \
         (ETH_43_PFE_AR_RELEASE_MINOR_VERSION_CFG != DEM_AR_RELEASE_MINOR_VERSION))
        #error "AutoSar Version Numbers of Eth_43_PFE_Cfg.h and Dem.h are different"
    #endif
  [!ENDIF!][!//
#endif /* DISABLE_MCAL_INTERMODULE_ASR_CHECK */
/*==================================================================================================
*                                          CONSTANTS
==================================================================================================*/
#define VARIANT_PRE_COMPILE 0
#define VARIANT_LINK_TIME 1
#define VARIANT_POST_BUILD 2
[!IF "(IMPLEMENTATION_CONFIG_VARIANT != 'VariantPostBuild' and (variant:size()<=1))"!][!//
#define ETH_43_PFE_PRECOMPILE_SUPPORT     (STD_ON)
[!ELSE!][!//
#define ETH_43_PFE_PRECOMPILE_SUPPORT     (STD_OFF)
[!ENDIF!][!//
 /******************************************************************************
 * Diagnostic Event Manager (DEM)
 ******************************************************************************/
[!IF "EthGeneral/EthVendorSpecific/EthDisableDemEventDetect = 'false'"!][!//
 #define ETH_43_PFE_DEM_EVENT_DETECT  (STD_ON)   /*!< Enables Diagnostic Event Manager */
[!ELSE!][!//
 #define ETH_43_PFE_DEM_EVENT_DETECT  (STD_OFF)  /*!< Enables Diagnostic Event Manager */
[!ENDIF!][!//

/*==================================================================================================
*                                      DEFINES AND MACROS
==================================================================================================*/
/*
* Symbolic names of groups.
*/
[!FOR "x" = "0" TO "count(EthConfigSet/EthCtrlConfig/*/EthCtrlConfigIngress/EthCtrlConfigIngressFifo/*)-1"!][!//
[!LOOP "EthConfigSet/EthCtrlConfig/*/EthCtrlConfigIngress/EthCtrlConfigIngressFifo/*"!][!//
[!IF "$x = EthCtrlConfigIngressFifoIdx"!]
#define EthConf_[!"name(..)"!]_[!"name(.)"!]    [!"EthCtrlConfigIngressFifoIdx"!]
[!ENDIF!][!//
[!ENDLOOP!][!//
[!ENDFOR!]

    #define ETH_43_PFE_CFG_ENABLERXINTERRUPT(CtrlIdx)   ((*(Eth_43_PFE_StaticConfig.pController[CtrlIdx])).EnableRxInterrupt)
    #define ETH_43_PFE_CFG_ENABLETXINTERRUPT(CtrlIdx)   ((*(Eth_43_PFE_StaticConfig.pController[CtrlIdx])).EnableTxInterrupt)
    #define ETH_43_PFE_CFG_MDIOSUPPORT(CtrlIdx)         ((*(Eth_43_PFE_StaticConfig.pController[CtrlIdx])).MDIOSupport)
    #define ETH_43_PFE_CFG_MACADDRESS(CtrlIdx)          ((*(Eth_43_PFE_InternalCfgPtr->pController[CtrlIdx])).EthMACAddress)
    #define ETH_43_PFE_CFG_CTRLIDXINETHIF(CtrlIdx)      ((*(Eth_43_PFE_InternalCfgPtr->pController[CtrlIdx])).EthCtrlEthIfIdx)
    #define ETH_43_PFE_CFG_CTRLHWPORT(CtrlIdx)          ((*(Eth_43_PFE_InternalCfgPtr->pController[CtrlIdx])).EthCtrlHwPort)
    #define ETH_43_PFE_CFG_PROMISCUOUS(CtrlIdx)         ((*(Eth_43_PFE_InternalCfgPtr->pController[CtrlIdx])).EthCtrlPromiscuous)
    #define ETH_43_PFE_CFG_BROADCAST(CtrlIdx)           ((*(Eth_43_PFE_InternalCfgPtr->pController[CtrlIdx])).EthCtrlBroadcast)
    #define ETH_43_PFE_CFG_EMAC_LOOPBACK(CtrlIdx)       ((*(Eth_43_PFE_InternalCfgPtr->pController[CtrlIdx])).EthCtrlEmacLoop)
    #define ETH_43_PFE_CFG_MIIMODE(CtrlIdx)             ((*(Eth_43_PFE_InternalCfgPtr->pController[CtrlIdx])).EthCtrlMiiType)
    #define ETH_43_PFE_CFG_LINKSPEED(CtrlIdx)           ((*(Eth_43_PFE_InternalCfgPtr->pController[CtrlIdx])).EthCtrlSpeed)
    #define ETH_43_PFE_CFG_LINKDUPLEX(CtrlIdx)          ((*(Eth_43_PFE_InternalCfgPtr->pController[CtrlIdx])).EthCtrlDuplex)
    #define ETH_43_PFE_CFG_ACCEPTALLTRAFFIC(CtrlIdx)    ((*(Eth_43_PFE_InternalCfgPtr->pController[CtrlIdx])).EthCtrlAcceptAllTraffic)
    #define ETH_43_PFE_CFG_HIF_RXBD_NUM                 (Eth_43_PFE_InternalCfgPtr->pHif->u16RxBDNum)
    #define ETH_43_PFE_CFG_HIF_TXBD_NUM                 (Eth_43_PFE_InternalCfgPtr->pHif->u16TxBDNum)
    #define ETH_43_PFE_CFG_HIF_RX_BUF_NUM               (Eth_43_PFE_InternalCfgPtr->pHif->u16RxBufNum)
    #define ETH_43_PFE_CFG_HIF_RX_BUF_SIZE              (Eth_43_PFE_InternalCfgPtr->pHif->u16RxBufSize)
#if STD_ON == ETH_43_PFE_DEM_EVENT_DETECT
    #define ETH_43_PFE_CFG_DEM_E_ACCESS_ENABLED(CtrlIdx)    ((*(Eth_43_PFE_InternalCfgPtr->pController[CtrlIdx])).ETH_43_PFE_DEM_E_ACCESS_Cfg.state)
    #define ETH_43_PFE_CFG_DEM_E_ACCESS(CtrlIdx)    ((*(Eth_43_PFE_InternalCfgPtr->pController[CtrlIdx])).ETH_43_PFE_DEM_E_ACCESS_Cfg.id)
    #define ETH_43_PFE_CFG_DEM_E_FRAMELOST_ENABLED(CtrlIdx)    ((*(Eth_43_PFE_InternalCfgPtr[0].pController[CtrlIdx])).ETH_43_PFE_E_RX_FRAMES_LOST_Cfg.state)
    #define ETH_43_PFE_CFG_DEM_E_FRAMELOST(CtrlIdx)    ((*(Eth_43_PFE_InternalCfgPtr[0].pController[CtrlIdx])).ETH_43_PFE_E_RX_FRAMES_LOST_Cfg.id)
    #define ETH_43_PFE_CFG_DEM_E_CRC_ENABLED(CtrlIdx)    ((*(Eth_43_PFE_InternalCfgPtr[0].pController[CtrlIdx])).ETH_43_PFE_E_CRC_Cfg.state)
    #define ETH_43_PFE_CFG_DEM_E_CRC(CtrlIdx)    ((*(Eth_43_PFE_InternalCfgPtr[0].pController[CtrlIdx])).ETH_43_PFE_E_CRC_Cfg.id)
    #define ETH_43_PFE_CFG_DEM_E_UNDERSIZE_ENABLED(CtrlIdx)    ((*(Eth_43_PFE_InternalCfgPtr[0].pController[CtrlIdx])).ETH_43_PFE_E_UNDERSIZEFRAME_Cfg.state)
    #define ETH_43_PFE_CFG_DEM_E_UNDERSIZE(CtrlIdx)    ((*(Eth_43_PFE_InternalCfgPtr[0].pController[CtrlIdx])).ETH_43_PFE_E_UNDERSIZEFRAME_Cfg.id)
    #define ETH_43_PFE_CFG_DEM_E_OVERSIZE_ENABLED(CtrlIdx)    ((*(Eth_43_PFE_InternalCfgPtr[0].pController[CtrlIdx])).ETH_43_PFE_E_OVERSIZEFRAME_Cfg.state)
    #define ETH_43_PFE_CFG_DEM_E_OVERSIZE(CtrlIdx)    ((*(Eth_43_PFE_InternalCfgPtr[0].pController[CtrlIdx])).ETH_43_PFE_E_OVERSIZEFRAME_Cfg.id)
    #define ETH_43_PFE_CFG_DEM_E_ALIGN_ENABLED(CtrlIdx)    ((*(Eth_43_PFE_InternalCfgPtr[0].pController[CtrlIdx])).ETH_43_PFE_E_ALIGNMENT_Cfg.state)
    #define ETH_43_PFE_CFG_DEM_E_ALIGN(CtrlIdx)    ((*(Eth_43_PFE_InternalCfgPtr[0].pController[CtrlIdx])).ETH_43_PFE_E_ALIGNMENT_Cfg.id)
    #define ETH_43_PFE_CFG_DEM_E_1COL_ENABLED(CtrlIdx)    ((*(Eth_43_PFE_InternalCfgPtr[0].pController[CtrlIdx])).ETH_43_PFE_E_SINGLECOLLISION_Cfg.state)
    #define ETH_43_PFE_CFG_DEM_E_1COL(CtrlIdx)    ((*(Eth_43_PFE_InternalCfgPtr[0].pController[CtrlIdx])).ETH_43_PFE_E_SINGLECOLLISION_Cfg.id)
    #define ETH_43_PFE_CFG_DEM_E_MCOL_ENABLED(CtrlIdx)    ((*(Eth_43_PFE_InternalCfgPtr[0].pController[CtrlIdx])).ETH_43_PFE_E_MULTIPLECOLLISION_Cfg.state)
    #define ETH_43_PFE_CFG_DEM_E_MCOL(CtrlIdx)    ((*(Eth_43_PFE_InternalCfgPtr[0].pController[CtrlIdx])).ETH_43_PFE_E_MULTIPLECOLLISION_Cfg.id)
    #define ETH_43_PFE_CFG_DEM_E_LCOL_ENABLED(CtrlIdx)    ((*(Eth_43_PFE_InternalCfgPtr[0].pController[CtrlIdx])).ETH_43_PFE_E_LATECOLLISION_Cfg.state)
    #define ETH_43_PFE_CFG_DEM_E_LCOL(CtrlIdx)    ((*(Eth_43_PFE_InternalCfgPtr[0].pController[CtrlIdx])).ETH_43_PFE_E_LATECOLLISION_Cfg.id)
#endif /* ETH_43_PFE_DEM_EVENT_DETECT */

#define ETH_43_PFE_CONFIG_EXT \
[!IF "var:defined('postBuildVariant')"!][!//
[!LOOP "variant:all()"!][!//
      ETH_43_PFE_CONFIG_[!"."!]_PB \
[!ENDLOOP!][!//
[!ELSE!][!//
       ETH_43_PFE_CONFIG_PB
[!ENDIF!]

#define RXTX_FIFO_ALIGNED_DEPTH(depth) ((((((uint32)depth * 4U) + (HAL_CACHE_LINE_SIZE - 1U)) / HAL_CACHE_LINE_SIZE) * HAL_CACHE_LINE_SIZE) / 4U)

/******************************************************************************
* Features enable/disable switches
******************************************************************************/
/* ETH004_Conf */
#define ETH_43_PFE_VERSION_INFO_API[!WS!][!IF "EthGeneral/EthVersionInfoApi = 'true'"!](STD_ON)[!ELSE!](STD_OFF)[!ENDIF!][!WS!]/*!< Enables Version info function */
/* ETH005_Conf */
#define ETH_43_PFE_VERSION_INFO_API_MACRO[!WS!][!IF "EthGeneral/EthVersionInfoApiMacro = 'true'"!](STD_ON)[!ELSE!](STD_OFF)[!ENDIF!][!WS!]/*!< Enables Version info function implementation as macro */

[!NOCODE!][!//
  [!/* This code check all multiple configurations whether all code switches
       (AllMiiDisabled)
       have the value equal to false which means that the code can be omitted.
       The code cannot be omitted when a true value is set in at least
       one multiple configuration */!]
  [!/* Set initial value to "can be omitted" */!]
  [!VAR "AllMiiDisabled" = "true()"!]
  [!/* Go through all multiple configurations and change initial value to
       "cannot be omitted" if a true value is found for a parameter */!]
  [!SELECT "EthConfigSet"!][!//
    [!LOOP "EthCtrlConfig/*"!][!//
      [!IF "EthCtrlEnableMii = 'true'"!]
        [!VAR "AllMiiDisabled" = "false()"!]
      [!ENDIF!]
    [!ENDLOOP!]
  [!ENDSELECT!][!//
[!ENDNOCODE!][!//
    /* This macro can have STD_OFF value only if the controller in all multiple configurations
       does not use the MII API. The value STD_ON means that code is compiled but the MII
       might not be used (API is present because it is needed in another multiple configuration
       but it is not called). */
    /* @requirements SWS_Eth_43_PFE_00012_Conf */
[!IF "$AllMiiDisabled = 'true'"!][!//
    #define ETH_43_PFE_CTRLENABLE_MII (STD_OFF)        /*!< MII handling functions compilation disabled */
    #define ETH_43_PFE_CTRL_USE_45_MDIO_API (STD_OFF)
[!ELSE!][!//
    #define ETH_43_PFE_CTRLENABLE_MII (STD_ON)         /*!< MII handling functions compilation enabled */
  [!IF "EthGeneral/EthVendorSpecific/EthEnableClause45API = 'true'"!][!//
    #define ETH_43_PFE_CTRL_USE_45_MDIO_API (STD_ON)
  [!ELSE!][!//
    #define ETH_43_PFE_CTRL_USE_45_MDIO_API (STD_OFF)
  [!ENDIF!][!//
[!ENDIF!][!//
    /* Enables/disables the GlobalTime APIs used amongst others by Global Time Synchronization over Ethernet */
    #define ETH_43_PFE_GLOBALTIME_SUPPORT   ([!IF "EthGeneral/EthGlobalTimeSupport = 'true'"!]STD_ON[!ELSE!]STD_OFF[!ENDIF!])
    /* Enables / Disables switch management support */
    #define ETH_43_PFE_SWT_MANAGEMENT_SUPPORT_API  ([!IF "EthGeneral/EthVendorSpecific/EthSwtManagementSupportApi = 'true'"!]STD_ON[!ELSE!]STD_OFF[!ENDIF!])

    #define ETH_43_PFE_USE_MULTIPLE_HIFS (STD_OFF)
    #define ETH_43_PFE_COMMON_HIF        PFE_PHY_IF_ID_[!"EthGeneral/EthVendorSpecific/EthCommonHif"!]
    #define PFE_CFG_LOCAL_IF_VALUE       [!WS!][!IF "EthGeneral/EthVendorSpecific/EthCommonHif = 'HIF_NOCPY'"!]4U[!ELSE!][!"num:i(num:i(substring-after(node:value(EthGeneral/EthVendorSpecific/EthCommonHif), 'HIF'))+6)"!]U[!ENDIF!][!CR!]
    #define ETH_43_PFE_USINGHIF0         [!WS!][!IF "EthGeneral/EthVendorSpecific/EthCommonHif = 'HIF0'"!]TRUE[!ELSE!]FALSE[!ENDIF!][!CR!]
    #define ETH_43_PFE_USINGHIF1         [!WS!][!IF "EthGeneral/EthVendorSpecific/EthCommonHif = 'HIF1'"!]TRUE[!ELSE!]FALSE[!ENDIF!][!CR!]
    #define ETH_43_PFE_USINGHIF2         [!WS!][!IF "EthGeneral/EthVendorSpecific/EthCommonHif = 'HIF2'"!]TRUE[!ELSE!]FALSE[!ENDIF!][!CR!]
    #define ETH_43_PFE_USINGHIF3         [!WS!][!IF "EthGeneral/EthVendorSpecific/EthCommonHif = 'HIF3'"!]TRUE[!ELSE!]FALSE[!ENDIF!][!CR!]
    #define ETH_43_PFE_USINGHIF_NOCPY    [!WS!][!IF "EthGeneral/EthVendorSpecific/EthCommonHif = 'HIF_NOCPY'"!]TRUE[!ELSE!]FALSE[!ENDIF!][!CR!]
    [!IF "EthGeneral/EthVendorSpecific/EthPfeMultiInstance = 'false'"!][!//
    #define ETH_43_PFE_MULTI_INSTANCE    (STD_OFF)
    #define ETH_43_PFE_SLAVE_MODE        (STD_OFF)
    #define ETH_43_PFE_BMU2_BUF_CNT      ([!"num:i(EthGeneral/EthVendorSpecific/VarEthBmu2BufCnt)"!]U)
    [!ELSE!][!// EthPfeMultiInstance = 'true'
    #define ETH_43_PFE_MULTI_INSTANCE    (STD_ON)
    #define ETH_43_PFE_MASTER_IF         (PFE_PHY_IF_ID_[!"EthGeneral/EthVendorSpecific/EthPfeMasterHif"!])
        [!IF "EthGeneral/EthVendorSpecific/EthPfeSlaveMode = 'true'"!][!//
    #define ETH_43_PFE_SLAVE_MODE        (STD_ON)
        [!ELSE!][!// EthPfeSlaveMode = 'false'
    #define ETH_43_PFE_SLAVE_MODE        (STD_OFF)
    #define ETH_43_PFE_BMU2_BUF_CNT      ([!"num:i(EthGeneral/EthVendorSpecific/VarEthBmu2BufCnt)"!]U)
        [!ENDIF!][!// EthPfeSlaveMode
    [!ENDIF!][!// EthPfeMultiInstance

    /*! @brief Enables / Disables Eth_GetCounterValues API */
    [!IF "node:exists(EthGeneral/EthGetCounterValuesApi)"!][!//
    #define ETH_43_GET_COUNTER_API            ([!IF "EthGeneral/EthGetCounterValuesApi"!]STD_ON[!ELSE!]STD_OFF[!ENDIF!])
    [!ELSE!][!//
    #define ETH_43_GET_COUNTER_API            (STD_OFF)
    [!ENDIF!][!//
    /*! @brief Enables / Disables Eth_GetTxStats API */
    [!IF "node:exists(EthGeneral/EthGetTxStatsApi)"!][!//
    #define ETH_43_GET_TXSTATS_API            ([!IF "EthGeneral/EthGetTxStatsApi"!]STD_ON[!ELSE!]STD_OFF[!ENDIF!])
    [!ELSE!][!//
    #define ETH_43_GET_TXSTATS_API            (STD_OFF)
    [!ENDIF!][!//
    /*! @brief Enables / Disables Eth_GetRxStats API */
    [!IF "node:exists(EthGeneral/EthGetRxStatsApi)"!][!//
    #define ETH_43_GET_RXSTATS_API            ([!IF "EthGeneral/EthGetRxStatsApi"!]STD_ON[!ELSE!]STD_OFF[!ENDIF!])
    [!ELSE!][!//
    #define ETH_43_GET_RXSTATS_API            (STD_OFF)
    [!ENDIF!][!//
    /*! @brief Enables / Disables Eth_GetTxErrorCounterValues API */
    [!IF "node:exists(EthGeneral/EthGetTxErrorCounterValuesApi)"!][!//
    #define ETH_43_GET_TXERROR_COUNTER_API    ([!IF "EthGeneral/EthGetTxErrorCounterValuesApi"!]STD_ON[!ELSE!]STD_OFF[!ENDIF!])
    [!ELSE!][!//
    #define ETH_43_GET_TXERROR_COUNTER_API    (STD_OFF)
    [!ENDIF!][!//

    /*! @brief Enables / Disables hardware offloading for IPv4 checksums */
    #define ETH_43_PFE_ENABLE_OFFLOAD_CSUM_IPV4         ([!IF "EthGeneral/EthCtrlOffloading/EthCtrlEnableOffloadChecksumIPv4"!]STD_ON[!ELSE!]STD_OFF[!ENDIF!])
    /*! @brief Enables / Disables hardware offloading for TCP checksums */
    #define ETH_43_PFE_ENABLE_OFFLOAD_CSUM_TCP          ([!IF "EthGeneral/EthCtrlOffloading/EthCtrlEnableOffloadChecksumTCP"!]STD_ON[!ELSE!]STD_OFF[!ENDIF!])
    /*! @brief Enables / Disables hardware offloading for UDP checksums */
    #define ETH_43_PFE_ENABLE_OFFLOAD_CSUM_UDP          ([!IF "EthGeneral/EthCtrlOffloading/EthCtrlEnableOffloadChecksumUDP"!]STD_ON[!ELSE!]STD_OFF[!ENDIF!])
    /*! @brief Enables / Disables hardware offloading for ICMP checksums */
    #define ETH_43_PFE_ENABLE_OFFLOAD_CSUM_ICMP         ([!IF "EthGeneral/EthCtrlOffloading/EthCtrlEnableOffloadChecksumICMP"!]STD_ON[!ELSE!]STD_OFF[!ENDIF!])
    /******************************************************************************
    * Development Error Detection
    ******************************************************************************/
    /* ETH003_Conf */
[!IF "EthGeneral/EthDevErrorDetect = 'true'"!][!//
    #define ETH_43_PFE_DEV_ERROR_DETECT  (STD_ON)      /*!< Enables Development Error Detect feature */
[!ELSE!][!//
    #define ETH_43_PFE_DEV_ERROR_DETECT  (STD_OFF)     /*!< Enables Development Error Detect feature */
[!ENDIF!][!//

    /******************************************************************************
    * Configuration constants
    ******************************************************************************/
    /* Required Eth buffers alignment, may be different for TX and RX depending on the used IP */
    #define ETH_43_PFE_TX_BUF_ALIGNMENT 8 /* 8 bytes */
    #define ETH_43_PFE_RX_BUF_ALIGNMENT 8 /* 8 bytes */
    /* ETH002_Conf */
    #define ETH_43_PFE_MAXCTRLS_SUPPORTED [!"EthGeneral/EthMaxCtrlsSupported"!]U  /* Number of supported controllers */
    [!IF "EthGeneral/EthVendorSpecific/EthPfeMultiInstance = 'true'"!][!//
        [!IF "$HifInterruptEnabled = 'false'"!][!//
            [!IF "(EthGeneral/EthMainFunctionPeriod) > 0.01"!][!//
                [!WARNING!]
                    When using polling mode, period of calling MainFunction should be less than 0.01s for better performance of Master-Slave operation.
                [!ENDWARNING!]
            [!ENDIF!][!//
        [!ENDIF!][!//
    [!ENDIF!][!//
    #define ETH_43_PFE_CFG_MAIN_FCN_PERIOD_MS [!"num:i(EthGeneral/EthMainFunctionPeriod * 1000.0)"!]U  /* Period of Main function in miliseconds */
    #define ETH_43_PFE_NUM_OF_CONFIGURATIONS 1U /* Number of configurations */ /* FIXME - does not seem right to be always 1 */
    #define ETH_43_PFE_DRIVER_INSTANCE [!"EthGeneral/EthIndex"!]U   /* Instance number assigned to the driver */
    #define ETH_43_PFE_NUM_EMAC                    (3U)
    #define ETH_43_PFE_NUM_CONTROLLER_CFG          ([!"num:i(count(EthConfigSet/EthCtrlConfig/*))"!]U)
    /* Sizes of memory blocks allocated for TX/RX data buffers and related descriptors */
    #define ETH_43_PFE_MAX_RXFIFO_CONFIG           (1U)
    #define ETH_43_PFE_MAX_TX_PRIO_NUM             (7U)

[!CALL "CalculateTotalMaximumTxValues"!][!// output: tx_buf_poolsz_max tx_bd_num_max tx_fifo_num_max tx_fifo_buf_num_max
[!CALL "CalculateTotalMaximumRxValues"!][!// output: rx_buf_poolsz_max rx_meta_buf_poolsz_max rx_bd_num_max
    /* Used for BD memory allocation: */
    #define ETH_43_PFE_MAX_RXBD_CNT                ([!"num:i($rx_bd_num_max)"!]U)
    #define ETH_43_PFE_MAX_TXBD_CNT                ([!"num:i($tx_bd_num_max)"!]U)
    /* Used for buffer memory allocation (values are always >= 1 to avoid zero sized arrays): */
    #define ETH_43_PFE_MAX_RXBUF_POOLSZ            ([!"num:i($rx_buf_poolsz_max)"!]U)
    #define ETH_43_PFE_MAX_RXBUF_META_POOLSZ       ([!"num:i($rx_meta_buf_poolsz_max)"!]U)
    #define ETH_43_PFE_MAX_TXBUF_POOLSZ            ([!"num:i($tx_buf_poolsz_max)"!]U)
    /* Fifo/queue configuration */
    #define ETH_43_PFE_MAX_TXFIFO_CNT              ([!"num:i($tx_fifo_num_max)"!]U)
    #define ETH_43_PFE_MAX_FIFO_TX_BUF_CNT         ([!"num:i($tx_fifo_buf_num_max)"!]U)
    #define ETH_43_PFE_MAX_CTRL_TX_BUF_CNT         ([!"num:i($tx_ctrl_buf_num_max)"!]U)
    #define ETH_43_PFE_META_BUF_SIZE               ([!"num:i($meta_buffer_size)"!]U)

    /******************************************************************************
    *   PFE FIRMWARE IMAGE LOCATION
    ******************************************************************************/

    [!IF "EthGeneral/EthVendorSpecific/EthPfeMultiInstance = 'false' or EthGeneral/EthVendorSpecific/EthPfeSlaveMode = 'false'"!][!// classifier firmware for standalone driver or master driver
    [!IF "EthGeneral/EthVendorSpecific/PfeClassFwLoadFrom = 'PfeClassFwArrayLabel'"!]
    [!CODE!]
    #define PFE_CLASS_FW_BINARY [!"EthGeneral/EthVendorSpecific/PfeClassFwArrayLabel"!]
    extern uint8_t PFE_CLASS_FW_BINARY[];
    [!ENDCODE!]
    [!ENDIF!]
    [!IF "EthGeneral/EthVendorSpecific/PfeClassFwLoadFrom = 'PfeClassFwMemoryAddress'"!]
    [!CODE!]
    #define PFE_CLASS_FW_BINARY ((const void*)0x[!"EthGeneral/EthVendorSpecific/PfeClassFwMemoryAddress"!])
    [!ENDCODE!]
    [!ENDIF!]
    [!ELSE!][!// no classifier firmware is need for slave driver
    #define PFE_CLASS_FW_BINARY NULL_PTR
    [!ENDIF!]

    /******************************************************************************
    *   Slave Dem Error Detection
    ******************************************************************************/
    [!IF "node:exists(EthGeneral/EthVendorSpecific/EthSlaveDemEventParameterRefs/ETH_E_DETECT_IP_READY) and node:refvalid(EthGeneral/EthVendorSpecific/EthSlaveDemEventParameterRefs/ETH_E_DETECT_IP_READY)"!]
      [!VAR "EthDemDetectIpReadyEventId" ="concat('DemConf_DemEventParameter_',node:ref(EthGeneral/EthVendorSpecific/EthSlaveDemEventParameterRefs/ETH_E_DETECT_IP_READY)/@name)"!]
    [!ELSE!]
      [!VAR "EthDemDetectIpReadyEventId" ="num:i(0)"!]
    [!ENDIF!]

    [!IF "EthGeneral/EthVendorSpecific/EthDisableDemEventDetect = 'false' and EthGeneral/EthVendorSpecific/EthPfeSlaveMode = 'true'"!][!//
    #define ETH_E_DETECT_IP_READY_EVENT_ID    [!"$EthDemDetectIpReadyEventId"!]
    [!ENDIF!][!//

#define ETH_43_PFE_ENABLE_USER_MODE_SUPPORT              ([!IF "EthGeneral/EthVendorSpecific/EthEnableUserModeSupport"!]STD_ON[!ELSE!]STD_OFF[!ENDIF!])
#ifndef MCAL_ENABLE_USER_MODE_SUPPORT
        #if (STD_ON == ETH_43_PFE_ENABLE_USER_MODE_SUPPORT)
            #error MCAL_ENABLE_USER_MODE_SUPPORT is not enabled. For running ETH_43_PFE in user mode, MCAL_ENABLE_USER_MODE_SUPPORT needs to be defined.
        #endif /* (STD_ON == ETH_43_PFE_ENABLE_USER_MODE_SUPPORT */
#endif /*MCAL_ENABLE_USER_MODE_SUPPORT*/

    /******************************************************************************
    *   ECC Dem Error Detection
    ******************************************************************************/
[!IF "EthGeneral/EthVendorSpecific/EthDisableDemEventDetect = 'false'"!][!//
#if STD_ON == ETH_43_PFE_DEM_EVENT_DETECT
    [!IF "node:exists(EthGeneral/EthVendorSpecific/EthEccDemEventParameterRefs/ETH_E_ECC_ERR) and node:refvalid(EthGeneral/EthVendorSpecific/EthEccDemEventParameterRefs/ETH_E_ECC_ERR)"!]
      [!VAR "EthDemDetectECCError" ="concat('DemConf_DemEventParameter_',node:ref(EthGeneral/EthVendorSpecific/EthEccDemEventParameterRefs/ETH_E_ECC_ERR)/@name)"!]
    [!ELSE!]
      [!VAR "EthDemDetectECCError" ="num:i(2)"!]
    [!ENDIF!]
    #define ETH_43_PFE_CFG_DEM_E_ECC_ERR            [!"$EthDemDetectECCError"!]
#endif /* ETH_43_PFE_DEM_EVENT_DETECT */
[!ENDIF!][!//
    /******************************************************************************
    *   WDT Dem Error Detection
    ******************************************************************************/
[!IF "EthGeneral/EthVendorSpecific/EthDisableDemEventDetect = 'false'"!][!//
#if STD_ON == ETH_43_PFE_DEM_EVENT_DETECT
    [!IF "node:exists(EthGeneral/EthVendorSpecific/EthWdtDemEventParameterRefs/ETH_E_WDT_BMU1_ERR) and node:refvalid(EthGeneral/EthVendorSpecific/EthWdtDemEventParameterRefs/ETH_E_WDT_BMU1_ERR)"!]
      [!VAR "EthDemDetectWdtBmu1Error" ="concat('DemConf_DemEventParameter_',node:ref(EthGeneral/EthVendorSpecific/EthWdtDemEventParameterRefs/ETH_E_WDT_BMU1_ERR)/@name)"!]
    [!ELSE!]
      [!VAR "EthDemDetectWdtBmu1Error" ="num:i(10)"!]
    [!ENDIF!]
    [!IF "node:exists(EthGeneral/EthVendorSpecific/EthWdtDemEventParameterRefs/ETH_E_WDT_BMU2_ERR) and node:refvalid(EthGeneral/EthVendorSpecific/EthWdtDemEventParameterRefs/ETH_E_WDT_BMU2_ERR)"!]
      [!VAR "EthDemDetectWdtBmu2Error" ="concat('DemConf_DemEventParameter_',node:ref(EthGeneral/EthVendorSpecific/EthWdtDemEventParameterRefs/ETH_E_WDT_BMU2_ERR)/@name)"!]
    [!ELSE!]
      [!VAR "EthDemDetectWdtBmu2Error" ="num:i(11)"!]
    [!ENDIF!]
    [!IF "node:exists(EthGeneral/EthVendorSpecific/EthWdtDemEventParameterRefs/ETH_E_WDT_CLASS_ERR) and node:refvalid(EthGeneral/EthVendorSpecific/EthWdtDemEventParameterRefs/ETH_E_WDT_CLASS_ERR)"!]
      [!VAR "EthDemDetectWdtClassError" ="concat('DemConf_DemEventParameter_',node:ref(EthGeneral/EthVendorSpecific/EthWdtDemEventParameterRefs/ETH_E_WDT_CLASS_ERR)/@name)"!]
    [!ELSE!]
      [!VAR "EthDemDetectWdtClassError" ="num:i(12)"!]
    [!ENDIF!]
    [!IF "node:exists(EthGeneral/EthVendorSpecific/EthWdtDemEventParameterRefs/ETH_E_WDT_EMAC0_GPI_ERR) and node:refvalid(EthGeneral/EthVendorSpecific/EthWdtDemEventParameterRefs/ETH_E_WDT_EMAC0_GPI_ERR)"!]
      [!VAR "EthDemDetectWdtEmac0GpiError" ="concat('DemConf_DemEventParameter_',node:ref(EthGeneral/EthVendorSpecific/EthWdtDemEventParameterRefs/ETH_E_WDT_EMAC0_GPI_ERR)/@name)"!]
    [!ELSE!]
      [!VAR "EthDemDetectWdtEmac0GpiError" ="num:i(13)"!]
    [!ENDIF!]
    [!IF "node:exists(EthGeneral/EthVendorSpecific/EthWdtDemEventParameterRefs/ETH_E_WDT_EMAC1_GPI_ERR) and node:refvalid(EthGeneral/EthVendorSpecific/EthWdtDemEventParameterRefs/ETH_E_WDT_EMAC1_GPI_ERR)"!]
      [!VAR "EthDemDetectWdtEmac1GpiError" ="concat('DemConf_DemEventParameter_',node:ref(EthGeneral/EthVendorSpecific/EthWdtDemEventParameterRefs/ETH_E_WDT_EMAC1_GPI_ERR)/@name)"!]
    [!ELSE!]
      [!VAR "EthDemDetectWdtEmac1GpiError" ="num:i(14)"!]
    [!ENDIF!]
    [!IF "node:exists(EthGeneral/EthVendorSpecific/EthWdtDemEventParameterRefs/ETH_E_WDT_EMAC2_GPI_ERR) and node:refvalid(EthGeneral/EthVendorSpecific/EthWdtDemEventParameterRefs/ETH_E_WDT_EMAC2_GPI_ERR)"!]
      [!VAR "EthDemDetectWdtEmac2GpiError" ="concat('DemConf_DemEventParameter_',node:ref(EthGeneral/EthVendorSpecific/EthWdtDemEventParameterRefs/ETH_E_WDT_EMAC2_GPI_ERR)/@name)"!]
    [!ELSE!]
      [!VAR "EthDemDetectWdtEmac2GpiError" ="num:i(15)"!]
    [!ENDIF!]
    [!IF "node:exists(EthGeneral/EthVendorSpecific/EthWdtDemEventParameterRefs/ETH_E_WDT_HIF_GPI_ERR) and node:refvalid(EthGeneral/EthVendorSpecific/EthWdtDemEventParameterRefs/ETH_E_WDT_HIF_GPI_ERR)"!]
      [!VAR "EthDemDetectWdtHifGpiError" ="concat('DemConf_DemEventParameter_',node:ref(EthGeneral/EthVendorSpecific/EthWdtDemEventParameterRefs/ETH_E_WDT_HIF_GPI_ERR)/@name)"!]
    [!ELSE!]
      [!VAR "EthDemDetectWdtHifGpiError" ="num:i(16)"!]
    [!ENDIF!]
    [!IF "node:exists(EthGeneral/EthVendorSpecific/EthWdtDemEventParameterRefs/ETH_E_WDT_HIF_NOCPY_ERR) and node:refvalid(EthGeneral/EthVendorSpecific/EthWdtDemEventParameterRefs/ETH_E_WDT_HIF_NOCPY_ERR)"!]
      [!VAR "EthDemDetectWdtHifNocpyError" ="concat('DemConf_DemEventParameter_',node:ref(EthGeneral/EthVendorSpecific/EthWdtDemEventParameterRefs/ETH_E_WDT_HIF_NOCPY_ERR)/@name)"!]
    [!ELSE!]
      [!VAR "EthDemDetectWdtHifNocpyError" ="num:i(17)"!]
    [!ENDIF!]
    [!IF "node:exists(EthGeneral/EthVendorSpecific/EthWdtDemEventParameterRefs/ETH_E_WDT_HIF_ERR) and node:refvalid(EthGeneral/EthVendorSpecific/EthWdtDemEventParameterRefs/ETH_E_WDT_HIF_ERR)"!]
      [!VAR "EthDemDetectWdtHifError" ="concat('DemConf_DemEventParameter_',node:ref(EthGeneral/EthVendorSpecific/EthWdtDemEventParameterRefs/ETH_E_WDT_HIF_ERR)/@name)"!]
    [!ELSE!]
      [!VAR "EthDemDetectWdtHifError" ="num:i(18)"!]
    [!ENDIF!]
    [!IF "node:exists(EthGeneral/EthVendorSpecific/EthWdtDemEventParameterRefs/ETH_E_WDT_TLITE_ERR) and node:refvalid(EthGeneral/EthVendorSpecific/EthWdtDemEventParameterRefs/ETH_E_WDT_TLITE_ERR)"!]
      [!VAR "EthDemDetectWdtTliteError" ="concat('DemConf_DemEventParameter_',node:ref(EthGeneral/EthVendorSpecific/EthWdtDemEventParameterRefs/ETH_E_WDT_TLITE_ERR)/@name)"!]
    [!ELSE!]
      [!VAR "EthDemDetectWdtTliteError" ="num:i(19)"!]
    [!ENDIF!]
    [!IF "node:exists(EthGeneral/EthVendorSpecific/EthWdtDemEventParameterRefs/ETH_E_WDT_UTIL_PE_ERR) and node:refvalid(EthGeneral/EthVendorSpecific/EthWdtDemEventParameterRefs/ETH_E_WDT_UTIL_PE_ERR)"!]
      [!VAR "EthDemDetectWdtUtilPeError" ="concat('DemConf_DemEventParameter_',node:ref(EthGeneral/EthVendorSpecific/EthWdtDemEventParameterRefs/ETH_E_WDT_UTIL_PE_ERR)/@name)"!]
    [!ELSE!]
      [!VAR "EthDemDetectWdtUtilPeError" ="num:i(20)"!]
    [!ENDIF!]
    [!IF "node:exists(EthGeneral/EthVendorSpecific/EthWdtDemEventParameterRefs/ETH_E_WDT_EMAC0_ETGPI_ERR) and node:refvalid(EthGeneral/EthVendorSpecific/EthWdtDemEventParameterRefs/ETH_E_WDT_EMAC0_ETGPI_ERR)"!]
      [!VAR "EthDemDetectWdtEmac0EtgpiError" ="concat('DemConf_DemEventParameter_',node:ref(EthGeneral/EthVendorSpecific/EthWdtDemEventParameterRefs/ETH_E_WDT_EMAC0_ETGPI_ERR)/@name)"!]
    [!ELSE!]
      [!VAR "EthDemDetectWdtEmac0EtgpiError" ="num:i(21)"!]
    [!ENDIF!]
    [!IF "node:exists(EthGeneral/EthVendorSpecific/EthWdtDemEventParameterRefs/ETH_E_WDT_EMAC1_ETGPI_ERR) and node:refvalid(EthGeneral/EthVendorSpecific/EthWdtDemEventParameterRefs/ETH_E_WDT_EMAC1_ETGPI_ERR)"!]
      [!VAR "EthDemDetectWdtEmac1EtgpiError" ="concat('DemConf_DemEventParameter_',node:ref(EthGeneral/EthVendorSpecific/EthWdtDemEventParameterRefs/ETH_E_WDT_EMAC1_ETGPI_ERR)/@name)"!]
    [!ELSE!]
      [!VAR "EthDemDetectWdtEmac1EtgpiError" ="num:i(22)"!]
    [!ENDIF!]
    [!IF "node:exists(EthGeneral/EthVendorSpecific/EthWdtDemEventParameterRefs/ETH_E_WDT_EMAC2_ETGPI_ERR) and node:refvalid(EthGeneral/EthVendorSpecific/EthWdtDemEventParameterRefs/ETH_E_WDT_EMAC2_ETGPI_ERR)"!]
      [!VAR "EthDemDetectWdtEmac2EtgpiError" ="concat('DemConf_DemEventParameter_',node:ref(EthGeneral/EthVendorSpecific/EthWdtDemEventParameterRefs/ETH_E_WDT_EMAC2_ETGPI_ERR)/@name)"!]
    [!ELSE!]
      [!VAR "EthDemDetectWdtEmac2EtgpiError" ="num:i(23)"!]
    [!ENDIF!]
    [!IF "node:exists(EthGeneral/EthVendorSpecific/EthWdtDemEventParameterRefs/ETH_E_WDT_EXT_GPT1_ERR) and node:refvalid(EthGeneral/EthVendorSpecific/EthWdtDemEventParameterRefs/ETH_E_WDT_EXT_GPT1_ERR)"!]
      [!VAR "EthDemDetectWdtExtGpt1Error" ="concat('DemConf_DemEventParameter_',node:ref(EthGeneral/EthVendorSpecific/EthWdtDemEventParameterRefs/ETH_E_WDT_EXT_GPT1_ERR)/@name)"!]
    [!ELSE!]
      [!VAR "EthDemDetectWdtExtGpt1Error" ="num:i(24)"!]
    [!ENDIF!]
    [!IF "node:exists(EthGeneral/EthVendorSpecific/EthWdtDemEventParameterRefs/ETH_43_PFE_CFG_DEM_E_WDT_EXT_GPT2_ERR) and node:refvalid(EthGeneral/EthVendorSpecific/EthWdtDemEventParameterRefs/ETH_43_PFE_CFG_DEM_E_WDT_EXT_GPT2_ERR)"!]
      [!VAR "EthDemDetectWdtExtGpt2Error" ="concat('DemConf_DemEventParameter_',node:ref(EthGeneral/EthVendorSpecific/EthWdtDemEventParameterRefs/ETH_43_PFE_CFG_DEM_E_WDT_EXT_GPT2_ERR)/@name)"!]
    [!ELSE!]
      [!VAR "EthDemDetectWdtExtGpt2Error" ="num:i(25)"!]
    [!ENDIF!]
    [!IF "node:exists(EthGeneral/EthVendorSpecific/EthWdtDemEventParameterRefs/ETH_E_WDT_LMEM_ERR) and node:refvalid(EthGeneral/EthVendorSpecific/EthWdtDemEventParameterRefs/ETH_E_WDT_LMEM_ERR)"!]
      [!VAR "EthDemDetectWdtLmemError" ="concat('DemConf_DemEventParameter_',node:ref(EthGeneral/EthVendorSpecific/EthWdtDemEventParameterRefs/ETH_E_WDT_LMEM_ERR)/@name)"!]
    [!ELSE!]
      [!VAR "EthDemDetectWdtLmemError" ="num:i(26)"!]
    [!ENDIF!]
    [!IF "node:exists(EthGeneral/EthVendorSpecific/EthWdtDemEventParameterRefs/ETH_E_WDT_ROUTE_LMEM_ERR) and node:refvalid(EthGeneral/EthVendorSpecific/EthWdtDemEventParameterRefs/ETH_E_WDT_ROUTE_LMEM_ERR)"!]
      [!VAR "EthDemDetectWdtRouteLmemError" ="concat('DemConf_DemEventParameter_',node:ref(EthGeneral/EthVendorSpecific/EthWdtDemEventParameterRefs/ETH_E_WDT_ROUTE_LMEM_ERR)/@name)"!]
    [!ELSE!]
      [!VAR "EthDemDetectWdtRouteLmemError" ="num:i(27)"!]
    [!ENDIF!]
    #define ETH_43_PFE_CFG_DEM_E_WDT_BMU1_ERR                    [!"$EthDemDetectWdtBmu1Error"!]
    #define ETH_43_PFE_CFG_DEM_E_WDT_BMU2_ERR                    [!"$EthDemDetectWdtBmu2Error"!]
    #define ETH_43_PFE_CFG_DEM_E_WDT_CLASS_ERR                   [!"$EthDemDetectWdtClassError"!]
    #define ETH_43_PFE_CFG_DEM_E_WDT_EMAC0_GPI_ERR               [!"$EthDemDetectWdtEmac0GpiError"!]
    #define ETH_43_PFE_CFG_DEM_E_WDT_EMAC1_GPI_ERR               [!"$EthDemDetectWdtEmac1GpiError"!]
    #define ETH_43_PFE_CFG_DEM_E_WDT_EMAC2_GPI_ERR               [!"$EthDemDetectWdtEmac2GpiError"!]
    #define ETH_43_PFE_CFG_DEM_E_WDT_HIF_GPI_ERR                 [!"$EthDemDetectWdtHifGpiError"!]
    #define ETH_43_PFE_CFG_DEM_E_WDT_HIF_NOCPY_ERR               [!"$EthDemDetectWdtHifNocpyError"!]
    #define ETH_43_PFE_CFG_DEM_E_WDT_HIF_ERR                     [!"$EthDemDetectWdtHifError"!]
    #define ETH_43_PFE_CFG_DEM_E_WDT_TLITE_ERR                   [!"$EthDemDetectWdtTliteError"!]
    #define ETH_43_PFE_CFG_DEM_E_WDT_UTIL_PE_ERR                 [!"$EthDemDetectWdtUtilPeError"!]
    #define ETH_43_PFE_CFG_DEM_E_WDT_EMAC0_ETGPI_ERR             [!"$EthDemDetectWdtEmac0EtgpiError"!]
    #define ETH_43_PFE_CFG_DEM_E_WDT_EMAC1_ETGPI_ERR             [!"$EthDemDetectWdtEmac1EtgpiError"!]
    #define ETH_43_PFE_CFG_DEM_E_WDT_EMAC2_ETGPI_ERR             [!"$EthDemDetectWdtEmac2EtgpiError"!]
    #define ETH_43_PFE_CFG_DEM_E_WDT_EXT_GPT1_ERR                [!"$EthDemDetectWdtExtGpt1Error"!]
    #define ETH_43_PFE_CFG_DEM_E_WDT_EXT_GPT2_ERR                [!"$EthDemDetectWdtExtGpt2Error"!]
    #define ETH_43_PFE_CFG_DEM_E_WDT_LMEM_ERR                    [!"$EthDemDetectWdtLmemError"!]
    #define ETH_43_PFE_CFG_DEM_E_WDT_ROUTE_LMEM_ERR              [!"$EthDemDetectWdtRouteLmemError"!]
#endif /* ETH_43_PFE_DEM_EVENT_DETECT */
[!ENDIF!][!//
    /******************************************************************************
    *   EMAC Dem Error Detection
    ******************************************************************************/
[!IF "EthGeneral/EthVendorSpecific/EthDisableDemEventDetect = 'false'"!][!//
#if STD_ON == ETH_43_PFE_DEM_EVENT_DETECT
    [!IF "node:exists(EthGeneral/EthVendorSpecific/EthEmacDemEventParameterRefs/ETH_E_EMAC_ECC_TX_FIFO_CORRECTABLE_ERR) and node:refvalid(EthGeneral/EthVendorSpecific/EthEmacDemEventParameterRefs/ETH_E_EMAC_ECC_TX_FIFO_CORRECTABLE_ERR)"!]
      [!VAR "EthDemDetectEmacEccTxFifoCorrectableError" ="concat('DemConf_DemEventParameter_',node:ref(EthGeneral/EthVendorSpecific/EthEmacDemEventParameterRefs/ETH_E_EMAC_ECC_TX_FIFO_CORRECTABLE_ERR)/@name)"!]
    [!ELSE!]
      [!VAR "EthDemDetectEmacEccTxFifoCorrectableError" ="num:i(30)"!]
    [!ENDIF!]
    [!IF "node:exists(EthGeneral/EthVendorSpecific/EthEmacDemEventParameterRefs/ETH_E_EMAC_ECC_TX_FIFO_UNCORRECTABLE_ERR) and node:refvalid(EthGeneral/EthVendorSpecific/EthEmacDemEventParameterRefs/ETH_E_EMAC_ECC_TX_FIFO_UNCORRECTABLE_ERR)"!]
      [!VAR "EthDemDetectEmacEccTxFifoUncorrectableError" ="concat('DemConf_DemEventParameter_',node:ref(EthGeneral/EthVendorSpecific/EthEmacDemEventParameterRefs/ETH_E_EMAC_ECC_TX_FIFO_UNCORRECTABLE_ERR)/@name)"!]
    [!ELSE!]
      [!VAR "EthDemDetectEmacEccTxFifoUncorrectableError" ="num:i(31)"!]
    [!ENDIF!]
    [!IF "node:exists(EthGeneral/EthVendorSpecific/EthEmacDemEventParameterRefs/ETH_E_EMAC_ECC_TX_FIFO_ADDRESS_ERR) and node:refvalid(EthGeneral/EthVendorSpecific/EthEmacDemEventParameterRefs/ETH_E_EMAC_ECC_TX_FIFO_ADDRESS_ERR)"!]
      [!VAR "EthDemDetectEmacEccTxFifoAddressError" ="concat('DemConf_DemEventParameter_',node:ref(EthGeneral/EthVendorSpecific/EthEmacDemEventParameterRefs/ETH_E_EMAC_ECC_TX_FIFO_ADDRESS_ERR)/@name)"!]
    [!ELSE!]
      [!VAR "EthDemDetectEmacEccTxFifoAddressError" ="num:i(32)"!]
    [!ENDIF!]
    [!IF "node:exists(EthGeneral/EthVendorSpecific/EthEmacDemEventParameterRefs/ETH_E_EMAC_ECC_RX_FIFO_CORRECTABLE_ERR) and node:refvalid(EthGeneral/EthVendorSpecific/EthEmacDemEventParameterRefs/ETH_E_EMAC_ECC_RX_FIFO_CORRECTABLE_ERR)"!]
      [!VAR "EthDemDetectEmacEccRxFifoCorrectableError" ="concat('DemConf_DemEventParameter_',node:ref(EthGeneral/EthVendorSpecific/EthEmacDemEventParameterRefs/ETH_E_EMAC_ECC_RX_FIFO_CORRECTABLE_ERR)/@name)"!]
    [!ELSE!]
      [!VAR "EthDemDetectEmacEccRxFifoCorrectableError" ="num:i(33)"!]
    [!ENDIF!]
    [!IF "node:exists(EthGeneral/EthVendorSpecific/EthEmacDemEventParameterRefs/ETH_E_EMAC_ECC_RX_FIFO_UNCORRECTABLE_ERR) and node:refvalid(EthGeneral/EthVendorSpecific/EthEmacDemEventParameterRefs/ETH_E_EMAC_ECC_RX_FIFO_UNCORRECTABLE_ERR)"!]
      [!VAR "EthDemDetectEmacEccRxFifoUncorrectableError" ="concat('DemConf_DemEventParameter_',node:ref(EthGeneral/EthVendorSpecific/EthEmacDemEventParameterRefs/ETH_E_EMAC_ECC_RX_FIFO_UNCORRECTABLE_ERR)/@name)"!]
    [!ELSE!]
      [!VAR "EthDemDetectEmacEccRxFifoUncorrectableError" ="num:i(34)"!]
    [!ENDIF!]
    [!IF "node:exists(EthGeneral/EthVendorSpecific/EthEmacDemEventParameterRefs/ETH_E_EMAC_ECC_RX_FIFO_ADDRESS_ERR) and node:refvalid(EthGeneral/EthVendorSpecific/EthEmacDemEventParameterRefs/ETH_E_EMAC_ECC_TX_FIFO_CORRECTABLE_ERR)"!]
      [!VAR "EthDemDetectEmacEccRxFifoAddressError" ="concat('DemConf_DemEventParameter_',node:ref(EthGeneral/EthVendorSpecific/EthEmacDemEventParameterRefs/ETH_E_EMAC_ECC_TX_FIFO_CORRECTABLE_ERR)/@name)"!]
    [!ELSE!]
      [!VAR "EthDemDetectEmacEccRxFifoAddressError" ="num:i(35)"!]
    [!ENDIF!]
    [!IF "node:exists(EthGeneral/EthVendorSpecific/EthEmacDemEventParameterRefs/ETH_E_EMAC_APP_TX_PARITY_ERR) and node:refvalid(EthGeneral/EthVendorSpecific/EthEmacDemEventParameterRefs/ETH_E_EMAC_APP_TX_PARITY_ERR)"!]
      [!VAR "EthDemDetectEmacAppTxParityError" ="concat('DemConf_DemEventParameter_',node:ref(EthGeneral/EthVendorSpecific/EthEmacDemEventParameterRefs/ETH_E_EMAC_APP_TX_PARITY_ERR)/@name)"!]
    [!ELSE!]
      [!VAR "EthDemDetectEmacAppTxParityError" ="num:i(36)"!]
    [!ENDIF!]
    [!IF "node:exists(EthGeneral/EthVendorSpecific/EthEmacDemEventParameterRefs/ETH_E_EMAC_APP_RX_PARITY_ERR) and node:refvalid(EthGeneral/EthVendorSpecific/EthEmacDemEventParameterRefs/ETH_E_EMAC_APP_RX_PARITY_ERR)"!]
      [!VAR "EthDemDetectEmacAppRxParityError" ="concat('DemConf_DemEventParameter_',node:ref(EthGeneral/EthVendorSpecific/EthEmacDemEventParameterRefs/ETH_E_EMAC_APP_RX_PARITY_ERR)/@name)"!]
    [!ELSE!]
      [!VAR "EthDemDetectEmacAppRxParityError" ="num:i(37)"!]
    [!ENDIF!]
    [!IF "node:exists(EthGeneral/EthVendorSpecific/EthEmacDemEventParameterRefs/ETH_E_EMAC_MTL_PARITY_ERR) and node:refvalid(EthGeneral/EthVendorSpecific/EthEmacDemEventParameterRefs/ETH_E_EMAC_MTL_PARITY_ERR)"!]
      [!VAR "EthDemDetectEmacMtlParityError" ="concat('DemConf_DemEventParameter_',node:ref(EthGeneral/EthVendorSpecific/EthEmacDemEventParameterRefs/ETH_E_EMAC_MTL_PARITY_ERR)/@name)"!]
    [!ELSE!]
      [!VAR "EthDemDetectEmacMtlParityError" ="num:i(38)"!]
    [!ENDIF!]
    [!IF "node:exists(EthGeneral/EthVendorSpecific/EthEmacDemEventParameterRefs/ETH_E_EMAC_FSM_PARITY_ERR) and node:refvalid(EthGeneral/EthVendorSpecific/EthEmacDemEventParameterRefs/ETH_E_EMAC_FSM_PARITY_ERR)"!]
      [!VAR "EthDemDetectEmacFsmParityError" ="concat('DemConf_DemEventParameter_',node:ref(EthGeneral/EthVendorSpecific/EthEmacDemEventParameterRefs/ETH_E_EMAC_FSM_PARITY_ERR)/@name)"!]
    [!ELSE!]
      [!VAR "EthDemDetectEmacFsmParityError" ="num:i(39)"!]
    [!ENDIF!]
    [!IF "node:exists(EthGeneral/EthVendorSpecific/EthEmacDemEventParameterRefs/ETH_E_EMAC_FSM_TX_TIMEOUT_ERR) and node:refvalid(EthGeneral/EthVendorSpecific/EthEmacDemEventParameterRefs/ETH_E_EMAC_FSM_TX_TIMEOUT_ERR)"!]
      [!VAR "EthDemDetectEmacFsmTxTimeoutError" ="concat('DemConf_DemEventParameter_',node:ref(EthGeneral/EthVendorSpecific/EthEmacDemEventParameterRefs/ETH_E_EMAC_FSM_TX_TIMEOUT_ERR)/@name)"!]
    [!ELSE!]
      [!VAR "EthDemDetectEmacFsmTxTimeoutError" ="num:i(40)"!]
    [!ENDIF!]
    [!IF "node:exists(EthGeneral/EthVendorSpecific/EthEmacDemEventParameterRefs/ETH_E_EMAC_FSM_RX_TIMEOUT_ERR) and node:refvalid(EthGeneral/EthVendorSpecific/EthEmacDemEventParameterRefs/ETH_E_EMAC_FSM_RX_TIMEOUT_ERR)"!]
      [!VAR "EthDemDetectEmacFsmRxTimeoutError" ="concat('DemConf_DemEventParameter_',node:ref(EthGeneral/EthVendorSpecific/EthEmacDemEventParameterRefs/ETH_E_EMAC_FSM_RX_TIMEOUT_ERR)/@name)"!]
    [!ELSE!]
      [!VAR "EthDemDetectEmacFsmRxTimeoutError" ="num:i(41)"!]
    [!ENDIF!]
    [!IF "node:exists(EthGeneral/EthVendorSpecific/EthEmacDemEventParameterRefs/ETH_E_EMAC_FSM_APP_TIMEOUT_ERR) and node:refvalid(EthGeneral/EthVendorSpecific/EthEmacDemEventParameterRefs/ETH_E_EMAC_FSM_APP_TIMEOUT_ERR)"!]
      [!VAR "EthDemDetectEmacFsmAppTimeoutError" ="concat('DemConf_DemEventParameter_',node:ref(EthGeneral/EthVendorSpecific/EthEmacDemEventParameterRefs/ETH_E_EMAC_FSM_APP_TIMEOUT_ERR)/@name)"!]
    [!ELSE!]
      [!VAR "EthDemDetectEmacFsmAppTimeoutError" ="num:i(42)"!]
    [!ENDIF!]
    [!IF "node:exists(EthGeneral/EthVendorSpecific/EthEmacDemEventParameterRefs/ETH_E_EMAC_FSM_PTP_TIMEOUT_ERR) and node:refvalid(EthGeneral/EthVendorSpecific/EthEmacDemEventParameterRefs/ETH_E_EMAC_FSM_PTP_TIMEOUT_ERR)"!]
      [!VAR "EthDemDetectEmacFsmPtpTimeoutError" ="concat('DemConf_DemEventParameter_',node:ref(EthGeneral/EthVendorSpecific/EthEmacDemEventParameterRefs/ETH_E_EMAC_FSM_PTP_TIMEOUT_ERR)/@name)"!]
    [!ELSE!]
      [!VAR "EthDemDetectEmacFsmPtpTimeoutError" ="num:i(43)"!]
    [!ENDIF!]
    [!IF "node:exists(EthGeneral/EthVendorSpecific/EthEmacDemEventParameterRefs/ETH_E_EMAC_MASTER_TIMEOUT_ERR) and node:refvalid(EthGeneral/EthVendorSpecific/EthEmacDemEventParameterRefs/ETH_E_EMAC_MASTER_TIMEOUT_ERR)"!]
      [!VAR "EthDemDetectEmacMasterError" ="concat('DemConf_DemEventParameter_',node:ref(EthGeneral/EthVendorSpecific/EthEmacDemEventParameterRefs/ETH_E_EMAC_MASTER_TIMEOUT_ERR)/@name)"!]
    [!ELSE!]
      [!VAR "EthDemDetectEmacMasterError" ="num:i(44)"!]
    [!ENDIF!]
    #define ETH_43_PFE_CFG_DEM_E_EMAC_ECC_TX_FIFO_CORRECTABLE_ERR               [!"$EthDemDetectEmacEccTxFifoCorrectableError"!]
    #define ETH_43_PFE_CFG_DEM_E_EMAC_ECC_TX_FIFO_UNCORRECTABLE_ERR             [!"$EthDemDetectEmacEccTxFifoUncorrectableError"!]
    #define ETH_43_PFE_CFG_DEM_E_EMAC_ECC_TX_FIFO_ADDRESS_ERR                   [!"$EthDemDetectEmacEccTxFifoAddressError"!]
    #define ETH_43_PFE_CFG_DEM_E_EMAC_ECC_RX_FIFO_CORRECTABLE_ERR               [!"$EthDemDetectEmacEccRxFifoCorrectableError"!]
    #define ETH_43_PFE_CFG_DEM_E_EMAC_ECC_RX_FIFO_UNCORRECTABLE_ERR             [!"$EthDemDetectEmacEccRxFifoUncorrectableError"!]
    #define ETH_43_PFE_CFG_DEM_E_EMAC_ECC_RX_FIFO_ADDRESS_ERR                   [!"$EthDemDetectEmacEccRxFifoAddressError"!]
    #define ETH_43_PFE_CFG_DEM_E_EMAC_APP_TX_PARITY_ERR                         [!"$EthDemDetectEmacAppTxParityError"!]
    #define ETH_43_PFE_CFG_DEM_E_EMAC_APP_RX_PARITY_ERR                         [!"$EthDemDetectEmacAppRxParityError"!]
    #define ETH_43_PFE_CFG_DEM_E_EMAC_MTL_PARITY_ERR                            [!"$EthDemDetectEmacMtlParityError"!]
    #define ETH_43_PFE_CFG_DEM_E_EMAC_FSM_PARITY_ERR                            [!"$EthDemDetectEmacFsmParityError"!]
    #define ETH_43_PFE_CFG_DEM_E_EMAC_FSM_TX_TIMEOUT_ERR                        [!"$EthDemDetectEmacFsmTxTimeoutError"!]
    #define ETH_43_PFE_CFG_DEM_E_EMAC_FSM_RX_TIMEOUT_ERR                        [!"$EthDemDetectEmacFsmRxTimeoutError"!]
    #define ETH_43_PFE_CFG_DEM_E_EMAC_FSM_APP_TIMEOUT_ERR                       [!"$EthDemDetectEmacFsmAppTimeoutError"!]
    #define ETH_43_PFE_CFG_DEM_E_EMAC_FSM_PTP_TIMEOUT_ERR                       [!"$EthDemDetectEmacFsmPtpTimeoutError"!]
    #define ETH_43_PFE_CFG_DEM_E_EMAC_MASTER_TIMEOUT_ERR                        [!"$EthDemDetectEmacMasterError"!]
#endif /* ETH_43_PFE_DEM_EVENT_DETECT */
[!ENDIF!][!//
    /******************************************************************************
    *   BUS Dem Error Detection
    ******************************************************************************/
[!IF "EthGeneral/EthVendorSpecific/EthDisableDemEventDetect = 'false'"!][!//
#if STD_ON == ETH_43_PFE_DEM_EVENT_DETECT
    [!IF "node:exists(EthGeneral/EthVendorSpecific/EthBusDemEventParameterRefs/ETH_E_BUS_MASTER1_ERR) and node:refvalid(EthGeneral/EthVendorSpecific/EthBusDemEventParameterRefs/ETH_E_BUS_MASTER1_ERR)"!]
      [!VAR "EthDemDetectBusMaster1Error" ="concat('DemConf_DemEventParameter_',node:ref(EthGeneral/EthVendorSpecific/EthBusDemEventParameterRefs/ETH_E_BUS_MASTER1_ERR)/@name)"!]
    [!ELSE!]
      [!VAR "EthDemDetectBusMaster1Error" ="num:i(60)"!]
    [!ENDIF!]
    [!IF "node:exists(EthGeneral/EthVendorSpecific/EthBusDemEventParameterRefs/ETH_E_BUS_MASTER2_ERR) and node:refvalid(EthGeneral/EthVendorSpecific/EthBusDemEventParameterRefs/ETH_E_BUS_MASTER2_ERR)"!]
      [!VAR "EthDemDetectBusMaster2Error" ="concat('DemConf_DemEventParameter_',node:ref(EthGeneral/EthVendorSpecific/EthBusDemEventParameterRefs/ETH_E_BUS_MASTER2_ERR)/@name)"!]
    [!ELSE!]
      [!VAR "EthDemDetectBusMaster2Error" ="num:i(61)"!]
    [!ENDIF!]
    [!IF "node:exists(EthGeneral/EthVendorSpecific/EthBusDemEventParameterRefs/ETH_E_BUS_MASTER3_ERR) and node:refvalid(EthGeneral/EthVendorSpecific/EthBusDemEventParameterRefs/ETH_E_BUS_MASTER3_ERR)"!]
      [!VAR "EthDemDetectBusMaster3Error" ="concat('DemConf_DemEventParameter_',node:ref(EthGeneral/EthVendorSpecific/EthBusDemEventParameterRefs/ETH_E_BUS_MASTER3_ERR)/@name)"!]
    [!ELSE!]
      [!VAR "EthDemDetectBusMaster3Error" ="num:i(62)"!]
    [!ENDIF!]
    [!IF "node:exists(EthGeneral/EthVendorSpecific/EthBusDemEventParameterRefs/ETH_E_BUS_MASTER4_ERR) and node:refvalid(EthGeneral/EthVendorSpecific/EthBusDemEventParameterRefs/ETH_E_BUS_MASTER4_ERR)"!]
      [!VAR "EthDemDetectBusMaster4Error" ="concat('DemConf_DemEventParameter_',node:ref(EthGeneral/EthVendorSpecific/EthBusDemEventParameterRefs/ETH_E_BUS_MASTER4_ERR)/@name)"!]
    [!ELSE!]
      [!VAR "EthDemDetectBusMaster4Error" ="num:i(63)"!]
    [!ENDIF!]
    [!IF "node:exists(EthGeneral/EthVendorSpecific/EthBusDemEventParameterRefs/ETH_E_BUS_HGPI_READ_ERR) and node:refvalid(EthGeneral/EthVendorSpecific/EthBusDemEventParameterRefs/ETH_E_BUS_HGPI_READ_ERR)"!]
      [!VAR "EthDemDetectBusHgpiReadError" ="concat('DemConf_DemEventParameter_',node:ref(EthGeneral/EthVendorSpecific/EthBusDemEventParameterRefs/ETH_E_BUS_HGPI_READ_ERR)/@name)"!]
    [!ELSE!]
      [!VAR "EthDemDetectBusHgpiReadError" ="num:i(64)"!]
    [!ENDIF!]
    [!IF "node:exists(EthGeneral/EthVendorSpecific/EthBusDemEventParameterRefs/ETH_E_BUS_HGPI_WRITE_ERR) and node:refvalid(EthGeneral/EthVendorSpecific/EthBusDemEventParameterRefs/ETH_E_BUS_HGPI_WRITE_ERR)"!]
      [!VAR "EthDemDetectBusHgpiWriteError" ="concat('DemConf_DemEventParameter_',node:ref(EthGeneral/EthVendorSpecific/EthBusDemEventParameterRefs/ETH_E_BUS_HGPI_WRITE_ERR)/@name)"!]
    [!ELSE!]
      [!VAR "EthDemDetectBusHgpiWriteError" ="num:i(65)"!]
    [!ENDIF!]
    [!IF "node:exists(EthGeneral/EthVendorSpecific/EthBusDemEventParameterRefs/ETH_E_BUS_EMAC0_READ_ERR) and node:refvalid(EthGeneral/EthVendorSpecific/EthBusDemEventParameterRefs/ETH_E_BUS_EMAC0_READ_ERR)"!]
      [!VAR "EthDemDetectBusEmac0ReadError" ="concat('DemConf_DemEventParameter_',node:ref(EthGeneral/EthVendorSpecific/EthBusDemEventParameterRefs/ETH_E_BUS_EMAC0_READ_ERR)/@name)"!]
    [!ELSE!]
      [!VAR "EthDemDetectBusEmac0ReadError" ="num:i(66)"!]
    [!ENDIF!]
    [!IF "node:exists(EthGeneral/EthVendorSpecific/EthBusDemEventParameterRefs/ETH_E_BUS_EMAC0_WRITE_ERR) and node:refvalid(EthGeneral/EthVendorSpecific/EthBusDemEventParameterRefs/ETH_E_BUS_EMAC0_WRITE_ERR)"!]
      [!VAR "EthDemDetectBusEmac0WriteError" ="concat('DemConf_DemEventParameter_',node:ref(EthGeneral/EthVendorSpecific/EthBusDemEventParameterRefs/ETH_E_BUS_EMAC0_WRITE_ERR)/@name)"!]
    [!ELSE!]
      [!VAR "EthDemDetectBusEmac0WriteError" ="num:i(67)"!]
    [!ENDIF!]
    [!IF "node:exists(EthGeneral/EthVendorSpecific/EthBusDemEventParameterRefs/ETH_E_BUS_EMAC1_READ_ERR) and node:refvalid(EthGeneral/EthVendorSpecific/EthBusDemEventParameterRefs/ETH_E_BUS_EMAC1_READ_ERR)"!]
      [!VAR "EthDemDetectBusEmac1ReadError" ="concat('DemConf_DemEventParameter_',node:ref(EthGeneral/EthVendorSpecific/EthBusDemEventParameterRefs/ETH_E_BUS_EMAC1_READ_ERR)/@name)"!]
    [!ELSE!]
      [!VAR "EthDemDetectBusEmac1ReadError" ="num:i(68)"!]
    [!ENDIF!]
    [!IF "node:exists(EthGeneral/EthVendorSpecific/EthBusDemEventParameterRefs/ETH_E_BUS_EMAC1_WRITE_ERR) and node:refvalid(EthGeneral/EthVendorSpecific/EthBusDemEventParameterRefs/ETH_E_BUS_EMAC1_WRITE_ERR)"!]
      [!VAR "EthDemDetectBusEmac1WriteError" ="concat('DemConf_DemEventParameter_',node:ref(EthGeneral/EthVendorSpecific/EthBusDemEventParameterRefs/ETH_E_BUS_EMAC1_WRITE_ERR)/@name)"!]
    [!ELSE!]
      [!VAR "EthDemDetectBusEmac1WriteError" ="num:i(69)"!]
    [!ENDIF!]
    [!IF "node:exists(EthGeneral/EthVendorSpecific/EthBusDemEventParameterRefs/ETH_E_BUS_EMAC2_READ_ERR) and node:refvalid(EthGeneral/EthVendorSpecific/EthBusDemEventParameterRefs/ETH_E_BUS_EMAC2_READ_ERR)"!]
      [!VAR "EthDemDetectBusEmac2ReadError" ="concat('DemConf_DemEventParameter_',node:ref(EthGeneral/EthVendorSpecific/EthBusDemEventParameterRefs/ETH_E_BUS_EMAC2_READ_ERR)/@name)"!]
    [!ELSE!]
      [!VAR "EthDemDetectBusEmac2ReadError" ="num:i(70)"!]
    [!ENDIF!]
    [!IF "node:exists(EthGeneral/EthVendorSpecific/EthBusDemEventParameterRefs/ETH_E_BUS_EMAC2_WRITE_ERR) and node:refvalid(EthGeneral/EthVendorSpecific/EthBusDemEventParameterRefs/ETH_E_BUS_EMAC2_WRITE_ERR)"!]
      [!VAR "EthDemDetectBusEmac2WriteError" ="concat('DemConf_DemEventParameter_',node:ref(EthGeneral/EthVendorSpecific/EthBusDemEventParameterRefs/ETH_E_BUS_EMAC2_WRITE_ERR)/@name)"!]
    [!ELSE!]
      [!VAR "EthDemDetectBusEmac2WriteError" ="num:i(71)"!]
    [!ENDIF!]
    [!IF "node:exists(EthGeneral/EthVendorSpecific/EthBusDemEventParameterRefs/ETH_E_BUS_CLASS_READ_ERR) and node:refvalid(EthGeneral/EthVendorSpecific/EthBusDemEventParameterRefs/ETH_E_BUS_CLASS_READ_ERR)"!]
      [!VAR "EthDemDetectBusClassReadError" ="concat('DemConf_DemEventParameter_',node:ref(EthGeneral/EthVendorSpecific/EthBusDemEventParameterRefs/ETH_E_BUS_CLASS_READ_ERR)/@name)"!]
    [!ELSE!]
      [!VAR "EthDemDetectBusClassReadError" ="num:i(72)"!]
    [!ENDIF!]
    [!IF "node:exists(EthGeneral/EthVendorSpecific/EthBusDemEventParameterRefs/ETH_E_BUS_CLASS_WRITE_ERR) and node:refvalid(EthGeneral/EthVendorSpecific/EthBusDemEventParameterRefs/ETH_E_BUS_CLASS_WRITE_ERR)"!]
      [!VAR "EthDemDetectBusClassWriteError" ="concat('DemConf_DemEventParameter_',node:ref(EthGeneral/EthVendorSpecific/EthBusDemEventParameterRefs/ETH_E_BUS_CLASS_WRITE_ERR)/@name)"!]
    [!ELSE!]
      [!VAR "EthDemDetectBusClassWriteError" ="num:i(73)"!]
    [!ENDIF!]
    [!IF "node:exists(EthGeneral/EthVendorSpecific/EthBusDemEventParameterRefs/ETH_E_BUS_HIF_NOCPY_READ_ERR) and node:refvalid(EthGeneral/EthVendorSpecific/EthBusDemEventParameterRefs/ETH_E_BUS_HIF_NOCPY_READ_ERR)"!]
      [!VAR "EthDemDetectBusHifNocpyReadError" ="concat('DemConf_DemEventParameter_',node:ref(EthGeneral/EthVendorSpecific/EthBusDemEventParameterRefs/ETH_E_BUS_HIF_NOCPY_READ_ERR)/@name)"!]
    [!ELSE!]
      [!VAR "EthDemDetectBusHifNocpyReadError" ="num:i(74)"!]
    [!ENDIF!]
    [!IF "node:exists(EthGeneral/EthVendorSpecific/EthBusDemEventParameterRefs/ETH_E_BUS_HIF_NOCPY_WRITE_ERR) and node:refvalid(EthGeneral/EthVendorSpecific/EthBusDemEventParameterRefs/ETH_E_BUS_HIF_NOCPY_WRITE_ERR)"!]
      [!VAR "EthDemDetectBusHifNocpyWriteError" ="concat('DemConf_DemEventParameter_',node:ref(EthGeneral/EthVendorSpecific/EthBusDemEventParameterRefs/ETH_E_BUS_HIF_NOCPY_WRITE_ERR)/@name)"!]
    [!ELSE!]
      [!VAR "EthDemDetectBusHifNocpyWriteError" ="num:i(75)"!]
    [!ENDIF!]
    [!IF "node:exists(EthGeneral/EthVendorSpecific/EthBusDemEventParameterRefs/ETH_E_BUS_TMU_ERR) and node:refvalid(EthGeneral/EthVendorSpecific/EthBusDemEventParameterRefs/ETH_E_BUS_TMU_ERR)"!]
      [!VAR "EthDemDetectBusTmuError" ="concat('DemConf_DemEventParameter_',node:ref(EthGeneral/EthVendorSpecific/EthBusDemEventParameterRefs/ETH_E_BUS_TMU_ERR)/@name)"!]
    [!ELSE!]
      [!VAR "EthDemDetectBusTmuError" ="num:i(76)"!]
    [!ENDIF!]
    [!IF "node:exists(EthGeneral/EthVendorSpecific/EthBusDemEventParameterRefs/ETH_E_BUS_FET_ERR) and node:refvalid(EthGeneral/EthVendorSpecific/EthBusDemEventParameterRefs/ETH_E_BUS_FET_ERR)"!]
      [!VAR "EthDemDetectBusFetError" ="concat('DemConf_DemEventParameter_',node:ref(EthGeneral/EthVendorSpecific/EthBusDemEventParameterRefs/ETH_E_BUS_FET_ERR)/@name)"!]
    [!ELSE!]
      [!VAR "EthDemDetectBusFetError" ="num:i(77)"!]
    [!ENDIF!]
    [!IF "node:exists(EthGeneral/EthVendorSpecific/EthBusDemEventParameterRefs/ETH_E_BUS_UTIL_PE_READ_ERR) and node:refvalid(EthGeneral/EthVendorSpecific/EthBusDemEventParameterRefs/ETH_E_BUS_UTIL_PE_READ_ERR)"!]
      [!VAR "EthDemDetectBusUtilPeReadError" ="concat('DemConf_DemEventParameter_',node:ref(EthGeneral/EthVendorSpecific/EthBusDemEventParameterRefs/ETH_E_BUS_UTIL_PE_READ_ERR)/@name)"!]
    [!ELSE!]
      [!VAR "EthDemDetectBusUtilPeReadError" ="num:i(78)"!]
    [!ENDIF!]
    [!IF "node:exists(EthGeneral/EthVendorSpecific/EthBusDemEventParameterRefs/ETH_E_BUS_UTIL_PE_WRITE_ERR) and node:refvalid(EthGeneral/EthVendorSpecific/EthBusDemEventParameterRefs/ETH_E_BUS_UTIL_PE_WRITE_ERR)"!]
      [!VAR "EthDemDetectBusUtilPeWriteError" ="concat('DemConf_DemEventParameter_',node:ref(EthGeneral/EthVendorSpecific/EthBusDemEventParameterRefs/ETH_E_BUS_UTIL_PE_WRITE_ERR)/@name)"!]
    [!ELSE!]
      [!VAR "EthDemDetectBusUtilPeWriteError" ="num:i(79)"!]
    [!ENDIF!]
    #define ETH_43_PFE_CFG_DEM_E_BUS_MASTER1_ERR                    [!"$EthDemDetectBusMaster1Error"!]
    #define ETH_43_PFE_CFG_DEM_E_BUS_MASTER2_ERR                    [!"$EthDemDetectBusMaster2Error"!]
    #define ETH_43_PFE_CFG_DEM_E_BUS_MASTER3_ERR                    [!"$EthDemDetectBusMaster3Error"!]
    #define ETH_43_PFE_CFG_DEM_E_BUS_MASTER4_ERR                    [!"$EthDemDetectBusMaster4Error"!]
    #define ETH_43_PFE_CFG_DEM_E_BUS_HGPI_READ_ERR                  [!"$EthDemDetectBusHgpiReadError"!]
    #define ETH_43_PFE_CFG_DEM_E_BUS_HGPI_WRITE_ERR                 [!"$EthDemDetectBusHgpiWriteError"!]
    #define ETH_43_PFE_CFG_DEM_E_BUS_EMAC0_READ_ERR                 [!"$EthDemDetectBusEmac0ReadError"!]
    #define ETH_43_PFE_CFG_DEM_E_BUS_EMAC0_WRITE_ERR                [!"$EthDemDetectBusEmac0WriteError"!]
    #define ETH_43_PFE_CFG_DEM_E_BUS_EMAC1_READ_ERR                 [!"$EthDemDetectBusEmac1ReadError"!]
    #define ETH_43_PFE_CFG_DEM_E_BUS_EMAC1_WRITE_ERR                [!"$EthDemDetectBusEmac1WriteError"!]
    #define ETH_43_PFE_CFG_DEM_E_BUS_EMAC2_READ_ERR                 [!"$EthDemDetectBusEmac2ReadError"!]
    #define ETH_43_PFE_CFG_DEM_E_BUS_EMAC2_WRITE_ERR                [!"$EthDemDetectBusEmac2WriteError"!]
    #define ETH_43_PFE_CFG_DEM_E_BUS_CLASS_READ_ERR                 [!"$EthDemDetectBusClassReadError"!]
    #define ETH_43_PFE_CFG_DEM_E_BUS_CLASS_WRITE_ERR                [!"$EthDemDetectBusClassWriteError"!]
    #define ETH_43_PFE_CFG_DEM_E_BUS_HIF_NOCPY_READ_ERR             [!"$EthDemDetectBusHifNocpyReadError"!]
    #define ETH_43_PFE_CFG_DEM_E_BUS_HIF_NOCPY_WRITE_ERR            [!"$EthDemDetectBusHifNocpyWriteError"!]
    #define ETH_43_PFE_CFG_DEM_E_BUS_TMU_ERR                        [!"$EthDemDetectBusTmuError"!]
    #define ETH_43_PFE_CFG_DEM_E_BUS_FET_ERR                        [!"$EthDemDetectBusFetError"!]
    #define ETH_43_PFE_CFG_DEM_E_BUS_UTIL_PE_READ_ERR               [!"$EthDemDetectBusUtilPeReadError"!]
    #define ETH_43_PFE_CFG_DEM_E_BUS_UTIL_PE_WRITE_ERR              [!"$EthDemDetectBusUtilPeWriteError"!]
#endif /* ETH_43_PFE_DEM_EVENT_DETECT */
[!ENDIF!][!//
    /******************************************************************************
    *   Parity Dem Error Detection
    ******************************************************************************/
[!IF "EthGeneral/EthVendorSpecific/EthDisableDemEventDetect = 'false'"!][!//
#if STD_ON == ETH_43_PFE_DEM_EVENT_DETECT
    [!IF "node:exists(EthGeneral/EthVendorSpecific/EthParityDemEventParameterRefs/ETH_E_PARITY_MASTER1_ERR) and node:refvalid(EthGeneral/EthVendorSpecific/EthParityDemEventParameterRefs/ETH_E_PARITY_MASTER1_ERR)"!]
      [!VAR "EthDemDetectParityMaster1_Error" ="concat('DemConf_DemEventParameter_',node:ref(EthGeneral/EthVendorSpecific/EthParityDemEventParameterRefs/ETH_E_PARITY_MASTER1_ERR)/@name)"!]
    [!ELSE!]
      [!VAR "EthDemDetectParityMaster1_Error" ="num:i(100)"!]
    [!ENDIF!]
    [!IF "node:exists(EthGeneral/EthVendorSpecific/EthParityDemEventParameterRefs/ETH_E_PARITY_MASTER2_ERR) and node:refvalid(EthGeneral/EthVendorSpecific/EthParityDemEventParameterRefs/ETH_E_PARITY_MASTER2_ERR)"!]
      [!VAR "EthDemDetectParityMaster2_Error" ="concat('DemConf_DemEventParameter_',node:ref(EthGeneral/EthVendorSpecific/EthParityDemEventParameterRefs/ETH_E_PARITY_MASTER2_ERR)/@name)"!]
    [!ELSE!]
      [!VAR "EthDemDetectParityMaster2_Error" ="num:i(101)"!]
    [!ENDIF!]
    [!IF "node:exists(EthGeneral/EthVendorSpecific/EthParityDemEventParameterRefs/ETH_E_PARITY_MASTER3_ERR) and node:refvalid(EthGeneral/EthVendorSpecific/EthParityDemEventParameterRefs/ETH_E_PARITY_MASTER3_ERR)"!]
      [!VAR "EthDemDetectParityMaster3_Error" ="concat('DemConf_DemEventParameter_',node:ref(EthGeneral/EthVendorSpecific/EthParityDemEventParameterRefs/ETH_E_PARITY_MASTER3_ERR)/@name)"!]
    [!ELSE!]
      [!VAR "EthDemDetectParityMaster3_Error" ="num:i(102)"!]
    [!ENDIF!]
    [!IF "node:exists(EthGeneral/EthVendorSpecific/EthParityDemEventParameterRefs/ETH_E_PARITY_MASTER4_ERR) and node:refvalid(EthGeneral/EthVendorSpecific/EthParityDemEventParameterRefs/ETH_E_PARITY_MASTER4_ERR)"!]
      [!VAR "EthDemDetectParityMaster4_Error" ="concat('DemConf_DemEventParameter_',node:ref(EthGeneral/EthVendorSpecific/EthParityDemEventParameterRefs/ETH_E_PARITY_MASTER4_ERR)/@name)"!]
    [!ELSE!]
      [!VAR "EthDemDetectParityMaster4_Error" ="num:i(103)"!]
    [!ENDIF!]
    [!IF "node:exists(EthGeneral/EthVendorSpecific/EthParityDemEventParameterRefs/ETH_E_PARITY_EMAC_CBUS_ERR) and node:refvalid(EthGeneral/EthVendorSpecific/EthParityDemEventParameterRefs/ETH_E_PARITY_EMAC_CBUS_ERR)"!]
      [!VAR "EthDemDetectParityEmacCbusError" ="concat('DemConf_DemEventParameter_',node:ref(EthGeneral/EthVendorSpecific/EthParityDemEventParameterRefs/ETH_E_PARITY_EMAC_CBUS_ERR)/@name)"!]
    [!ELSE!]
      [!VAR "EthDemDetectParityEmacCbusError" ="num:i(104)"!]
    [!ENDIF!]
    [!IF "node:exists(EthGeneral/EthVendorSpecific/EthParityDemEventParameterRefs/ETH_E_PARITY_EMAC_DBUS_ERR) and node:refvalid(EthGeneral/EthVendorSpecific/EthParityDemEventParameterRefs/ETH_E_PARITY_EMAC_DBUS_ERR)"!]
      [!VAR "EthDemDetectParityEmacDbusError" ="concat('DemConf_DemEventParameter_',node:ref(EthGeneral/EthVendorSpecific/EthParityDemEventParameterRefs/ETH_E_PARITY_EMAC_DBUS_ERR)/@name)"!]
    [!ELSE!]
      [!VAR "EthDemDetectParityEmacDbusError" ="num:i(105)"!]
    [!ENDIF!]
    [!IF "node:exists(EthGeneral/EthVendorSpecific/EthParityDemEventParameterRefs/ETH_E_PARITY_CLASS_CBUS_ERR) and node:refvalid(EthGeneral/EthVendorSpecific/EthParityDemEventParameterRefs/ETH_E_PARITY_CLASS_CBUS_ERR)"!]
      [!VAR "EthDemDetectParityClassCbusError" ="concat('DemConf_DemEventParameter_',node:ref(EthGeneral/EthVendorSpecific/EthParityDemEventParameterRefs/ETH_E_PARITY_CLASS_CBUS_ERR)/@name)"!]
    [!ELSE!]
      [!VAR "EthDemDetectParityClassCbusError" ="num:i(106)"!]
    [!ENDIF!]
    [!IF "node:exists(EthGeneral/EthVendorSpecific/EthParityDemEventParameterRefs/ETH_E_PARITY_CLASS_DBUS_ERR) and node:refvalid(EthGeneral/EthVendorSpecific/EthParityDemEventParameterRefs/ETH_E_PARITY_CLASS_DBUS_ERR)"!]
      [!VAR "EthDemDetectParityClassDbusError" ="concat('DemConf_DemEventParameter_',node:ref(EthGeneral/EthVendorSpecific/EthParityDemEventParameterRefs/ETH_E_PARITY_CLASS_DBUS_ERR)/@name)"!]
    [!ELSE!]
      [!VAR "EthDemDetectParityClassDbusError" ="num:i(107)"!]
    [!ENDIF!]
    [!IF "node:exists(EthGeneral/EthVendorSpecific/EthParityDemEventParameterRefs/ETH_E_PARITY_TMU_CBUS_ERR) and node:refvalid(EthGeneral/EthVendorSpecific/EthParityDemEventParameterRefs/ETH_E_PARITY_TMU_CBUS_ERR)"!]
      [!VAR "EthDemDetectParityTmuCbusError" ="concat('DemConf_DemEventParameter_',node:ref(EthGeneral/EthVendorSpecific/EthParityDemEventParameterRefs/ETH_E_PARITY_TMU_CBUS_ERR)/@name)"!]
    [!ELSE!]
      [!VAR "EthDemDetectParityTmuCbusError" ="num:i(108)"!]
    [!ENDIF!]
    [!IF "node:exists(EthGeneral/EthVendorSpecific/EthParityDemEventParameterRefs/ETH_E_PARITY_TMU_DBUS_ERR) and node:refvalid(EthGeneral/EthVendorSpecific/EthParityDemEventParameterRefs/ETH_E_PARITY_TMU_DBUS_ERR)"!]
      [!VAR "EthDemDetectParityTmuDbusError" ="concat('DemConf_DemEventParameter_',node:ref(EthGeneral/EthVendorSpecific/EthParityDemEventParameterRefs/ETH_E_PARITY_TMU_DBUS_ERR)/@name)"!]
    [!ELSE!]
      [!VAR "EthDemDetectParityTmuDbusError" ="num:i(109)"!]
    [!ENDIF!]
    [!IF "node:exists(EthGeneral/EthVendorSpecific/EthParityDemEventParameterRefs/ETH_E_PARITY_HIF_CBUS_ERR) and node:refvalid(EthGeneral/EthVendorSpecific/EthParityDemEventParameterRefs/ETH_E_PARITY_HIF_CBUS_ERR)"!]
      [!VAR "EthDemDetectParityHifCbusError" ="concat('DemConf_DemEventParameter_',node:ref(EthGeneral/EthVendorSpecific/EthParityDemEventParameterRefs/ETH_E_PARITY_HIF_CBUS_ERR)/@name)"!]
    [!ELSE!]
      [!VAR "EthDemDetectParityHifCbusError" ="num:i(110)"!]
    [!ENDIF!]
    [!IF "node:exists(EthGeneral/EthVendorSpecific/EthParityDemEventParameterRefs/ETH_E_PARITY_HIF_DBUS_ERR) and node:refvalid(EthGeneral/EthVendorSpecific/EthParityDemEventParameterRefs/ETH_E_PARITY_HIF_DBUS_ERR)"!]
      [!VAR "EthDemDetectParityHifDbusError" ="concat('DemConf_DemEventParameter_',node:ref(EthGeneral/EthVendorSpecific/EthParityDemEventParameterRefs/ETH_E_PARITY_HIF_DBUS_ERR)/@name)"!]
    [!ELSE!]
      [!VAR "EthDemDetectParityHifDbusError" ="num:i(111)"!]
    [!ENDIF!]
    [!IF "node:exists(EthGeneral/EthVendorSpecific/EthParityDemEventParameterRefs/ETH_E_PARITY_HIF_NOCPY_CBUS_ERR) and node:refvalid(EthGeneral/EthVendorSpecific/EthParityDemEventParameterRefs/ETH_E_PARITY_HIF_NOCPY_CBUS_ERR)"!]
      [!VAR "EthDemDetectParityHifNocpyCbusError" ="concat('DemConf_DemEventParameter_',node:ref(EthGeneral/EthVendorSpecific/EthParityDemEventParameterRefs/ETH_E_PARITY_HIF_NOCPY_CBUS_ERR)/@name)"!]
    [!ELSE!]
      [!VAR "EthDemDetectParityHifNocpyCbusError" ="num:i(112)"!]
    [!ENDIF!]
    [!IF "node:exists(EthGeneral/EthVendorSpecific/EthParityDemEventParameterRefs/ETH_E_PARITY_HIF_NOCPY_DBUS_ERR) and node:refvalid(EthGeneral/EthVendorSpecific/EthParityDemEventParameterRefs/ETH_E_PARITY_HIF_NOCPY_DBUS_ERR)"!]
      [!VAR "EthDemDetectParityHifNocpyDbusError" ="concat('DemConf_DemEventParameter_',node:ref(EthGeneral/EthVendorSpecific/EthParityDemEventParameterRefs/ETH_E_PARITY_HIF_NOCPY_DBUS_ERR)/@name)"!]
    [!ELSE!]
      [!VAR "EthDemDetectParityHifNocpyDbusError" ="num:i(113)"!]
    [!ENDIF!]
    [!IF "node:exists(EthGeneral/EthVendorSpecific/EthParityDemEventParameterRefs/ETH_E_PARITY_UPE_CBUS_ERR) and node:refvalid(EthGeneral/EthVendorSpecific/EthParityDemEventParameterRefs/ETH_E_PARITY_UPE_CBUS_ERR)"!]
      [!VAR "EthDemDetectParityUpeCbusError" ="concat('DemConf_DemEventParameter_',node:ref(EthGeneral/EthVendorSpecific/EthParityDemEventParameterRefs/ETH_E_PARITY_UPE_CBUS_ERR)/@name)"!]
    [!ELSE!]
      [!VAR "EthDemDetectParityUpeCbusError" ="num:i(114)"!]
    [!ENDIF!]
    [!IF "node:exists(EthGeneral/EthVendorSpecific/EthParityDemEventParameterRefs/ETH_E_PARITY_UPE_DBUS_ERR) and node:refvalid(EthGeneral/EthVendorSpecific/EthParityDemEventParameterRefs/ETH_E_PARITY_UPE_DBUS_ERR)"!]
      [!VAR "EthDemDetectParityUpeDbusError" ="concat('DemConf_DemEventParameter_',node:ref(EthGeneral/EthVendorSpecific/EthParityDemEventParameterRefs/ETH_E_PARITY_UPE_DBUS_ERR)/@name)"!]
    [!ELSE!]
      [!VAR "EthDemDetectParityUpeDbusError" ="num:i(115)"!]
    [!ENDIF!]
    [!IF "node:exists(EthGeneral/EthVendorSpecific/EthParityDemEventParameterRefs/ETH_E_PARITY_HRS_CBUS_ERR) and node:refvalid(EthGeneral/EthVendorSpecific/EthParityDemEventParameterRefs/ETH_E_PARITY_HRS_CBUS_ERR)"!]
      [!VAR "EthDemDetectParityHrsCbusError" ="concat('DemConf_DemEventParameter_',node:ref(EthGeneral/EthVendorSpecific/EthParityDemEventParameterRefs/ETH_E_PARITY_HRS_CBUS_ERR)/@name)"!]
    [!ELSE!]
      [!VAR "EthDemDetectParityHrsCbusError" ="num:i(116)"!]
    [!ENDIF!]
    [!IF "node:exists(EthGeneral/EthVendorSpecific/EthParityDemEventParameterRefs/ETH_E_PARITY_BRIDGE_CBUS_ERR) and node:refvalid(EthGeneral/EthVendorSpecific/EthParityDemEventParameterRefs/ETH_E_PARITY_BRIDGE_CBUS_ERR)"!]
      [!VAR "EthDemDetectParityBridgeCbusError" ="concat('DemConf_DemEventParameter_',node:ref(EthGeneral/EthVendorSpecific/EthParityDemEventParameterRefs/ETH_E_PARITY_BRIDGE_CBUS_ERR)/@name)"!]
    [!ELSE!]
      [!VAR "EthDemDetectParityBridgeCbusError" ="num:i(117)"!]
    [!ENDIF!]
    [!IF "node:exists(EthGeneral/EthVendorSpecific/EthParityDemEventParameterRefs/ETH_E_PARITY_EMAC_SLV_ERR) and node:refvalid(EthGeneral/EthVendorSpecific/EthParityDemEventParameterRefs/ETH_E_PARITY_EMAC_SLV_ERR)"!]
      [!VAR "EthDemDetectParityEmacSlvError" ="concat('DemConf_DemEventParameter_',node:ref(EthGeneral/EthVendorSpecific/EthParityDemEventParameterRefs/ETH_E_PARITY_EMAC_SLV_ERR)/@name)"!]
    [!ELSE!]
      [!VAR "EthDemDetectParityEmacSlvError" ="num:i(118)"!]
    [!ENDIF!]
    [!IF "node:exists(EthGeneral/EthVendorSpecific/EthParityDemEventParameterRefs/ETH_E_PARITY_BMU1_SLV_ERR) and node:refvalid(EthGeneral/EthVendorSpecific/EthParityDemEventParameterRefs/ETH_E_PARITY_BMU1_SLV_ERR)"!]
      [!VAR "EthDemDetectParityBmu1SlvError" ="concat('DemConf_DemEventParameter_',node:ref(EthGeneral/EthVendorSpecific/EthParityDemEventParameterRefs/ETH_E_PARITY_BMU1_SLV_ERR)/@name)"!]
    [!ELSE!]
      [!VAR "EthDemDetectParityBmu1SlvError" ="num:i(119)"!]
    [!ENDIF!]
    [!IF "node:exists(EthGeneral/EthVendorSpecific/EthParityDemEventParameterRefs/ETH_E_PARITY_BMU2_SLV_ERR) and node:refvalid(EthGeneral/EthVendorSpecific/EthParityDemEventParameterRefs/ETH_E_PARITY_BMU2_SLV_ERR)"!]
      [!VAR "EthDemDetectParityBmu2SlvError" ="concat('DemConf_DemEventParameter_',node:ref(EthGeneral/EthVendorSpecific/EthParityDemEventParameterRefs/ETH_E_PARITY_BMU2_SLV_ERR)/@name)"!]
    [!ELSE!]
      [!VAR "EthDemDetectParityBmu2SlvError" ="num:i(120)"!]
    [!ENDIF!]
    [!IF "node:exists(EthGeneral/EthVendorSpecific/EthParityDemEventParameterRefs/ETH_E_PARITY_CLASS_SLV_ERR) and node:refvalid(EthGeneral/EthVendorSpecific/EthParityDemEventParameterRefs/ETH_E_PARITY_CLASS_SLV_ERR)"!]
      [!VAR "EthDemDetectParityClassSlvError" ="concat('DemConf_DemEventParameter_',node:ref(EthGeneral/EthVendorSpecific/EthParityDemEventParameterRefs/ETH_E_PARITY_CLASS_SLV_ERR)/@name)"!]
    [!ELSE!]
      [!VAR "EthDemDetectParityClassSlvError" ="num:i(121)"!]
    [!ENDIF!]
    [!IF "node:exists(EthGeneral/EthVendorSpecific/EthParityDemEventParameterRefs/ETH_E_PARITY_HIF_SLV_ERR) and node:refvalid(EthGeneral/EthVendorSpecific/EthParityDemEventParameterRefs/ETH_E_PARITY_HIF_SLV_ERR)"!]
      [!VAR "EthDemDetectParityHifSlvError" ="concat('DemConf_DemEventParameter_',node:ref(EthGeneral/EthVendorSpecific/EthParityDemEventParameterRefs/ETH_E_PARITY_HIF_SLV_ERR)/@name)"!]
    [!ELSE!]
      [!VAR "EthDemDetectParityHifSlvError" ="num:i(122)"!]
    [!ENDIF!]
    [!IF "node:exists(EthGeneral/EthVendorSpecific/EthParityDemEventParameterRefs/ETH_E_PARITY_HIF_NOCPY_SLV_ERR) and node:refvalid(EthGeneral/EthVendorSpecific/EthParityDemEventParameterRefs/ETH_E_PARITY_HIF_NOCPY_SLV_ERR)"!]
      [!VAR "EthDemDetectParityHifNocpySlvError" ="concat('DemConf_DemEventParameter_',node:ref(EthGeneral/EthVendorSpecific/EthParityDemEventParameterRefs/ETH_E_PARITY_HIF_NOCPY_SLV_ERR)/@name)"!]
    [!ELSE!]
      [!VAR "EthDemDetectParityHifNocpySlvError" ="num:i(123)"!]
    [!ENDIF!]
    [!IF "node:exists(EthGeneral/EthVendorSpecific/EthParityDemEventParameterRefs/ETH_E_PARITY_LMEM_SLV_ERR) and node:refvalid(EthGeneral/EthVendorSpecific/EthParityDemEventParameterRefs/ETH_E_PARITY_LMEM_SLV_ERR)"!]
      [!VAR "EthDemDetectParityLmemSlvError" ="concat('DemConf_DemEventParameter_',node:ref(EthGeneral/EthVendorSpecific/EthParityDemEventParameterRefs/ETH_E_PARITY_LMEM_SLV_ERR)/@name)"!]
    [!ELSE!]
      [!VAR "EthDemDetectParityLmemSlvError" ="num:i(124)"!]
    [!ENDIF!]
    [!IF "node:exists(EthGeneral/EthVendorSpecific/EthParityDemEventParameterRefs/ETH_E_PARITY_TMU_SLV_ERR) and node:refvalid(EthGeneral/EthVendorSpecific/EthParityDemEventParameterRefs/ETH_E_PARITY_TMU_SLV_ERR)"!]
      [!VAR "EthDemDetectParityTmuSlvError" ="concat('DemConf_DemEventParameter_',node:ref(EthGeneral/EthVendorSpecific/EthParityDemEventParameterRefs/ETH_E_PARITY_TMU_SLV_ERR)/@name)"!]
    [!ELSE!]
      [!VAR "EthDemDetectParityTmuSlvError" ="num:i(125)"!]
    [!ENDIF!]
    [!IF "node:exists(EthGeneral/EthVendorSpecific/EthParityDemEventParameterRefs/ETH_E_PARITY_UPE_SLV_ERR) and node:refvalid(EthGeneral/EthVendorSpecific/EthParityDemEventParameterRefs/ETH_E_PARITY_UPE_SLV_ERR)"!]
      [!VAR "EthDemDetectParityUpeSlvError" ="concat('DemConf_DemEventParameter_',node:ref(EthGeneral/EthVendorSpecific/EthParityDemEventParameterRefs/ETH_E_PARITY_UPE_SLV_ERR)/@name)"!]
    [!ELSE!]
      [!VAR "EthDemDetectParityUpeSlvError" ="num:i(126)"!]
    [!ENDIF!]
    [!IF "node:exists(EthGeneral/EthVendorSpecific/EthParityDemEventParameterRefs/ETH_E_PARITY_WSP_GLOBAL_SLV_ERR) and node:refvalid(EthGeneral/EthVendorSpecific/EthParityDemEventParameterRefs/ETH_E_PARITY_WSP_GLOBAL_SLV_ERR)"!]
      [!VAR "EthDemDetectParityWspGlobalSlvError" ="concat('DemConf_DemEventParameter_',node:ref(EthGeneral/EthVendorSpecific/EthParityDemEventParameterRefs/ETH_E_PARITY_WSP_GLOBAL_SLV_ERR)/@name)"!]
    [!ELSE!]
      [!VAR "EthDemDetectParityWspGlobalSlvError" ="num:i(127)"!]
    [!ENDIF!]
    [!IF "node:exists(EthGeneral/EthVendorSpecific/EthParityDemEventParameterRefs/ETH_E_PARITY_GPT1_SLV_ERR) and node:refvalid(EthGeneral/EthVendorSpecific/EthParityDemEventParameterRefs/ETH_E_PARITY_GPT1_SLV_ERR)"!]
      [!VAR "EthDemDetectParityGpt1SlvError" ="concat('DemConf_DemEventParameter_',node:ref(EthGeneral/EthVendorSpecific/EthParityDemEventParameterRefs/ETH_E_PARITY_GPT1_SLV_ERR)/@name)"!]
    [!ELSE!]
      [!VAR "EthDemDetectParityGpt1SlvError" ="num:i(128)"!]
    [!ENDIF!]
    [!IF "node:exists(EthGeneral/EthVendorSpecific/EthParityDemEventParameterRefs/ETH_E_PARITY_GPT2_SLV_ERR) and node:refvalid(EthGeneral/EthVendorSpecific/EthParityDemEventParameterRefs/ETH_E_PARITY_GPT2_SLV_ERR)"!]
      [!VAR "EthDemDetectParityGpt2SlvError" ="concat('DemConf_DemEventParameter_',node:ref(EthGeneral/EthVendorSpecific/EthParityDemEventParameterRefs/ETH_E_PARITY_GPT2_SLV_ERR)/@name)"!]
    [!ELSE!]
      [!VAR "EthDemDetectParityGpt2SlvError" ="num:i(129)"!]
    [!ENDIF!]
    [!IF "node:exists(EthGeneral/EthVendorSpecific/EthParityDemEventParameterRefs/ETH_E_PARITY_ROUTE_LMEM_SLV_ERR) and node:refvalid(EthGeneral/EthVendorSpecific/EthParityDemEventParameterRefs/ETH_E_PARITY_ROUTE_LMEM_SLV_ERR)"!]
      [!VAR "EthDemDetectParityRouteLmemSlvError" ="concat('DemConf_DemEventParameter_',node:ref(EthGeneral/EthVendorSpecific/EthParityDemEventParameterRefs/ETH_E_PARITY_ROUTE_LMEM_SLV_ERR)/@name)"!]
    [!ELSE!]
      [!VAR "EthDemDetectParityRouteLmemSlvError" ="num:i(130)"!]
    [!ENDIF!]
    #define ETH_43_PFE_CFG_DEM_E_PARITY_MASTER1_ERR                  [!"$EthDemDetectParityMaster1_Error"!]
    #define ETH_43_PFE_CFG_DEM_E_PARITY_MASTER2_ERR                  [!"$EthDemDetectParityMaster2_Error"!]
    #define ETH_43_PFE_CFG_DEM_E_PARITY_MASTER3_ERR                  [!"$EthDemDetectParityMaster3_Error"!]
    #define ETH_43_PFE_CFG_DEM_E_PARITY_MASTER4_ERR                  [!"$EthDemDetectParityMaster4_Error"!]
    #define ETH_43_PFE_CFG_DEM_E_PARITY_EMAC_CBUS_ERR                [!"$EthDemDetectParityEmacCbusError"!]
    #define ETH_43_PFE_CFG_DEM_E_PARITY_EMAC_DBUS_ERR                [!"$EthDemDetectParityEmacDbusError"!]
    #define ETH_43_PFE_CFG_DEM_E_PARITY_CLASS_CBUS_ERR               [!"$EthDemDetectParityClassCbusError"!]
    #define ETH_43_PFE_CFG_DEM_E_PARITY_CLASS_DBUS_ERR               [!"$EthDemDetectParityClassDbusError"!]
    #define ETH_43_PFE_CFG_DEM_E_PARITY_TMU_CBUS_ERR                 [!"$EthDemDetectParityTmuCbusError"!]
    #define ETH_43_PFE_CFG_DEM_E_PARITY_TMU_DBUS_ERR                 [!"$EthDemDetectParityTmuDbusError"!]
    #define ETH_43_PFE_CFG_DEM_E_PARITY_HIF_CBUS_ERR                 [!"$EthDemDetectParityHifCbusError"!]
    #define ETH_43_PFE_CFG_DEM_E_PARITY_HIF_DBUS_ERR                 [!"$EthDemDetectParityHifDbusError"!]
    #define ETH_43_PFE_CFG_DEM_E_PARITY_HIF_NOCPY_CBUS_ERR           [!"$EthDemDetectParityHifNocpyCbusError"!]
    #define ETH_43_PFE_CFG_DEM_E_PARITY_HIF_NOCPY_DBUS_ERR           [!"$EthDemDetectParityHifNocpyDbusError"!]
    #define ETH_43_PFE_CFG_DEM_E_PARITY_UPE_CBUS_ERR                 [!"$EthDemDetectParityUpeCbusError"!]
    #define ETH_43_PFE_CFG_DEM_E_PARITY_UPE_DBUS_ERR                 [!"$EthDemDetectParityUpeDbusError"!]
    #define ETH_43_PFE_CFG_DEM_E_PARITY_HRS_CBUS_ERR                 [!"$EthDemDetectParityHrsCbusError"!]
    #define ETH_43_PFE_CFG_DEM_E_PARITY_BRIDGE_CBUS_ERR              [!"$EthDemDetectParityBridgeCbusError"!]
    #define ETH_43_PFE_CFG_DEM_E_PARITY_EMAC_SLV_ERR                 [!"$EthDemDetectParityEmacSlvError"!]
    #define ETH_43_PFE_CFG_DEM_E_PARITY_BMU1_SLV_ERR                 [!"$EthDemDetectParityBmu1SlvError"!]
    #define ETH_43_PFE_CFG_DEM_E_PARITY_BMU2_SLV_ERR                 [!"$EthDemDetectParityBmu2SlvError"!]
    #define ETH_43_PFE_CFG_DEM_E_PARITY_CLASS_SLV_ERR                [!"$EthDemDetectParityClassSlvError"!]
    #define ETH_43_PFE_CFG_DEM_E_PARITY_HIF_SLV_ERR                  [!"$EthDemDetectParityHifSlvError"!]
    #define ETH_43_PFE_CFG_DEM_E_PARITY_HIF_NOCPY_SLV_ERR            [!"$EthDemDetectParityHifNocpySlvError"!]
    #define ETH_43_PFE_CFG_DEM_E_PARITY_LMEM_SLV_ERR                 [!"$EthDemDetectParityLmemSlvError"!]
    #define ETH_43_PFE_CFG_DEM_E_PARITY_TMU_SLV_ERR                  [!"$EthDemDetectParityTmuSlvError"!]
    #define ETH_43_PFE_CFG_DEM_E_PARITY_UPE_SLV_ERR                  [!"$EthDemDetectParityUpeSlvError"!]
    #define ETH_43_PFE_CFG_DEM_E_PARITY_WSP_GLOBAL_SLV_ERR           [!"$EthDemDetectParityWspGlobalSlvError"!]
    #define ETH_43_PFE_CFG_DEM_E_PARITY_GPT1_SLV_ERR                 [!"$EthDemDetectParityGpt1SlvError"!]
    #define ETH_43_PFE_CFG_DEM_E_PARITY_GPT2_SLV_ERR                 [!"$EthDemDetectParityGpt2SlvError"!]
    #define ETH_43_PFE_CFG_DEM_E_PARITY_ROUTE_LMEM_SLV_ERR           [!"$EthDemDetectParityRouteLmemSlvError"!]
#endif /* ETH_43_PFE_DEM_EVENT_DETECT */
[!ENDIF!][!//
    /******************************************************************************
    *   FailStop Dem Error Detection
    ******************************************************************************/
[!IF "EthGeneral/EthVendorSpecific/EthDisableDemEventDetect = 'false'"!][!//
#if STD_ON == ETH_43_PFE_DEM_EVENT_DETECT
    [!IF "node:exists(EthGeneral/EthVendorSpecific/EthFailStopDemEventParameterRefs/ETH_E_FAIL_STOP_PARITY_ERR) and node:refvalid(EthGeneral/EthVendorSpecific/EthFailStopDemEventParameterRefs/ETH_E_FAIL_STOP_PARITY_ERR)"!]
      [!VAR "EthDemDetectFailStopParityError" ="concat('DemConf_DemEventParameter_',node:ref(EthGeneral/EthVendorSpecific/EthFailStopDemEventParameterRefs/ETH_E_FAIL_STOP_PARITY_ERR)/@name)"!]
    [!ELSE!]
      [!VAR "EthDemDetectFailStopParityError" ="num:i(140)"!]
    [!ENDIF!]
    [!IF "node:exists(EthGeneral/EthVendorSpecific/EthFailStopDemEventParameterRefs/ETH_E_FAIL_STOP_WATCHDOG_ERR) and node:refvalid(EthGeneral/EthVendorSpecific/EthFailStopDemEventParameterRefs/ETH_E_FAIL_STOP_WATCHDOG_ERR)"!]
      [!VAR "EthDemDetectFailStopWatchdogError" ="concat('DemConf_DemEventParameter_',node:ref(EthGeneral/EthVendorSpecific/EthFailStopDemEventParameterRefs/ETH_E_FAIL_STOP_WATCHDOG_ERR)/@name)"!]
    [!ELSE!]
      [!VAR "EthDemDetectFailStopWatchdogError" ="num:i(141)"!]
    [!ENDIF!]
    [!IF "node:exists(EthGeneral/EthVendorSpecific/EthFailStopDemEventParameterRefs/ETH_E_FAIL_STOP_BUS_ERR) and node:refvalid(EthGeneral/EthVendorSpecific/EthFailStopDemEventParameterRefs/ETH_E_FAIL_STOP_BUS_ERR)"!]
      [!VAR "EthDemDetectFailStopBusError" ="concat('DemConf_DemEventParameter_',node:ref(EthGeneral/EthVendorSpecific/EthFailStopDemEventParameterRefs/ETH_E_FAIL_STOP_BUS_ERR)/@name)"!]
    [!ELSE!]
      [!VAR "EthDemDetectFailStopBusError" ="num:i(142)"!]
    [!ENDIF!]
    [!IF "node:exists(EthGeneral/EthVendorSpecific/EthFailStopDemEventParameterRefs/ETH_E_FAIL_STOP_ECC_MULTIBIT_ERR) and node:refvalid(EthGeneral/EthVendorSpecific/EthFailStopDemEventParameterRefs/ETH_E_FAIL_STOP_ECC_MULTIBIT_ERR)"!]
      [!VAR "EthDemDetectFailStopEccMultiBitError" ="concat('DemConf_DemEventParameter_',node:ref(EthGeneral/EthVendorSpecific/EthFailStopDemEventParameterRefs/ETH_E_FAIL_STOP_ECC_MULTIBIT_ERR)/@name)"!]
    [!ELSE!]
      [!VAR "EthDemDetectFailStopEccMultiBitError" ="num:i(143)"!]
    [!ENDIF!]
    [!IF "node:exists(EthGeneral/EthVendorSpecific/EthFailStopDemEventParameterRefs/ETH_E_FAIL_STOP_FW_ERR) and node:refvalid(EthGeneral/EthVendorSpecific/EthFailStopDemEventParameterRefs/ETH_E_FAIL_STOP_FW_ERR)"!]
      [!VAR "EthDemDetectFailStopFirmwareError" ="concat('DemConf_DemEventParameter_',node:ref(EthGeneral/EthVendorSpecific/EthFailStopDemEventParameterRefs/ETH_E_FAIL_STOP_FW_ERR)/@name)"!]
    [!ELSE!]
      [!VAR "EthDemDetectFailStopFirmwareError" ="num:i(144)"!]
    [!ENDIF!]
    [!IF "node:exists(EthGeneral/EthVendorSpecific/EthFailStopDemEventParameterRefs/ETH_E_FAIL_STOP_HOST_ERR) and node:refvalid(EthGeneral/EthVendorSpecific/EthFailStopDemEventParameterRefs/ETH_E_FAIL_STOP_HOST_ERR)"!]
      [!VAR "EthDemDetectFailStopHostError" ="concat('DemConf_DemEventParameter_',node:ref(EthGeneral/EthVendorSpecific/EthFailStopDemEventParameterRefs/ETH_E_FAIL_STOP_HOST_ERR)/@name)"!]
    [!ELSE!]
      [!VAR "EthDemDetectFailStopHostError" ="num:i(145)"!]
    [!ENDIF!]

    [!IF "node:exists(EthGeneral/EthVendorSpecific/EthFailStopDemEventParameterRefs/ETH_E_FW_FAIL_STOP_ERR) and node:refvalid(EthGeneral/EthVendorSpecific/EthFailStopDemEventParameterRefs/ETH_E_FW_FAIL_STOP_ERR)"!]
      [!VAR "EthDemDetectFirmwareFailStopError" ="concat('DemConf_DemEventParameter_',node:ref(EthGeneral/EthVendorSpecific/EthFailStopDemEventParameterRefs/ETH_E_FW_FAIL_STOP_ERR)/@name)"!]
    [!ELSE!]
      [!VAR "EthDemDetectFirmwareFailStopError" ="num:i(150)"!]
    [!ENDIF!]

    [!IF "node:exists(EthGeneral/EthVendorSpecific/EthFailStopDemEventParameterRefs/ETH_E_HOST_FAIL_STOP_ERR) and node:refvalid(EthGeneral/EthVendorSpecific/EthFailStopDemEventParameterRefs/ETH_E_HOST_FAIL_STOP_ERR)"!]
      [!VAR "EthDemDetectHostFailStopError" ="concat('DemConf_DemEventParameter_',node:ref(EthGeneral/EthVendorSpecific/EthFailStopDemEventParameterRefs/ETH_E_HOST_FAIL_STOP_ERR)/@name)"!]
    [!ELSE!]
      [!VAR "EthDemDetectHostFailStopError" ="num:i(151)"!]
    [!ENDIF!]
 #define   ETH_43_PFE_CFG_DEM_E_FAIL_STOP_PARITY_ERR                 [!"$EthDemDetectFailStopParityError"!]
 #define   ETH_43_PFE_CFG_DEM_E_FAIL_STOP_WATCHDOG_ERR               [!"$EthDemDetectFailStopWatchdogError"!]
 #define   ETH_43_PFE_CFG_DEM_E_FAIL_STOP_BUS_ERR                    [!"$EthDemDetectFailStopBusError"!]
 #define   ETH_43_PFE_CFG_DEM_E_FAIL_STOP_ECC_MULTIBIT_ERR           [!"$EthDemDetectFailStopEccMultiBitError"!]
 #define   ETH_43_PFE_CFG_DEM_E_FAIL_STOP_FW_ERR                     [!"$EthDemDetectFailStopFirmwareError"!]
 #define   ETH_43_PFE_CFG_DEM_E_FAIL_STOP_HOST_ERR                   [!"$EthDemDetectFailStopHostError"!]
 #define   ETH_43_PFE_CFG_DEM_E_FW_FAIL_STOP_ERR                     [!"$EthDemDetectFirmwareFailStopError"!]
 #define   ETH_43_PFE_CFG_DEM_E_HOST_FAIL_STOP_ERR                   [!"$EthDemDetectHostFailStopError"!]
#endif /* ETH_43_PFE_DEM_EVENT_DETECT */
[!ENDIF!][!//
    /******************************************************************************
    *   BMU Dem Error Detection
    ******************************************************************************/
[!IF "EthGeneral/EthVendorSpecific/EthDisableDemEventDetect = 'false'"!][!//
#if STD_ON == ETH_43_PFE_DEM_EVENT_DETECT
    [!IF "node:exists(EthGeneral/EthVendorSpecific/EthBmuDemEventParameterRefs/ETH_E_BMU_FULL_ERR) and node:refvalid(EthGeneral/EthVendorSpecific/EthBmuDemEventParameterRefs/ETH_E_BMU_FULL_ERR)"!]
      [!VAR "EthDemDetectBmuFullError" ="concat('DemConf_DemEventParameter_',node:ref(EthGeneral/EthVendorSpecific/EthBmuDemEventParameterRefs/ETH_E_BMU_FULL_ERR)/@name)"!]
    [!ELSE!]
      [!VAR "EthDemDetectBmuFullError" ="num:i(170)"!]
    [!ENDIF!]
    [!IF "node:exists(EthGeneral/EthVendorSpecific/EthBmuDemEventParameterRefs/ETH_E_BMU_FREE_ERR) and node:refvalid(EthGeneral/EthVendorSpecific/EthBmuDemEventParameterRefs/ETH_E_BMU_FREE_ERR)"!]
      [!VAR "EthDemDetectBmuFreeError" ="concat('DemConf_DemEventParameter_',node:ref(EthGeneral/EthVendorSpecific/EthBmuDemEventParameterRefs/ETH_E_BMU_FREE_ERR)/@name)"!]
    [!ELSE!]
      [!VAR "EthDemDetectBmuFreeError" ="num:i(171)"!]
    [!ENDIF!]
    [!IF "node:exists(EthGeneral/EthVendorSpecific/EthBmuDemEventParameterRefs/ETH_E_BMU_MCAST_ERR) and node:refvalid(EthGeneral/EthVendorSpecific/EthBmuDemEventParameterRefs/ETH_E_BMU_MCAST_ERR)"!]
      [!VAR "EthDemDetectBmuMcastError" ="concat('DemConf_DemEventParameter_',node:ref(EthGeneral/EthVendorSpecific/EthBmuDemEventParameterRefs/ETH_E_BMU_MCAST_ERR)/@name)"!]
    [!ELSE!]
      [!VAR "EthDemDetectBmuMcastError" ="num:i(172)"!]
    [!ENDIF!]
    #define ETH_43_PFE_CFG_DEM_E_BMU_FULL_ERR            [!"$EthDemDetectBmuFullError"!]
    #define ETH_43_PFE_CFG_DEM_E_BMU_FREE_ERR            [!"$EthDemDetectBmuFreeError"!]
    #define ETH_43_PFE_CFG_DEM_E_BMU_MCAST_ERR           [!"$EthDemDetectBmuMcastError"!]
#endif /* ETH_43_PFE_DEM_EVENT_DETECT */
[!ENDIF!][!//
    /******************************************************************************
    *   PE Dem Error Detection
    ******************************************************************************/
[!IF "EthGeneral/EthVendorSpecific/EthDisableDemEventDetect = 'false'"!][!//
#if STD_ON == ETH_43_PFE_DEM_EVENT_DETECT
    [!IF "node:exists(EthGeneral/EthVendorSpecific/EthPeDemEventParameterRefs/ETH_E_PE_STALL_ERR) and node:refvalid(EthGeneral/EthVendorSpecific/EthPeDemEventParameterRefs/ETH_E_PE_STALL_ERR)"!]
      [!VAR "EthDemDetectPestallError" ="concat('DemConf_DemEventParameter_',node:ref(EthGeneral/EthVendorSpecific/EthPeDemEventParameterRefs/ETH_E_PE_STALL_ERR)/@name)"!]
    [!ELSE!]
      [!VAR "EthDemDetectPestallError" ="num:i(180)"!]
    [!ENDIF!]
    [!IF "node:exists(EthGeneral/EthVendorSpecific/EthPeDemEventParameterRefs/ETH_E_PE_EXCEPTION_ERR) and node:refvalid(EthGeneral/EthVendorSpecific/EthPeDemEventParameterRefs/ETH_E_PE_EXCEPTION_ERR)"!]
      [!VAR "EthDemDetectPeEceptionError" ="concat('DemConf_DemEventParameter_',node:ref(EthGeneral/EthVendorSpecific/EthPeDemEventParameterRefs/ETH_E_PE_EXCEPTION_ERR)/@name)"!]
    [!ELSE!]
      [!VAR "EthDemDetectPeEceptionError" ="num:i(181)"!]
    [!ENDIF!]
    [!IF "node:exists(EthGeneral/EthVendorSpecific/EthPeDemEventParameterRefs/ETH_E_PE_ERROR_ERR) and node:refvalid(EthGeneral/EthVendorSpecific/EthPeDemEventParameterRefs/ETH_E_PE_ERROR_ERR)"!]
      [!VAR "EthDemDetectPeError" ="concat('DemConf_DemEventParameter_',node:ref(EthGeneral/EthVendorSpecific/EthPeDemEventParameterRefs/ETH_E_PE_ERROR_ERR)/@name)"!]
    [!ELSE!]
      [!VAR "EthDemDetectPeError" ="num:i(182)"!]
    [!ENDIF!]
    #define ETH_43_PFE_CFG_DEM_E_PE_STALL_ERR               [!"$EthDemDetectPestallError"!]
    #define ETH_43_PFE_CFG_DEM_E_PE_EXCEPTION_ERR           [!"$EthDemDetectPeEceptionError"!]
    #define ETH_43_PFE_CFG_DEM_E_PE_ERROR_ERR               [!"$EthDemDetectPeError"!]
#endif /* ETH_43_PFE_DEM_EVENT_DETECT */
[!ENDIF!][!//
    /******************************************************************************
    *   Hif Dem Error Detection
    ******************************************************************************/
[!IF "EthGeneral/EthVendorSpecific/EthDisableDemEventDetect = 'false'"!][!//
#if STD_ON == ETH_43_PFE_DEM_EVENT_DETECT
    [!IF "node:exists(EthGeneral/EthVendorSpecific/EthHifDemEventParameterRefs/ETH_E_HIF_ERR) and node:refvalid(EthGeneral/EthVendorSpecific/EthHifDemEventParameterRefs/ETH_E_HIF_ERR)"!]
      [!VAR "EthMasterHifDemDetectHifError" ="concat('DemConf_DemEventParameter_',node:ref(EthGeneral/EthVendorSpecific/EthHifDemEventParameterRefs/ETH_E_HIF_ERR)/@name)"!]
    [!ELSE!]
      [!VAR "EthMasterHifDemDetectHifError" ="num:i(190)"!]
    [!ENDIF!]
    [!IF "node:exists(EthGeneral/EthVendorSpecific/EthHifDemEventParameterRefs/ETH_E_HIF_TXFIFO_ERR) and node:refvalid(EthGeneral/EthVendorSpecific/EthHifDemEventParameterRefs/ETH_E_HIF_TXFIFO_ERR)"!]
      [!VAR "EthMasterHifDemDetectHifTxFitoError" ="concat('DemConf_DemEventParameter_',node:ref(EthGeneral/EthVendorSpecific/EthHifDemEventParameterRefs/ETH_E_HIF_TXFIFO_ERR)/@name)"!]
    [!ELSE!]
      [!VAR "EthMasterHifDemDetectHifTxFitoError" ="num:i(191)"!]
    [!ENDIF!]
    [!IF "node:exists(EthGeneral/EthVendorSpecific/EthHifDemEventParameterRefs/ETH_E_HIF_RXFIFO_ERR) and node:refvalid(EthGeneral/EthVendorSpecific/EthHifDemEventParameterRefs/ETH_E_HIF_RXFIFO_ERR)"!]
      [!VAR "EthMasterHifDemDetectHifRxFitoError" ="concat('DemConf_DemEventParameter_',node:ref(EthGeneral/EthVendorSpecific/EthHifDemEventParameterRefs/ETH_E_HIF_RXFIFO_ERR)/@name)"!]
    [!ELSE!]
      [!VAR "EthMasterHifDemDetectHifRxFitoError" ="num:i(192)"!]
    [!ENDIF!]
    #define ETH_43_PFE_CFG_DEM_E_HIF_ERR            [!"$EthMasterHifDemDetectHifError"!]
    #define ETH_43_PFE_CFG_DEM_E_HIF_TXFIFO_ERR     [!"$EthMasterHifDemDetectHifTxFitoError"!]
    #define ETH_43_PFE_CFG_DEM_E_HIF_RXFIFO_ERR     [!"$EthMasterHifDemDetectHifRxFitoError"!]
#endif /* ETH_43_PFE_DEM_EVENT_DETECT */
[!ENDIF!][!//

    /******************************************************************************
    *   Platform Dem Event Detection
    ******************************************************************************/
[!IF "EthGeneral/EthVendorSpecific/EthDisableDemEventDetect = 'false'"!][!//
#if STD_ON == ETH_43_PFE_DEM_EVENT_DETECT
    [!IF "node:exists(EthGeneral/EthVendorSpecific/EthPlatformDemEventParameterRefs/ETH_E_INTERNAL_FAILURE) and node:refvalid(EthGeneral/EthVendorSpecific/EthPlatformDemEventParameterRefs/ETH_E_INTERNAL_FAILURE)"!]
      [!VAR "EthDemDetectInternalFailure" ="concat('DemConf_DemEventParameter_',node:ref(EthGeneral/EthVendorSpecific/EthPlatformDemEventParameterRefs/ETH_E_INTERNAL_FAILURE)/@name)"!]
    [!ELSE!]
      [!VAR "EthDemDetectInternalFailure" ="num:i(0)"!]
    [!ENDIF!]
    [!IF "node:exists(EthGeneral/EthVendorSpecific/EthPlatformDemEventParameterRefs/ETH_E_LOG_IF_ERR) and node:refvalid(EthGeneral/EthVendorSpecific/EthPlatformDemEventParameterRefs/ETH_E_LOG_IF_ERR)"!]
      [!VAR "EthDemDetectLogicalInterfaceError" ="concat('DemConf_DemEventParameter_',node:ref(EthGeneral/EthVendorSpecific/EthPlatformDemEventParameterRefs/ETH_E_LOG_IF_ERR)/@name)"!]
    [!ELSE!]
      [!VAR "EthDemDetectLogicalInterfaceError" ="num:i(0)"!]
    [!ENDIF!]
    [!IF "node:exists(EthGeneral/EthVendorSpecific/EthPlatformDemEventParameterRefs/ETH_E_TMU_ERR) and node:refvalid(EthGeneral/EthVendorSpecific/EthPlatformDemEventParameterRefs/ETH_E_TMU_ERR)"!]
      [!VAR "EthMasterHifDemDetectTMUError" ="concat('DemConf_DemEventParameter_',node:ref(EthGeneral/EthVendorSpecific/EthPlatformDemEventParameterRefs/ETH_E_TMU_ERR)/@name)"!]
    [!ELSE!]
      [!VAR "EthMasterHifDemDetectTMUError" ="num:i(0)"!]
    [!ENDIF!]
    [!IF "node:exists(EthGeneral/EthVendorSpecific/EthPlatformDemEventParameterRefs/ETH_E_EMAC_ERR) and node:refvalid(EthGeneral/EthVendorSpecific/EthPlatformDemEventParameterRefs/ETH_E_EMAC_ERR)"!]
      [!VAR "EthMasterHifDemDetectEMACError" ="concat('DemConf_DemEventParameter_',node:ref(EthGeneral/EthVendorSpecific/EthPlatformDemEventParameterRefs/ETH_E_EMAC_ERR)/@name)"!]
    [!ELSE!]
      [!VAR "EthMasterHifDemDetectEMACError" ="num:i(0)"!]
    [!ENDIF!]
    [!IF "node:exists(EthGeneral/EthVendorSpecific/EthPlatformDemEventParameterRefs/ETH_E_PHY_IF_ERR) and node:refvalid(EthGeneral/EthVendorSpecific/EthPlatformDemEventParameterRefs/ETH_E_PHY_IF_ERR)"!]
      [!VAR "EthMasterHifDemDetectPhysicalInterfaceError" ="concat('DemConf_DemEventParameter_',node:ref(EthGeneral/EthVendorSpecific/EthPlatformDemEventParameterRefs/ETH_E_PHY_IF_ERR)/@name)"!]
    [!ELSE!]
      [!VAR "EthMasterHifDemDetectPhysicalInterfaceError" ="num:i(0)"!]
    [!ENDIF!]
    [!IF "node:exists(EthGeneral/EthVendorSpecific/EthPlatformDemEventParameterRefs/ETH_43_PFE_CFG_DEM_E_TRANSMIT) and node:refvalid(EthGeneral/EthVendorSpecific/EthPlatformDemEventParameterRefs/ETH_43_PFE_CFG_DEM_E_TRANSMIT)"!]
      [!VAR "EthMasterHifDemDetectTransmittionError" ="concat('DemConf_DemEventParameter_',node:ref(EthGeneral/EthVendorSpecific/EthPlatformDemEventParameterRefs/ETH_43_PFE_CFG_DEM_E_TRANSMIT)/@name)"!]
    [!ELSE!]
      [!VAR "EthMasterHifDemDetectTransmittionError" ="num:i(0)"!]
    [!ENDIF!]
    [!IF "node:exists(EthGeneral/EthVendorSpecific/EthPlatformDemEventParameterRefs/ETH_43_PFE_CFG_DEM_E_INV_FRAME) and node:refvalid(EthGeneral/EthVendorSpecific/EthPlatformDemEventParameterRefs/ETH_43_PFE_CFG_DEM_E_INV_FRAME)"!]
      [!VAR "EthMasterHifDemDetectInvalidFrame" ="concat('DemConf_DemEventParameter_',node:ref(EthGeneral/EthVendorSpecific/EthPlatformDemEventParameterRefs/ETH_43_PFE_CFG_DEM_E_INV_FRAME)/@name)"!]
    [!ELSE!]
      [!VAR "EthMasterHifDemDetectInvalidFrame" ="num:i(0)"!]
    [!ENDIF!]
    #define ETH_43_PFE_CFG_DEM_E_INTERNAL_FAILURE          [!"$EthDemDetectInternalFailure"!]
    #define ETH_43_PFE_CFG_DEM_E_LOG_IF_ERR                [!"$EthDemDetectLogicalInterfaceError"!]
    #define ETH_43_PFE_CFG_DEM_E_TMU_ERR                   [!"$EthMasterHifDemDetectTMUError"!]
    #define ETH_43_PFE_CFG_DEM_E_EMAC_ERR                  [!"$EthMasterHifDemDetectEMACError"!]
    #define ETH_43_PFE_CFG_DEM_E_PHY_IF_ERR                [!"$EthMasterHifDemDetectPhysicalInterfaceError"!]
    #define ETH_43_PFE_CFG_DEM_E_TRANSMITTION_ERR          [!"$EthMasterHifDemDetectTransmittionError"!]
    #define ETH_43_PFE_CFG_DEM_E_INV_FRAME_ERR             [!"$EthMasterHifDemDetectInvalidFrame"!]
#endif /* ETH_43_PFE_DEM_EVENT_DETECT */
[!ENDIF!][!//
/*==================================================================================================
*                                             ENUMS
==================================================================================================*/

/*==================================================================================================
*                                STRUCTURES AND OTHER TYPEDEFS
==================================================================================================*/
/*
* @brief This type is used to store configuration for common HIF
*/
typedef struct
{
    uint16 u16RxBDNum;
    uint16 u16TxBDNum;
    uint16 u16RxBufNum;
    uint16 u16RxBufSize;
} Eth_43_PFE_HifCfgType;

typedef struct
{
    fifo_t *EthCtrlConfigEgressFifo;           /**< Tx FIFO */
    void **EthCtrlConfigEgressFifoData;        /**< Tx FIFO data pool start */
    uint16 EthCtrlConfigEgressFifoBufLenByte;  /**< Length of one Tx buffer */
    uint16 EthCtrlConfigEgressFifoMemLenByte;  /**< Length of one Tx buffer in memory */
    uint16 EthCtrlConfigEgressFifoBufTotal;    /**< Number of Tx buffers */
} Eth_43_PFE_EgressTxCfgType;

typedef struct
{
    fifo_t *EthCtrlConfigIngressFifo;          /**< Rx FIFO */
    void **EthCtrlConfigIngressFifoData;       /**< Rx FIFO data pool start */
    uint16 EthCtrlConfigIngressFifoBufLenByte; /**< Length of one Rx buffer*/
    uint16 EthCtrlConfigIngressFifoBufTotal;   /**< Number of Rx buffers */
} Eth_43_PFE_IngressCfgType;

typedef enum
{
    IS_SHEDULER = 0U,
    IS_SHAPER   = 1U,
    IS_FIFO     = 2U
} Eth_43_PFE_SchedulerInputType;

typedef struct
{
    uint8 u8Input; /**< range: 0-7 correspond to one of 8 inputs of scheduler */
    uint32 u32Weight; /**< Scheduler input weight */
    Eth_43_PFE_SchedulerInputType SchInputType; /**< Scheduler input is scheduler, shaper or fifo */
    uint8 u8InputIdx; /**< Scheduler index/ Shaper index/ Fifo index */
} Eth_43_PFE_SchedulerInputInfoCfgType;

typedef struct
{
    boolean IsLastSch; /*!< This is the last scheduler in topology or not */
    pfe_tmu_sched_algo_t SchAlgo; /*!< Scheduler algorithm */
    pfe_tmu_rate_mode_t SchRateMode; /*!< Scheduler rate mode */
    uint8 SchInputCnt; /*!< The number of inputs assigned to scheduler */
    const Eth_43_PFE_SchedulerInputInfoCfgType *pSchInputInfoCfg; /*!< Store information for inputs of scheduler */
} Eth_43_PFE_SchedulerCfgType;

typedef struct
{
    uint8 u8ShpIdx; /**< range: 0-3 */
    uint32 u32IdleSlope;
    int32_t s32MaxCredit;
    int32_t s32MinCredit;
    uint8 u8FifoIdx; /*!< The index of FIFO connected to shaper */
} Eth_43_PFE_ShaperCfgType;

typedef struct
{
    pfe_emac_mii_mode_t EthCtrlMiiType; /**< Mii type MII/RMII/SGMII/RGMII */
    pfe_emac_speed_t EthCtrlSpeed; /**< Link speed 10/100/1000/2500(if applicable to xmii) */
    pfe_emac_duplex_t EthCtrlDuplex; /**< Duplex mode FULL/HALF */
}Eth_43_PFE_EmacCfg;

#if (STD_ON == ETH_43_PFE_CTRLENABLE_MII)
/**
 * @brief    Type for holding function pointers to the EthTrcv
 * @details  It contains the needed function pointers to EthTrcv functions.
 */
typedef struct
{
    void (*ReadMiiIndicationFunction)(uint8 CtrlIdx, uint8 TrcvIdx, uint8 RegIdx, uint16 RegVal);
    void (*WriteMiiIndicationFunction)(uint8 CtrlIdx, uint8 TrcvIdx, uint8 RegIdx);

}Eth_43_PFE_EthTrcvFunctionsType;
#endif

#if (STD_ON == ETH_43_PFE_SWT_MANAGEMENT_SUPPORT_API)
/**
 * @brief    Type for holding function pointers to the EthSwt
 * @details  It contains the needed function pointers to EthSwt functions.
 */
typedef struct
{
    void (*TxAdaptBufferLengthFunction)(uint16* LengthPtr);
    Std_ReturnType (*TxPrepareFrameFunction)(uint8 CtrlIdx, Eth_BufIdxType BufIdx, uint8** DataPtr, uint16* LengthPtr);
    Std_ReturnType (*TxProcessFrameFunction)(uint8 CtrlIdx, Eth_BufIdxType BufIdx, uint8** DataPtr, uint16* LengthPtr);
    Std_ReturnType (*TxFinishedIndicationFunction)(uint8 CtrlIdx, Eth_BufIdxType BufIdx);
    Std_ReturnType (*RxProcessFrameFunction)(uint8 CtrlIdx, Eth_BufIdxType BufIdx, uint8** DataPtr, uint16* LengthPtr, boolean* IsMgmtFrameOnlyPtr);
    Std_ReturnType (*RxFinishedIndicationFunction)(uint8 CtrlIdx, Eth_BufIdxType BufIdx);

}Eth_43_PFE_EthSwtFunctionsType;
#endif

/**
* @brief         Type for Ethernet driver configuration values storage.
* @details       This type is used to collect and pass all configuration data
*                of one controller (except those which have only
*                precompile variant) to the Eth driver.
*/
typedef struct
{
    uint8 EthMACAddress[6U];     /**< MAC address */
    char *EthCtrlHwPort; /**< Port to be attached to the controller */
    boolean EthCtrlPromiscuous; /**< Promiscuous mode enabled/disabled */
    boolean EthCtrlBroadcast; /**< Broadcast reception enabled/disabled */
    boolean EthCtrlEmacLoop;  /**< Broadcast reception enabled/disabled */
    boolean EthCtrlAcceptAllTraffic;  /**< Reception of all traffic from associated EMAC enabled/disabled */
    pfe_emac_mii_mode_t EthCtrlMiiType; /**< Mii type MII/RMII/SGMII/RGMII */
    pfe_emac_speed_t EthCtrlSpeed; /**< Link speed 10/100/2500(if applicable to xmii) */
    pfe_emac_duplex_t EthCtrlDuplex; /**< Duplex mode FULL/HALF */
    uint8 EthCtrlEthIfIdx;    /**< Index of the controler in context of EthIf driver */
    const Eth_43_PFE_EgressTxCfgType *pEgressCfg;
    const Eth_43_PFE_IngressCfgType *pIngressCfg;
    uint8 EthCtrlEgressFifoCnt;     /**< Number of egress queues */
    uint16 EthCtrlEgressFifoDepth;  /**< Maximum number of buffers in egress fifo */
    uint16 EthCtrlIngressFifoDepth; /**< Maximum number of buffers in ingress fifo */
    uint8 EthCtrlEgressPrioToFifoIdx[ETH_43_PFE_MAX_TX_PRIO_NUM+1U]; /**< Mapping egress FIFOs to the frame priority */
    const Eth_43_PFE_SchedulerCfgType *pSchCfg;
    uint8 EthCtrlSchedulerCnt; /**< Number of schedulers */
    const Eth_43_PFE_ShaperCfgType *pShpCfg;
    uint8 EthCtrlShaperCnt; /**< Number of shapers */
#if (STD_ON == ETH_43_PFE_DEM_EVENT_DETECT)
    Mcal_DemErrorType ETH_43_PFE_DEM_E_ACCESS_Cfg; /**< Contains enablement of specific
                                                error report and value assigned
                                                by Dem as ETH_43_PFE_E_ACCESS and   */
    Mcal_DemErrorType ETH_43_PFE_E_RX_FRAMES_LOST_Cfg; /**< Contains enablement of specific
                                                error report and value assigned
                                                by Dem as ETH_43_PFE_E_ACCESS and   */
    Mcal_DemErrorType ETH_43_PFE_E_CRC_Cfg; /**< Contains enablement of specific
                                                error report and value assigned
                                                by Dem as ETH_43_PFE_E_CRC and   */
    Mcal_DemErrorType ETH_43_PFE_E_UNDERSIZEFRAME_Cfg; /**< Contains enablement of specific
                                                error report and value assigned
                                                by Dem as ETH_43_PFE_E_UNDERSIZEFRAME and   */
    Mcal_DemErrorType ETH_43_PFE_E_OVERSIZEFRAME_Cfg; /**< Contains enablement of specific
                                                error report and value assigned
                                                by Dem as ETH_43_PFE_E_OVERSIZEFRAME and   */
    Mcal_DemErrorType ETH_43_PFE_E_ALIGNMENT_Cfg; /**< Contains enablement of specific
                                                error report and value assigned
                                                by Dem as ETH_43_PFE_E_ALIGNMENT and   */
    Mcal_DemErrorType ETH_43_PFE_E_SINGLECOLLISION_Cfg; /**< Contains enablement of specific
                                                error report and value assigned
                                                by Dem as ETH_43_PFE_E_SINGLECOLLISION and   */
    Mcal_DemErrorType ETH_43_PFE_E_MULTIPLECOLLISION_Cfg; /**< Contains enablement of specific
                                                error report and value assigned
                                                by Dem as ETH_43_PFE_E_MULTIPLECOLLISION and   */
    Mcal_DemErrorType ETH_43_PFE_E_LATECOLLISION_Cfg; /**< Contains enablement of specific
                                                error report and value assigned
                                                by Dem as ETH_43_PFE_E_LATECOLLISION and   */
#endif /* ETH_43_PFE_DEM_EVENT_DETECT */
#if (STD_ON == ETH_43_PFE_CTRLENABLE_MII)
    const Eth_43_PFE_EthTrcvFunctionsType Eth_43_PFE_EthTrcvDriverFunctionList;  /**< @brief The structure with pointer functions to the EthTrcv driver functions */
#endif
#if (STD_ON == ETH_43_PFE_SWT_MANAGEMENT_SUPPORT_API)
    const Eth_43_PFE_EthSwtFunctionsType Eth_43_PFE_EthSwtDriverFunctionList; /**< @brief The structure with pointer functions to the EthSwt driver functions */
#endif
} Eth_43_PFE_CtrlCfgType;

/**
* @brief         Type for Ethernet driver Static configuration values storage.
* @details       This type is used to collect and pass all configuration data
*                of one controller (except those which have only
*                precompile variant) to the Eth driver.
*/
typedef struct
{
    boolean EnableRxInterrupt;  /**< Enable interrupt requests for frame
                                      reception event */
    boolean EnableTxInterrupt;  /**< Enable interrupt requests for
                                      frame transmission event */
    boolean MDIOSupport;        /**< Support MDIO for current controller */
} Eth_43_PFE_StaticCtrlCfgType;

/*
* @brief This type is used to group all multiple configurations.
*/
typedef struct
{
    const Eth_43_PFE_CtrlCfgType *pController[ETH_43_PFE_MAXCTRLS_SUPPORTED];
    const Eth_43_PFE_HifCfgType *pHif;
    const Eth_43_PFE_EmacCfg *emac;
} Eth_43_PFE_ConfigType;
/*
* @brief This type is used to group Static configuration for all controllers.
*/
typedef struct
{
    const Eth_43_PFE_StaticCtrlCfgType * pController[ETH_43_PFE_MAXCTRLS_SUPPORTED];
} Eth_43_PFE_StaticConfigType;

/*
* @brief HIF driver per controller client static FIFO declarations
*/
[!SELECT "EthConfigSet"!][!// Select configuration
[!VAR "ConfigSet" = "as:name(.)"!]
[!LOOP "EthCtrlConfig/*"!]
[!CALL "GetDemParameters"!]
[!VAR "CtrlConfigName" = "name(.)"!]
typedef struct
{
    fifo_t rx_fifo[ETH_43_PFE_MAX_RXFIFO_CONFIG];
    fifo_t tx_conf_fifo[[!"num:i(count(EthCtrlConfigEgress/EthCtrlConfigEgressFifo/*))"!]U];
    [!CALL "rx_tx_fifo_depth_per_controller"!][!// output: rx_fifo_buf_num_max tx_fifo_buf_num_max
    void *rx_fifo_data[RXTX_FIFO_ALIGNED_DEPTH([!"num:i($rx_fifo_buf_num_max)"!]U) * ETH_43_PFE_MAX_RXFIFO_CONFIG];
    void *tx_conf_fifo_data[(RXTX_FIFO_ALIGNED_DEPTH([!"num:i($tx_fifo_buf_num_max)"!]U)) * [!"num:i(count(EthCtrlConfigEgress/EthCtrlConfigEgressFifo/*))"!]U];
} Pfe_Hif_Drv_Client_FIFOs_[!"$ConfigSet"!]_[!"$CtrlConfigName"!]_t;
[!CR!][!ENDLOOP!]
[!ENDSELECT!]

/*==================================================================================================
*                                GLOBAL VARIABLE DECLARATIONS
==================================================================================================*/
#define ETH_43_PFE_START_SEC_CONST_UNSPECIFIED

#include "Eth_43_PFE_MemMap.h"

/* Configuration for parameters which are not variant */
extern const Eth_43_PFE_StaticConfigType Eth_43_PFE_StaticConfig;

#define ETH_43_PFE_STOP_SEC_CONST_UNSPECIFIED

#include "Eth_43_PFE_MemMap.h"

#define ETH_43_PFE_START_SEC_CONFIG_DATA_UNSPECIFIED

#include "Eth_43_PFE_MemMap.h"

[!IF "((IMPLEMENTATION_CONFIG_VARIANT != 'VariantPostBuild') and (variant:size()>1)) or (IMPLEMENTATION_CONFIG_VARIANT = 'VariantPostBuild')"!][!//
    [!SELECT "EthConfigSet"!][!// Select configuration
        [!VAR "ConfigSet" = "as:name(.)"!]
        [!VAR "variantIndex"="0"!]
        [!VAR "variantNumber"="variant:size()"!]
        [!LOOP "variant:all()"!]
            [!IF "(IMPLEMENTATION_CONFIG_VARIANT != 'VariantPostBuild' and (variant:size() <= 1))"!][!//
            [!ELSE!][!//
                [!CODE!][!WS4!]extern const Eth_43_PFE_ConfigType Eth_43_PFE_Config[!IF "var:defined('postBuildVariant')"!]_[!"$postBuildVariant"!][!ENDIF!];[!CR!][!ENDCODE!][!//
            [!ENDIF!][!//
            [!VAR "variantIndex"="$variantIndex + 1"!]
        [!ENDLOOP!]
    [!ENDSELECT!]
[!ELSE!][!//
    [!CODE!][!WS4!]extern const Eth_43_PFE_ConfigType Eth_43_PFE_Config;[!CR!][!ENDCODE!][!//
[!ENDIF!][!//
#define ETH_43_PFE_STOP_SEC_CONFIG_DATA_UNSPECIFIED

#include "Eth_43_PFE_MemMap.h"

/*==================================================================================================
*                                    FUNCTION PROTOTYPES
==================================================================================================*/

#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* ETH_43_PFE_CFG_H */
/** @} */
