MCUSW
Eth_Cfg.h
Go to the documentation of this file.
1 /*
2 *
3 * Copyright (c) 2023 Texas Instruments Incorporated
4 *
5 * All rights reserved not granted herein.
6 *
7 * Limited License.
8 *
9 * Texas Instruments Incorporated grants a world-wide, royalty-free, non-exclusive
10 * license under copyrights and patents it now or hereafter owns or controls to make,
11 * have made, use, import, offer to sell and sell ("Utilize") this software subject to the
12 * terms herein. With respect to the foregoing patent license, such license is granted
13 * solely to the extent that any such patent is necessary to Utilize the software alone.
14 * The patent license shall not apply to any combinations which include this software,
15 * other than combinations with devices manufactured by or for TI ("TI Devices").
16 * No hardware patent is licensed hereunder.
17 *
18 * Redistributions must preserve existing copyright notices and reproduce this license
19 * (including the above copyright notice and the disclaimer and (if applicable) source
20 * code license limitations below) in the documentation and/or other materials provided
21 * with the distribution
22 *
23 * Redistribution and use in binary form, without modification, are permitted provided
24 * that the following conditions are met:
25 *
26 * * No reverse engineering, decompilation, or disassembly of this software is
27 * permitted with respect to any software provided in binary form.
28 *
29 * * any redistribution and use are licensed by TI for use only with TI Devices.
30 *
31 * * Nothing shall obligate TI to provide you with source code for the software
32 * licensed and provided to you in object code.
33 *
34 * If software source code is provided to you, modification and redistribution of the
35 * source code are permitted provided that the following conditions are met:
36 *
37 * * any redistribution and use of the source code, including any resulting derivative
38 * works, are licensed by TI for use only with TI Devices.
39 *
40 * * any redistribution and use of any object code compiled from the source code
41 * and any resulting derivative works, are licensed by TI for use only with TI Devices.
42 *
43 * Neither the name of Texas Instruments Incorporated nor the names of its suppliers
44 *
45 * may be used to endorse or promote products derived from this software without
46 * specific prior written permission.
47 *
48 * DISCLAIMER.
49 *
50 * THIS SOFTWARE IS PROVIDED BY TI AND TI'S LICENSORS "AS IS" AND ANY EXPRESS
51 * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
52 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
53 * IN NO EVENT SHALL TI AND TI'S LICENSORS BE LIABLE FOR ANY DIRECT, INDIRECT,
54 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
55 * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
56 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
57 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
58 * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
59 * OF THE POSSIBILITY OF SUCH DAMAGE.
60 *
61 */
62 
69 /*******************************************************************************
70  Project : J721E
71  Date : 2023-02-14 09:12:40
72  SW Ver : 2.1.0
73  Module Rele Ver : AUTOSAR 4.3.1 0
74 
75  This file is generated by EB Tresos
76  Do not modify this file,otherwise the software may behave in unexpected way.
77 *******************************************************************************/
78 
86 #ifndef ETH_CFG_H_
87 #define ETH_CFG_H_
88 
89 /* ========================================================================== */
90 /* Include Files */
91 /* ========================================================================== */
92 #include "Dem.h"
93 #include "Os.h"
94 #include "Eth_Types.h"
95 #include "Eth_LL_Types.h"
96 #include "Udma_Types.h"
97 #include "EthIf_Cbk.h"
98 
99 #ifdef __cplusplus
100 extern "C" {
101 #endif
102 
103 /* ========================================================================== */
104 /* Macros & Typedefs */
105 /* ========================================================================== */
107 #define ETH_VERSION_INFO_API (STD_ON)
108 
110 #define ETH_GLOBALTIMESUPPORT_API (STD_ON)
111 
113 #define ETH_DEV_ERROR_DETECT (STD_ON)
114 
116 #define ETH_GET_COUNTER_VALUES_API (STD_ON)
117 
119 #define ETH_GET_RX_STATS_API (STD_ON)
120 
122 #define ETH_GET_TX_STATS_API (STD_ON)
123 
125 #define ETH_GET_TX_ERROR_COUNTERSVALUES_API (STD_ON)
126 
127 
129 #define ETH_CTRL_ENABLE_OFFLOAD_CHECKSUM_ICMP (STD_OFF)
130 
132 #define ETH_CTRL_ENABLE_OFFLOAD_CHECKSUM_IPV4 (STD_OFF)
133 
135 #define ETH_CTRL_ENABLE_OFFLOAD_CHECKSUM_TCP (STD_OFF)
136 
138 #define ETH_CTRL_ENABLE_OFFLOAD_CHECKSUM_UDP (STD_OFF)
139 
140 
142 #define ETH_ENABLE_MII_API (STD_ON)
143 
145 #define ETH_UPDATE_PHYS_ADDR_FILTER_API (STD_ON)
146 
148 #define ETH_VIRTUALMAC_NOTIFYMSGRECEIVED_API (STD_OFF)
149 
151 #define ETH_VIRTUALMAC_SUBSCRIBEALLTRAFFIC_API (STD_OFF)
152 
154 #define ETH_VIRTUALMAC_UNSUBSCRIBEALLTRAFFIC_API (STD_OFF)
155 
157 #define ETH_VIRTUALMAC_SUBSCRIBEDSTMAC_API (STD_OFF)
158 
160 #define ETH_VIRTUALMAC_UNSUBSCRIBEDSTMAC_API (STD_OFF)
161 
163 #define ETH_VIRTUALMAC_ASSOCIATEIPV4MACADDR_API (STD_OFF)
164 
166 #define ETH_VIRTUALMAC_DISASSOCIATEIPV4MACADDR_API (STD_OFF)
167 
169 #define ETH_VIRTUALMAC_ADD_UNICAST_MACADDR_API (STD_OFF)
170 
172 #define ETH_VIRTUALMAC_ADD_MCAST_MACADDR_API (STD_OFF)
173 
175 #define ETH_VIRTUALMAC_DEL_MACADDR_API (STD_OFF)
176 
178 #define ETH_VIRTUALMAC_SEND_CUSTOM_NOTIFY_API (STD_OFF)
179 
181 #define ETH_VIRTUALMAC_ADD_VLAN_API (STD_OFF)
182 
184 #define ETH_VIRTUALMAC_DEL_VLAN_API (STD_OFF)
185 
186 
188 #define ETH_ISR_TYPE (ETH_ISR_CAT2)
189 
190 #define ETH_OS_COUNTER_ID ((CounterType)OsCounter_0)
191 
192 #define ETH_OS_COUNTER_FREQ (1000000000U)
193 
195 #define ETH_VIRTUALMAC_SUPPORT (STD_OFF)
196 
197 #define ETH_VIRTUALMAC_FWINFO_TIMEOUT (0U)
198 
203 #define EthConf_EthCtrlConfig_EthConfig_0 (0U)
204 
210 #define ETH_PRE_COMPILE_VARIANT (STD_ON)
211 #define ETH_LINK_TIME_VARIANT (STD_OFF)
212 #define ETH_POST_BUILD_VARIANT (STD_OFF)
213 /* @} */
214 
218 #define ETH_CTRL_ID_MAX (1u)
219 
224 #define ETH_DMA_IR_SUPPORT (STD_ON)
225 #define ETH_DMA_CQ_RING_SUPPORT (STD_ON)
226 #define ETH_DMA_TEARDOWN_SUPPORT (STD_ON)
227 /* @} */
228 
233 #define UDMA_DEVICE_ID_RING (235U)
234 #define UDMA_DEVICE_ID_UDMA (236U)
235 #define UDMA_DEVICE_ID_PSIL (232U)
236 #define UDMA_DEVICE_ID_IA (233U)
237 #define UDMA_DEVICE_ID_IR (237U)
238 #define UDMA_DEVICE_ID_CORE (250U)
239 /* @} */
240 
245 #define UDMA_TX_CHANNEL_PEER_OFFSET (0xf000U)
246 #define UDMA_RX_CHANNEL_PEER_OFFSET (0x7000U)
247 #define UDMA_SOURCE_THREAD_OFFSET (0x6000U)
248 #define UDMA_DEST_THREAD_OFFSET (0xe000U)
249 /* @} */
250 
255 #define ETH_DMA_TX_BASE_REG (0x2aa00000U)
256 #define ETH_DMA_RX_BASE_REG (0x2a800000U)
257 #define ETH_DMA_RINGRT_BASE (0x2b800000U)
258 #define ETH_DMA_RINGCFG_BASE (0x28440000U)
259 #define ETH_DMA_INTAGGR_INTR_BASE (0x2a700000U)
260 /* @} */
261 
266 #define ETH_DMA_TXCRT_CHAN_CTL(CHAN) (0x00000000U + ((CHAN) * 0x1000U))
267 #define ETH_DMA_TXCRT_CHAN_PEER8(CHAN) (0x00000220U + ((CHAN) * 0x1000U))
268 #define ETH_DMA_RXCRT_CHAN_CTL(CHAN) (0x00000000U + ((CHAN) * 0x1000U))
269 #define ETH_DMA_RXCRT_CHAN_PEER8(CHAN) (0x00000220U + ((CHAN) * 0x1000U))
270 
271 #define ETH_DMA_RINGRT_RING_FDB(RING) (0x00000010U + ((RING) * 0x1000U))
272 #define ETH_DMA_RINGRT_RING_FOCC(RING) (0x00000018U + ((RING) * 0x1000U))
273 #define ETH_DMA_RINGRT_RING_RDB(RING) (0x00000010U + ((RING) * 0x1000U))
274 #define ETH_DMA_RINGRT_RING_ROCC(RING) (0x00000018U + ((RING) * 0x1000U))
275 #define ETH_DMA_RINGCFG_RING_SIZE(RING) (0x00000048U + ((RING) * 0x100U))
276 
277 #define ETH_DMA_INTAGGR_INTR_VINT_ENABLE_SET(VINT) (ETH_DMA_INTAGGR_INTR_BASE + 0x00000000U + ((VINT) * 0x1000U))
278 #define ETH_DMA_INTAGGR_INTR_VINT_ENABLE_CLEAR(VINT) (ETH_DMA_INTAGGR_INTR_BASE + 0x00000008U + ((VINT) * 0x1000U))
279 #define ETH_DMA_INTAGGR_INTR_VINT_STATUS_SET(VINT) (ETH_DMA_INTAGGR_INTR_BASE + 0x00000010U + ((VINT) * 0x1000U))
280 #define ETH_DMA_INTAGGR_INTR_VINT_STATUS_CLEAR(VINT) (ETH_DMA_INTAGGR_INTR_BASE + 0x00000018U + ((VINT) * 0x1000U))
281 #define ETH_DMA_INTAGGR_INTR_VINT_STATUSM(VINT) (ETH_DMA_INTAGGR_INTR_BASE + 0x00000020U + ((VINT) * 0x1000U))
282 
283 #define Eth_GetRingFDBReg(RingNum) (ETH_DMA_RINGRT_BASE + ETH_DMA_RINGRT_RING_FDB((RingNum)))
284 #define Eth_GetRingFOCCReg(RingNum) (ETH_DMA_RINGRT_BASE + ETH_DMA_RINGRT_RING_FOCC((RingNum)))
285 #define Eth_GetRingRDBReg(RingNum) (ETH_DMA_RINGRT_BASE + ETH_DMA_RINGRT_RING_RDB((RingNum)))
286 #define Eth_GetRingROCCReg(RingNum) (ETH_DMA_RINGRT_BASE + ETH_DMA_RINGRT_RING_ROCC((RingNum)))
287 #define Eth_GetRingSizeReg(RingNum) (ETH_DMA_RINGCFG_BASE + ETH_DMA_RINGCFG_RING_SIZE((RingNum)))
288 
289 #define Eth_GetTxChannelCtlRegAddress(ChanId) (ETH_DMA_TX_BASE_REG + ETH_DMA_TXCRT_CHAN_CTL((ChanId)))
290 #define Eth_GetTxChannelPeer8RegAddress(ChanId) (ETH_DMA_TX_BASE_REG + ETH_DMA_TXCRT_CHAN_PEER8((ChanId)))
291 #define Eth_GetRxChannelCtlRegAddress(ChanId) (ETH_DMA_RX_BASE_REG + ETH_DMA_RXCRT_CHAN_CTL((ChanId)))
292 #define Eth_GetRxChannelPeer8RegAddress(ChanId) (ETH_DMA_RX_BASE_REG + ETH_DMA_RXCRT_CHAN_PEER8((ChanId)))
293 /* @} */
294 
298 #define UDMA_WAIT_TEARDOWN_COUNTER (10000u)
299 
300 
305 #define Eth_GetDem_E_HARDWARE_ERROR(CtrlIndex) ( ETH_DEM_NO_EVENT )
306 #define Eth_GetDem_E_LATECOLLISION(CtrlIndex) ( ETH_DEM_NO_EVENT )
307 #define Eth_GetDem_E_MULTIPLECOLLISION(CtrlIndex) ( ETH_DEM_NO_EVENT )
308 #define Eth_GetDem_E_SINGLECOLLISION(CtrlIndex) ( ETH_DEM_NO_EVENT )
309 #define Eth_GetDem_E_ALIGNMENT(CtrlIndex) ( ETH_DEM_NO_EVENT )
310 #define Eth_GetDem_E_OVERSIZEFRAME(CtrlIndex) ( ETH_DEM_NO_EVENT )
311 #define Eth_GetDem_E_UNDERSIZEFRAME(CtrlIndex) ( ETH_DEM_NO_EVENT )
312 #define Eth_GetDem_E_CRC(CtrlIndex) ( ETH_DEM_NO_EVENT )
313 #define Eth_GetDem_E_RX_FRAMES_LOST(CtrlIndex) ( ETH_DEM_NO_EVENT )
314 #define Eth_GetDem_E_ACCESS(CtrlIndex) ( ETH_DEM_NO_EVENT )
315 #define Eth_GetDem_E_TX_INTERNAL(CtrlIndex) ( ETH_DEM_NO_EVENT )
316 /* @} */
317 
322 #define Eth_IsVirtualMacModeEnable(CtrlIndex) ( FALSE )
323 #define Eth_GetTxChannelThreadOffset(CtrlIndex) ( 0xf000U )
324 #define Eth_VirtMacGetEthFwRpcComChannelId(CtrlIndex) ( 0xFFFFU )
325 #define Eth_VirtMacGetEthPollRecvMsgInEthMain(CtrlIndex) ( FALSE )
326 #define Eth_VirtMacGetRpcCmdCompleteFuncPtr(CtrlIndex) ( (Eth_RpcCmdComplete)NULL_PTR )
327 #define Eth_VirtMacGetFwRegisterFuncPtr(CtrlIndex) ( (Eth_RpcFwRegistered)NULL_PTR )
328 
329 #define Eth_GetTxEnableInterrupt(CtrlIndex) ( TRUE )
330 #define Eth_GetRxEnableInterrupt(CtrlIndex) ( TRUE )
331 #define Eth_GetEnetType(CtrlIndex) ( ETH_ENETTYPE_CPSW2G )
332 #define Eth_GetMacPortNum(CtrlIndex) ( ETH_PORT_MAC_PORT_1 )
333 #define Eth_GetMacAddressHigh(CtrlIndex) ( 0xaabbccddU )
334 #define Eth_GetMacAddressLow(CtrlIndex) ( 0xeeffU )
335 #define Eth_UseDefaultMacAddress(CtrlIndex) ( TRUE )
336 #define Eth_GetMiiConnectionType(CtrlIndex) ( ETH_MAC_CONN_TYPE_RGMII_FORCE_1000_FULL )
337 #define Eth_GetLoopBackMode(CtrlIndex) ( FALSE )
338 #define Eth_GetHardwareLoopTimeout(CtrlIndex) ( 32000U )
339 #define Eth_GetEnableCacheOps(CtrlIndex) ( TRUE )
340 #define Eth_GetCacheWritebackInvalidateFuncPtr(CtrlIndex) ( &EthApp_wbInvCache )
341 #define Eth_GetCacheWritebackFuncPtr(CtrlIndex) ( &EthApp_wbCache )
342 #define Eth_GetCacheInvalidateFuncPtr(CtrlIndex) ( &EthApp_invCache )
343 #define Eth_DescriptorGetCacheWritebackInvalidateFuncPtr(CtrlIndex) ( Eth_GetCacheWritebackInvalidateFuncPtr(CtrlIndex) )
344 #define Eth_DescriptorGetCacheWritebackFuncPtr(CtrlIndex) ( Eth_GetCacheWritebackFuncPtr(CtrlIndex) )
345 #define Eth_DescriptorGetCacheInvalidateFuncPtr(CtrlIndex) ( Eth_GetCacheInvalidateFuncPtr(CtrlIndex) )
346 #define Eth_RingGetCacheWritebackInvalidateFuncPtr(CtrlIndex) ( Eth_GetCacheWritebackInvalidateFuncPtr(CtrlIndex) )
347 #define Eth_RingGetCacheWritebackFuncPtr(CtrlIndex) ( Eth_GetCacheWritebackFuncPtr(CtrlIndex) )
348 #define Eth_RingGetCacheInvalidateFuncPtr(CtrlIndex) ( Eth_GetCacheInvalidateFuncPtr(CtrlIndex) )
349 
350 #define Eth_Cpsw_GetPhyMacRegAddr() ( 0x40f00200U )
351 #define Eth_Cpsw_GetAleRegAddr() ( 0x4603e000U )
352 #define Eth_Cpsw_GetCptsRegAddr() ( 0x4603d000U )
353 #define Eth_Cpsw_GetMdioRegAddr() ( 0x46000f00U )
354 #define Eth_Cpsw_GetCtrlRegAddr() ( 0x46020000U )
355 #define Eth_Cpsw_GetCptsRefClockFreq() ( 1U )
356 #define Eth_Cpsw_GetCppiClockFreq() ( 333333333U )
357 
358 #define Eth_Cpsw_GetMdioBusClockFreq(CtrlIndex) ( 2200000U )
359 #define Eth_Cpsw_GetMdioOpMode(CtrlIndex) ( ETH_MDIO_OPMODE_MANUAL )
360 
361 #define Eth_GetRxMtuLength(CtrlIndex) ( 1522U )
362 #define Eth_GetTxChanStartNum(CtrlIndex) ( 30U )
363 #define Eth_GetRxChanStartNum(CtrlIndex) ( 30U )
364 #define Eth_GetEgressFifoTotalNum(CtrlIndex) ( 1U )
365 #define Eth_GetIngressFifoTotalNum(CtrlIndex) ( 1U )
366 #define Eth_GetRingTotalNum(CtrlIndex) ( 6U )
367 #define Eth_GetTxChanTotalNum(CtrlIndex) ( 1U )
368 #define Eth_GetRxChanTotalNum(CtrlIndex) ( 1U )
369 #define Eth_GetFlowTotalNumber(CtrlIndex) ( 1U )
370 #define Eth_GetEventTotalNum(CtrlIndex) ( 2U )
371 #define Eth_GetRingEventTotalNum(CtrlIndex) ( 2U )
372 
373 #define Eth_GetEgressFifoPacketNum(CtrlIndex, FifoIdx) ( 128U )
374 #define Eth_GetEgressFifoPacketSize(CtrlIndex, FifoIdx) ( 1522U )
375 
376 #define Eth_GetIngressFifoPacketNum(CtrlIndex, FifoIdx) ( 128U )
377 #define Eth_GetIngressFifoPacketSize(CtrlIndex, FifoIdx) ( 1522U )
378 
379 #define Eth_GetEgressFifoDescAddress(CtrlIndex, FifoIdx, DescIdx) (&Eth_Ctrl_0_Egress_Descriptor_0[(DescIdx)] )
380 #define Eth_GetEgressFifoDescUserInfoAddress(CtrlIndex, FifoIdx, DescIdx) (&Eth_Ctrl_0_Egress_Descriptor_0[(DescIdx)].bufferInfo )
381 #define Eth_GetEgressFifoBufferDataAddress(CtrlIndex, FifoIdx, DescIdx) (&Eth_Ctrl_0_Egress_BufferMem_0[(DescIdx) * 1536U] )
382 #define Eth_GetEgressFifoQueueAddress(CtrlIndex, FifoIdx) ( Eth_Ctrl_0_Egress_Queue_0 )
383 #define Eth_GetEgressFifoBufferState(CtrlIndex, FifoIdx, BufferIdx) ( Eth_Ctrl_0_Egress_BufferState_0[BufferIdx] )
384 #define Eth_SetEgressFifoBufferState(CtrlIndex, FifoIdx, BufferIdx, Val) ( Eth_Ctrl_0_Egress_BufferState_0[BufferIdx] = Val )
385 
386 #define Eth_GetIngressFifoDescAddress(CtrlIndex, FifoIdx, DescIdx) (&Eth_Ctrl_0_Ingress_Descriptor_0[(DescIdx)] )
387 #define Eth_GetIngressFifoDescUserInfoAddress(CtrlIndex, FifoIdx, DescIdx) (&Eth_Ctrl_0_Ingress_Descriptor_0[(DescIdx)].bufferInfo )
388 #define Eth_GetIngressFifoBufferDataAddress(CtrlIndex, FifoIdx, DescIdx) (&Eth_Ctrl_0_Ingress_BufferMem_0[(DescIdx) * 1536U] )
389 #define Eth_GetIngressFifoQueueAddress(CtrlIndex, FifoIdx) ( Eth_Ctrl_0_Ingress_Queue_0 )
390 #define Eth_GetIngressFifoBufferState(CtrlIndex, FifoIdx, BufferIdx) ( Eth_Ctrl_0_Ingress_BufferState_0[(BufferIdx)] )
391 #define Eth_SetIngressFifoBufferState(CtrlIndex, FifoIdx, BufferIdx, Val) ( Eth_Ctrl_0_Ingress_BufferState_0[(BufferIdx)] = Val )
392 
393 #define Eth_GetEgressFifoCqIdx(CtrlIndex, FifoIdx) ( 0U )
394 #define Eth_GetEgressFifoFqIdx(CtrlIndex, FifoIdx) ( 2U )
395 #define Eth_GetIngressFifoCqIdx(CtrlIndex, FifoIdx) ( 1U )
396 #define Eth_GetIngressFifoFqIdx(CtrlIndex, FifoIdx) ( 3U )
397 
398 #define Eth_GetTxChanId(CtrlIndex, ChIdx) ( 30U )
399 #define Eth_GetTxChanTdCqRingIdx(CtrlIndex, ChIdx) ( 4U )
400 #define Eth_GetTxChanDepth(CtrlIndex, ChIdx) ( 128U )
401 
402 #define Eth_GetRxChanId(CtrlIndex, ChIdx) ( 30U )
403 #define Eth_GetRxChanTdCqRingIdx(CtrlIndex, ChIdx) ( 5U )
404 #define Eth_GetRxChanFlowTotalNum(CtrlIndex, ChIdx) ( 1U )
405 #define Eth_GetRxChanFlowStartNum(CtrlIndex, ChIdx) ( 60U )
406 
407 #define Eth_GetFlowId(CtrlIndex, FlowIdx) ( 60U )
408 #define Eth_GetFlowCqRingIdx(CtrlIndex, FlowIdx) ( 1U )
409 #define Eth_GetFlowFqRingIdx(CtrlIndex, FlowIdx) ( 3U )
410 
411 #define Eth_GetDynRingElemAddress(CtrlIndex, RingIdx) ( &Eth_RingDyn_Ctrl_0[(RingIdx)] )
412 
413 #define Eth_GetRingHwId(CtrlIndex, RingIdx) ( Eth_Udma_RingCfg_0[(RingIdx)].hwId )
414 #define Eth_GetRingTotalElemNum(CtrlIndex, RingIdx) ( Eth_Udma_RingCfg_0[(RingIdx)].size )
415 #define Eth_GetRingPriority(CtrlIndex, RingIdx) ( Eth_Udma_RingCfg_0[(RingIdx)].priority )
416 #define Eth_GetRingMemBaseAddress(CtrlIndex, RingIdx) ( Eth_Udma_RingCfg_0[(RingIdx)].memPtr )
417 
418 #define Eth_GetRingEventRingIdx(CtrlIndex, RingEvtIdx) ( Eth_RingEventCfg_Ctrl_0[(RingEvtIdx)].ringIdx )
419 #define Eth_GetRingEventGlobalEventNum(CtrlIndex, RingEvtIdx) ( Eth_RingEventCfg_Ctrl_0[(RingEvtIdx)].globalEvent )
420 #define Eth_GetRingEventVirtBitNum(CtrlIndex, RingEvtIdx) ( Eth_RingEventCfg_Ctrl_0[(RingEvtIdx)].virtBitNum )
421 #define Eth_GetRingEventEventIdx(CtrlIndex, RingEvtIdx) ( Eth_RingEventCfg_Ctrl_0[(RingEvtIdx)].eventIdx )
422 #define Eth_GetRingEventSrcOffsetNum(CtrlIndex, RingEvtIdx) ( Eth_RingEventCfg_Ctrl_0[(RingEvtIdx)].srcOffset )
423 
424 #define Eth_GetEventCoreIntrNum(CtrlIndex, EvtIdx) ( Eth_EventCfg_Ctrl_0[(EvtIdx)].coreIntrNum )
425 #define Eth_GetEventVirtIntrNum(CtrlIndex, EvtIdx) ( Eth_EventCfg_Ctrl_0[(EvtIdx)].virtIntrNum )
426 #define Eth_GetEventIrIntrNum(CtrlIndex, EvtIdx) ( Eth_EventCfg_Ctrl_0[(EvtIdx)].IrIntrNum )
427 #define Eth_GetTxEventCoreIntrNum(CtrlIndex) ( 80U )
428 #define Eth_GetRxEventCoreIntrNum(CtrlIndex) ( 81U )
429 
430 #define Eth_GetHwTimerTotalNum(CtrlIndex) ( 0U )
431 #define Eth_GetHwTimerId(CtrlIndex, Index) ( 0xFFU )
432 #define Eth_GetHwTimerCounter(CtrlIndex, Index) ( 0xFFU )
433 #define Eth_GetHwTimerIntervalMs(CtrlIndex, Index) ( 0xFFFFFFFFU )
434 #define Eth_GetHwTimerBaseAddr(CtrlIndex, Index) ( 0xFFFFFFFFU )
435 
436 #define Eth_GetHwTimerDynRunningState(CtrlIndex, Index) ( FALSE )
437 #define Eth_SetHwTimerDynRunningState(CtrlIndex, Index, Val) ( (void)(CtrlIndex) )
438 
439 #define Eth_GetRxIrqPacingEnable(CtrlIndex) ( FALSE )
440 #define Eth_GetTxIrqPacingEnable(CtrlIndex) ( FALSE )
441 
442 #define Eth_GetRxHwTimerIdx(CtrlIndex) ( 255U )
443 #define Eth_GetTxHwTimerIdx(CtrlIndex) ( 255U )
444 #define Eth_GetIrqPacingEnable(CtrlIndex) ( Eth_GetTxIrqPacingEnable(CtrlIndex) || Eth_GetRxIrqPacingEnable(CtrlIndex) )
445 
446 /* @} */
447 
448 /* ========================================================================== */
449 /* Structures and Enums */
450 /* ========================================================================== */
451 
457 typedef enum
458 {
464 
469 typedef struct Eth_CpswConfigType_s
470 {
471  uint32 phyMacAddr;
473  uint32 aleAddr;
475  uint32 cptsAddr;
477  uint32 mdioAddr;
479  uint32 ctrlAddr;
486 
487 typedef struct Eth_Udma_RingCfgType_s
488 {
489  uint64 *memPtr;
491  uint32 hwId;
493  uint32 size;
495  uint32 priority;
498 
499 typedef struct Eth_Udma_EventCfgType_s
500 {
501  uint32 coreIntrNum;
503  uint32 virtIntrNum;
505  uint32 IrIntrNum;
508 
513 typedef struct Eth_Udma_RingEventCfgType_s
514 {
515  uint8 ringIdx;
517  uint8 eventIdx;
519  uint8 virtBitNum;
521  uint32 globalEvent;
523  uint32 srcOffset;
526 
531 typedef struct Eth_FifoRingMapCfgType_s
532 {
533  uint8 cqRingIdx;
535  uint8 fqRingIdx;
538 
543 typedef struct Eth_ChannelCfgType_s
544 {
545  uint8 tdCqRingIdx;
547  uint16 chId;
550 
555 typedef struct Eth_FlowCfgType_s
556 {
557  uint8 cqRingIdx;
559  uint8 fqRingIdx;
561  uint16 flowId;
564 
569 typedef struct Eth_ChannelFlowCfgType_s
570 {
571  uint8 flowNum;
573  uint16 startFlowId;
576 
581 typedef struct Eth_FifoHandleType_s
582 {
585  Eth_DescType *descPtr;
587  Eth_QueueType *queuePtr;
589  uint8 *bufferState;
591  uint8 fifoNum;
593  uint16 elemSize;
595  uint32 totalSize;
598 
603 typedef struct Eth_Udma_CfgType_s
604 {
609  Eth_Udma_RingDynType *ringDynPtr;
629  uint16 startTxNum;
631  uint16 startRxNum;
649  uint8 txCoreIrq;
651  uint8 rxCoreIrq;
653  uint16 rxMtuLength;
656 
661 typedef struct Eth_VirtualMacConfigType_s
662 {
665  Eth_RpcCmdComplete rpcCmdComplete;
669  Eth_RpcFwRegistered fwRegisteredCb;
672 
677 typedef struct Eth_HwTimerConfigType_s
678 {
679  uint8 hwTimerId;
686 
691 typedef struct Eth_ControlerConfigType_s
692 {
693  uint32 ctrlIdx;
695  Eth_EnetType enetType;
697  Eth_PortType macPort;
699  uint32 macAddrHigh;
701  uint32 macAddrLow;
703  boolean useDefaultMac;
705  Eth_MacConnectionType connType;
707  boolean loopback;
715  boolean enableTxIrq;
717  boolean enableRxIrq;
719  boolean enableCacheOps;
721  Eth_CacheWbInv cacheWbInv;
723  Eth_CacheWb cacheWb;
725  Eth_CacheInv cacheInv;
727  Eth_CacheWbInv descCacheWbInv;
729  Eth_CacheWb descCacheWb;
731  Eth_CacheInv descCacheInv;
733  Eth_CacheWbInv ringCacheWbInv;
735  Eth_CacheWb ringCacheWb;
737  Eth_CacheInv ringCacheInv;
741  uint16 demEventNum;
755  uint16 *demEventCfg;
763  boolean *hwTimerDynPtr;
766 
771 typedef struct Eth_ConfigType_s
772 {
776 
777 /* ========================================================================== */
778 /* Generate Configuration */
779 /* ========================================================================== */
780 
781 #define ETH_START_SEC_CONST_UNSPECIFIED
782 #include "Eth_MemMap.h"
783 
784 extern CONST(Eth_Udma_RingCfgType, ETH_VAR_NO_INIT) Eth_Udma_RingCfg_0[6U];
785 extern CONST(Eth_Udma_EventCfgType, ETH_VAR_NO_INIT) Eth_EventCfg_Ctrl_0[2U];
786 extern CONST(Eth_Udma_RingEventCfgType, ETH_VAR_NO_INIT) Eth_RingEventCfg_Ctrl_0[2U];
787 
788 
789 #define ETH_STOP_SEC_CONST_UNSPECIFIED
790 #include "Eth_MemMap.h"
791 
792 #define ETH_START_SEC_VAR_NO_INIT_UNSPECIFIED_128
793 #include "Eth_MemMap.h"
794 
795 extern VAR(uint8, ETH_VAR_NO_INIT_128) Eth_Ctrl_0_Egress_BufferMem_0[196608U];
796 extern VAR(Eth_DescType, ETH_VAR_NO_INIT_128) Eth_Ctrl_0_Egress_Descriptor_0[128U];
797 
798 extern VAR(uint8, ETH_VAR_NO_INIT_128) Eth_Ctrl_0_Ingress_BufferMem_0[196608U];
799 extern VAR(Eth_DescType, ETH_VAR_NO_INIT_128) Eth_Ctrl_0_Ingress_Descriptor_0[128U];
800 
801 #define ETH_STOP_SEC_VAR_NO_INIT_UNSPECIFIED_128
802 #include "Eth_MemMap.h"
803 
804 #define ETH_START_SEC_VAR_NO_INIT_8
805 #include "Eth_MemMap.h"
806 
807 extern VAR(uint8, ETH_VAR_NO_INIT) Eth_Ctrl_0_Egress_BufferState_0[128U];
808 extern VAR(uint8, ETH_VAR_NO_INIT) Eth_Ctrl_0_Ingress_BufferState_0[128U];
809 
810 #define ETH_STOP_SEC_VAR_NO_INIT_8
811 #include "Eth_MemMap.h"
812 
813 #define ETH_START_SEC_VAR_NO_INIT_UNSPECIFIED
814 #include "Eth_MemMap.h"
815 
816 extern VAR(Eth_QueueType, ETH_VAR_NO_INIT) Eth_Ctrl_0_Egress_Queue_0[1U];
817 extern VAR(Eth_QueueType, ETH_VAR_NO_INIT) Eth_Ctrl_0_Ingress_Queue_0[1U];
818 
819 extern VAR(Eth_Udma_RingDynType, ETH_VAR_NO_INIT) Eth_RingDyn_Ctrl_0[6U];
820 #define ETH_STOP_SEC_VAR_NO_INIT_UNSPECIFIED
821 #include "Eth_MemMap.h"
822 
823 /* ========================================================================== */
824 /* Function Declarations */
825 /* ========================================================================== */
826 
827 /* ========================================================================== */
828 /* External Function Prototype */
829 /* ========================================================================== */
830 
831 #define ETH_START_SEC_CODE
832 #include "Eth_MemMap.h"
833 
835 extern void EthApp_wbInvCache(uint8 *buf, uint16 len);
837 extern void EthApp_wbCache(uint8 *buf, uint16 len);
839 extern void EthApp_invCache(uint8 *buf, uint16 len);
840 
841 #define ETH_STOP_SEC_CODE
842 #include "Eth_MemMap.h"
843 
844 #ifdef __cplusplus
845 }
846 #endif
847 
848 #endif /* #ifndef ETH_CFG_H_ */
849 
850 /* @} */
uint32 IrIntrNum
Definition: Eth_Cfg.h:505
Eth_PortType macPort
Definition: Eth_Cfg.h:697
uint32 size
Definition: Eth_Cfg.h:493
boolean loopback
Definition: Eth_Cfg.h:707
Eth controller configuration type Configuration related to Eth controller configuration.
Definition: Eth_Cfg.h:691
uint64 * memPtr
Definition: Eth_Cfg.h:489
Eth_FifoHandleType * ingressFifoCfgPtr
Definition: Eth_Cfg.h:615
uint8 totalTxChanNum
Definition: Eth_Cfg.h:643
uint8 virtBitNum
Definition: Eth_Cfg.h:519
Eth_ChannelCfgType * rxChanCfgPtr
Definition: Eth_Cfg.h:623
Eth_Udma_CfgType * dmaCfgPtr
Definition: Eth_Cfg.h:759
boolean enableRxIrq
Definition: Eth_Cfg.h:717
Eth_FifoRingMapCfgType * ingressFifoRingMapCfgPtr
Definition: Eth_Cfg.h:619
boolean * hwTimerDynPtr
Definition: Eth_Cfg.h:763
Eth_Udma_EventCfgType * eventCfgPtr
Definition: Eth_Cfg.h:605
Eth_CpswConfigType * cpswCfg
Definition: Eth_Cfg.h:757
boolean pollRecvMsgInEthMain
Definition: Eth_Cfg.h:667
uint32 coreIntrNum
Definition: Eth_Cfg.h:501
uint32 ctrlIdx
Definition: Eth_Cfg.h:693
Eth_VirtualMacConfigType * virtualMacCfg
Definition: Eth_Cfg.h:753
uint32 hwId
Definition: Eth_Cfg.h:491
const Eth_Udma_RingEventCfgType Eth_RingEventCfg_Ctrl_0[2U]
Eth flow configuration type Configuration related to flow.
Definition: Eth_Cfg.h:555
Eth_CacheWb cacheWb
Definition: Eth_Cfg.h:723
uint8 txCoreIrq
Definition: Eth_Cfg.h:649
Eth_EnetType enetType
Definition: Eth_Cfg.h:695
Eth_CacheInv descCacheInv
Definition: Eth_Cfg.h:731
Eth_CacheWbInv descCacheWbInv
Definition: Eth_Cfg.h:727
Eth configuration type Configuration data of all controller.
Definition: Eth_Cfg.h:771
uint8 cqRingIdx
Definition: Eth_Cfg.h:533
uint32 hwTimerCounter
Definition: Eth_Cfg.h:681
uint8 * bufferState
Definition: Eth_Cfg.h:589
Eth_CacheInv ringCacheInv
Definition: Eth_Cfg.h:737
boolean useDefaultMac
Definition: Eth_Cfg.h:703
Eth driver hardware timer configuration data Configuration related to hardware timer.
Definition: Eth_Cfg.h:677
Eth_DescType * descPtr
Definition: Eth_Cfg.h:585
uint8 txHwTimerIdx
Definition: Eth_Cfg.h:751
Eth driver virtual mac configuration data Configuration related to virtual MAC configuration.
Definition: Eth_Cfg.h:661
uint16 demEventNum
Definition: Eth_Cfg.h:741
boolean enableCacheOps
Definition: Eth_Cfg.h:719
Eth_FifoRingMapCfgType * egressFifoRingMapCfgPtr
Definition: Eth_Cfg.h:617
uint32 ctrlAddr
Definition: Eth_Cfg.h:479
const Eth_Udma_EventCfgType Eth_EventCfg_Ctrl_0[2U]
uint16 * demEventCfg
Definition: Eth_Cfg.h:755
#define ETH_CTRL_ID_MAX
Eth max controller ID.
Definition: Eth_Cfg.h:218
uint16 startTxNum
Definition: Eth_Cfg.h:629
uint8 totalRingEventNum
Definition: Eth_Cfg.h:637
Eth_CacheWbInv cacheWbInv
Definition: Eth_Cfg.h:721
Eth_Udma_RingCfgType * ringCfgPtr
Definition: Eth_Cfg.h:607
Eth_QueueType * queuePtr
Definition: Eth_Cfg.h:587
Eth_RpcFwRegistered fwRegisteredCb
Definition: Eth_Cfg.h:669
uint32 cptsAddr
Definition: Eth_Cfg.h:475
uint8 cqRingIdx
Definition: Eth_Cfg.h:557
uint8 totalHwTimerNum
Definition: Eth_Cfg.h:747
uint16 rxMtuLength
Definition: Eth_Cfg.h:653
Eth_ChannelFlowCfgType * rxChanFlowCfgPtr
Definition: Eth_Cfg.h:625
Definition: Eth_Cfg.h:499
Eth_Udma_RingDynType * ringDynPtr
Definition: Eth_Cfg.h:609
uint16 startRxNum
Definition: Eth_Cfg.h:631
uint8 * fifoBufferPtr
Definition: Eth_Cfg.h:583
Eth_HwTimerConfigType * hwTimerCfgPtr
Definition: Eth_Cfg.h:761
uint32 srcOffset
Definition: Eth_Cfg.h:523
Eth_MdioOperModeType
MDIO operating mode.
Definition: Eth_Cfg.h:457
uint16 elemSize
Definition: Eth_Cfg.h:593
Eth_ChannelCfgType * txChanCfgPtr
Definition: Eth_Cfg.h:621
boolean enableRxIrqPacing
Definition: Eth_Cfg.h:743
uint32 ethfwRpcComChId
Definition: Eth_Cfg.h:663
Eth Fifo ring map configuration type Configuration related to fifo map to ring.
Definition: Eth_Cfg.h:531
uint16 flowId
Definition: Eth_Cfg.h:561
Eth_CacheInv cacheInv
Definition: Eth_Cfg.h:725
Definition: Eth_Cfg.h:461
uint8 totalFlowNum
Definition: Eth_Cfg.h:647
const Eth_Udma_RingCfgType Eth_Udma_RingCfg_0[6U]
Eth channel flow configuration type Configuration related to channel flow.
Definition: Eth_Cfg.h:569
boolean enableVirtualMac
Definition: Eth_Cfg.h:739
uint32 globalEvent
Definition: Eth_Cfg.h:521
uint8 rxHwTimerIdx
Definition: Eth_Cfg.h:749
uint32 cptsRefClockFreq
Definition: Eth_Cfg.h:481
uint32 macAddrLow
Definition: Eth_Cfg.h:701
Eth Fifo configuration type Configuration related to Fifo.
Definition: Eth_Cfg.h:581
uint8 ringIdx
Definition: Eth_Cfg.h:515
Eth_CacheWbInv ringCacheWbInv
Definition: Eth_Cfg.h:733
Eth_MacConnectionType connType
Definition: Eth_Cfg.h:705
Eth Cpsw Configurations type Configuration related to Cpsw data.
Definition: Eth_Cfg.h:469
uint32 cppiClockFreqHz
Definition: Eth_Cfg.h:483
Eth_CacheWb ringCacheWb
Definition: Eth_Cfg.h:735
uint8 totalRxChanNum
Definition: Eth_Cfg.h:645
Eth ring event configuration type Configuration related to ring event.
Definition: Eth_Cfg.h:513
uint8 rxCoreIrq
Definition: Eth_Cfg.h:651
uint8 totalEgressFifoNum
Definition: Eth_Cfg.h:639
Eth_MdioOperModeType mdioOpMode
Definition: Eth_Cfg.h:713
boolean enableTxIrq
Definition: Eth_Cfg.h:715
uint32 virtIntrNum
Definition: Eth_Cfg.h:503
void EthApp_invCache(uint8 *buf, uint16 len)
Function to invalidate cache.
uint8 fqRingIdx
Definition: Eth_Cfg.h:535
uint8 fifoNum
Definition: Eth_Cfg.h:591
Eth channel configuration type Configuration related to channel.
Definition: Eth_Cfg.h:543
uint8 hwTimerId
Definition: Eth_Cfg.h:679
VAR(uint8, ETH_VAR_NO_INIT_128) Eth_Ctrl_0_Egress_BufferMem_0[196608U]
uint32 mdioBusFreqHz
Definition: Eth_Cfg.h:711
uint32 macAddrHigh
Definition: Eth_Cfg.h:699
void EthApp_wbCache(uint8 *buf, uint16 len)
Function to write-back cache.
Eth_FlowCfgType * flowCfgPtr
Definition: Eth_Cfg.h:627
Definition: Eth_Cfg.h:459
uint8 eventIdx
Definition: Eth_Cfg.h:517
uint8 totalIngressFifoNum
Definition: Eth_Cfg.h:641
Eth_FifoHandleType * egressFifoCfgPtr
Definition: Eth_Cfg.h:613
uint32 totalSize
Definition: Eth_Cfg.h:595
void EthApp_wbInvCache(uint8 *buf, uint16 len)
Function to write-back and invalidate cache.
Eth_Udma_RingEventCfgType * ringEvenCfgPtr
Definition: Eth_Cfg.h:611
uint32 mdioAddr
Definition: Eth_Cfg.h:477
uint32 phyMacAddr
Definition: Eth_Cfg.h:471
uint8 totalRingNum
Definition: Eth_Cfg.h:635
Eth_RpcCmdComplete rpcCmdComplete
Definition: Eth_Cfg.h:665
uint8 totalEventNum
Definition: Eth_Cfg.h:633
uint8 flowNum
Definition: Eth_Cfg.h:571
boolean enableTxIrqPacing
Definition: Eth_Cfg.h:745
uint16 chId
Definition: Eth_Cfg.h:547
uint8 tdCqRingIdx
Definition: Eth_Cfg.h:545
uint8 fqRingIdx
Definition: Eth_Cfg.h:559
uint32 aleAddr
Definition: Eth_Cfg.h:473
uint16 startFlowId
Definition: Eth_Cfg.h:573
Definition: Eth_Cfg.h:487
Eth Udma configuration type Configuration related to Udma.
Definition: Eth_Cfg.h:603
uint32 hwLoopTimeout
Definition: Eth_Cfg.h:709
uint32 priority
Definition: Eth_Cfg.h:495
Eth_CacheWb descCacheWb
Definition: Eth_Cfg.h:729
uint32 hwTimerIntervalMs
Definition: Eth_Cfg.h:683