]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - keystone-rtos/fault_mgmt.git/blob - test/src/tci6614/cleanup_test/netcp_src/memory.h
Initial commit.
[keystone-rtos/fault_mgmt.git] / test / src / tci6614 / cleanup_test / netcp_src / memory.h
1 /*
2  *
3  * Copyright (C) 2010-2012 Texas Instruments Incorporated - http://www.ti.com/ 
4  * 
5  * 
6  *  Redistribution and use in source and binary forms, with or without 
7  *  modification, are permitted provided that the following conditions 
8  *  are met:
9  *
10  *    Redistributions of source code must retain the above copyright 
11  *    notice, this list of conditions and the following disclaimer.
12  *
13  *    Redistributions in binary form must reproduce the above copyright
14  *    notice, this list of conditions and the following disclaimer in the 
15  *    documentation and/or other materials provided with the   
16  *    distribution.
17  *
18  *    Neither the name of Texas Instruments Incorporated nor the names of
19  *    its contributors may be used to endorse or promote products derived
20  *    from this software without specific prior written permission.
21  *
22  *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
23  *  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
24  *  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
25  *  A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
26  *  OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
27  *  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
28  *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
29  *  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
30  *  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 
31  *  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
32  *  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33  *
34 */
38 #ifndef _MEMORY_H
39 #define _MEMORY_H
41 /* memory.h 
42  * global memory declaration */
43 #include <stdio.h>
44 #include <stdint.h>
45 //#include <xdc/std.h>
46 #include <ti/drv/cppi/cppi_drv.h>
47 #include <ti/drv/qmss/qmss_drv.h>
48 #include <ti/drv/pa/pa.h>
49 #include "config.h"
51 #define CACHE_LINESZ    128
52 #define SYS_ROUND_UP(x,y)   ((x) + ((y) -1))/(y)*(y)
55 /* PASS CDMA handle */
56 extern Cppi_Handle gvCppiHandle;  
59 /* PASS CDMA rx/tx channel handles */
60 extern Cppi_ChHnd  gvTxChHnd[10];
61 extern Cppi_ChHnd  gvRxChHnd[24];
64 /* Queue handles */
65 extern Int32  gvDescQ;                       /* Queue holding unassigned descriptors */
66 extern Int32  gvTxQ[10];                     /* 10 PA hard assigned transmit queues */
67 extern Int32  gvRxPktQ[CONFIG_N_RX_QS];      /* Queues to receive data packets */
68 extern Int32  gvPaRespQ;                     /* Queue to received PA command responses */
69 extern Int32  gvPaTxRecycleQ;                /* Return queue for transmit descriptors/buffers */
70 extern Int32  gvRxBufQ;                      /* Queue of buffers for receive packets */
72 /* Flow handle */
73 extern Cppi_FlowHnd gvFlowHnd;
75 /* Memory used for the linking RAM and descriptor RAM */
76 //extern Uint64 memLinkRam[CONFIG_NUM_DESC];
77 extern Uint8 memDescRam[CONFIG_NUM_DESC * CONFIG_SIZE_DESC];
78 extern Uint8 memRxBuffer[CONFIG_N_RX_BUFFERS][CONFIG_RX_BUFFER_SIZE];
80 /* PA instance */
81 extern Uint8 paInstBuf[SYS_ROUND_UP(CONFIG_BUFSIZE_PA_INST, CACHE_LINESZ)];
82 extern Pa_Handle paInst;
84 /* Memory used for PA handles */
85 extern Uint8 memL2Ram[SYS_ROUND_UP(CONFIG_BUFSIZE_L2_TABLE, CACHE_LINESZ)];
86 extern Uint8 memL3Ram[SYS_ROUND_UP(CONFIG_BUFSIZE_L3_TABLE, CACHE_LINESZ)];
88 extern paHandleL2L3_t gvPaL2Handles[CONFIG_MAX_L2_HANDLES];
89 extern paHandleL2L3_t gvPaL3Handles[CONFIG_MAX_L3_HANDLES];
90 extern paHandleL4_t   gvPaL4Handles[CONFIG_MAX_L4_HANDLES];
95 #endif /* _MEMORY_H */