[processor-sdk/audio-preprocessing.git] / file_demo_bios / da830 / components / mhm / src / mhmport.h
1 /******************************************************************************\r
2 * FILE PURPOSE: Target specific definitions.\r
3 ******************************************************************************\r
4 * FILE NAME: MHMPORT.H\r
5 *\r
6 * DESCRIPTION: Contains definitions that are specific to different targets.\r
7 *\r
8 * Copyright (c) 2016, Texas Instruments Incorporated
9 * All rights reserved.
10 *
11 * Redistribution and use in source and binary forms, with or without
12 * modification, are permitted provided that the following conditions
13 * are met:
14 *
15 * * Redistributions of source code must retain the above copyright
16 * notice, this list of conditions and the following disclaimer.
17 *
18 * * Redistributions in binary form must reproduce the above copyright
19 * notice, this list of conditions and the following disclaimer in the
20 * documentation and/or other materials provided with the distribution.
21 *
22 * * Neither the name of Texas Instruments Incorporated nor the names of
23 * its contributors may be used to endorse or promote products derived
24 * from this software without specific prior written permission.
25 *
26 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
27 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
28 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
29 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
30 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
31 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
32 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
33 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
34 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
35 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
36 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
37 *
38 */
39 \r
40 \r
41 #ifdef ti_targets_C54\r
42 #define _MHMPORT_C54 1\r
43 #else\r
44 #define _MHMPORT_C54 0\r
45 #endif\r
46 \r
47 #ifdef ti_targets_C54_far\r
48 #define _MHMPORT_C54F 1\r
49 #else\r
50 #define _MHMPORT_C54F 0\r
51 #endif\r
52 \r
53 #ifdef ti_targets_C55\r
54 #define _MHMPORT_C55 1\r
55 #else\r
56 #define _MHMPORT_C55 0\r
57 #endif\r
58 \r
59 #ifdef ti_targets_C55_large\r
60 #define _MHMPORT_C55L 1\r
61 #else\r
62 #define _MHMPORT_C55L 0\r
63 #endif\r
64 \r
65 #ifdef ti_targets_C64\r
66 #define _MHMPORT_C64 1\r
67 #else\r
68 #define _MHMPORT_C64 0\r
69 #endif\r
70 \r
71 #ifdef ti_targets_C64_big_endian\r
72 #define _MHMPORT_C64_BIG_ENDIAN 1\r
73 #else\r
74 #define _MHMPORT_C64_BIG_ENDIAN 0\r
75 #endif\r
76 \r
77 #ifdef ti_targets_C64P\r
78 #define _MHMPORT_C64P 1\r
79 #else\r
80 #define _MHMPORT_C64P 0\r
81 #endif\r
82 \r
83 #ifdef ti_targets_elf_C64P \r
84 #define _MHMPORT_ELF_C64P 1\r
85 #else\r
86 #define _MHMPORT_ELF_C64P 0\r
87 #endif\r
88 \r
89 #ifdef ti_targets_C64P_big_endian\r
90 #define _MHMPORT_C64P_BIG_ENDIAN 1\r
91 #else\r
92 #define _MHMPORT_C64P_BIG_ENDIAN 0\r
93 #endif\r
94 \r
95 #ifdef ti_targets_elf_C64P_big_endian\r
96 #define _MHMPORT_ELF_C64P_BIG_ENDIAN 1\r
97 #else\r
98 #define _MHMPORT_ELF_C64P_BIG_ENDIAN 0\r
99 #endif\r
100 \r
101 #ifdef ti_targets_C66\r
102 #define _MHMPORT_C66 1\r
103 #else\r
104 #define _MHMPORT_C66 0\r
105 #endif\r
106 \r
107 #ifdef ti_targets_elf_C66\r
108 #define _MHMPORT_ELF_C66 1\r
109 #else\r
110 #define _MHMPORT_ELF_C66 0\r
111 #endif\r
112 \r
113 #ifdef ti_targets_C66_big_endian\r
114 #define _MHMPORT_C66_BIG_ENDIAN 1\r
115 #else\r
116 #define _MHMPORT_C66_BIG_ENDIAN 0\r
117 #endif\r
118 \r
119 #ifdef ti_targets_elf_C66_big_endian\r
120 #define _MHMPORT_ELF_C66_BIG_ENDIAN 1\r
121 #else\r
122 #define _MHMPORT_ELF_C66_BIG_ENDIAN 0\r
123 #endif\r
124 \r
125 #ifdef ti_targets_C674\r
126 #define _MHMPORT_C674 1\r
127 #else\r
128 #define _MHMPORT_C674 0\r
129 #endif\r
130 \r
131 #ifdef ti_targets_C674_big_endian\r
132 #define _MHMPORT_C674_BIG_ENDIAN 1\r
133 #else\r
134 #define _MHMPORT_C674_BIG_ENDIAN 0\r
135 #endif\r
136 \r
137 #ifdef gnu_targets_arm_GCArmv7A\r
138 #define _MHMPORT_ARM_GCARMV7A 1\r
139 #else\r
140 #define _MHMPORT_ARM_GCARMV7A 0\r
141 #endif\r
142 \r
143 #if (_MHMPORT_C54 || _MHMPORT_C54F)\r
144 #include <ti/mas/mhm/src/c54/mhmport.h>\r
145 #elif (_MHMPORT_C55 || _MHMPORT_C55L)\r
146 #include <ti/mas/mhm/src/c55/mhmport.h>\r
147 #elif _MHMPORT_ARM_GCARMV7A\r
148 #include <ti/mas/mhm/src/arm/mhmport.h>\r
149 #elif (_MHMPORT_C64 || _MHMPORT_C64_BIG_ENDIAN || \\r
150 _MHMPORT_C64P || _MHMPORT_C64P_BIG_ENDIAN || \\r
151 _MHMPORT_ELF_C64P || _MHMPORT_ELF_C64P_BIG_ENDIAN || \\r
152 _MHMPORT_C66 || _MHMPORT_C66_BIG_ENDIAN || \\r
153 _MHMPORT_ELF_C66 || _MHMPORT_ELF_C66_BIG_ENDIAN || \\r
154 _MHMPORT_C674 || _MHMPORT_C674_BIG_ENDIAN)\r
155 #include <ti/mas/mhm/src/c64/mhmport.h>\r
156 #else\r
157 #error invalid target\r
158 #endif\r
159 \r
160 #define MHM_ALIGN_BITS TYP_STRUCT_LOG2ALIGN\r
161 #define MHM_ALIGN_MASK (~((~0U)<<MHM_ALIGN_BITS)) \r
162 \r
163 /* Align gap is the maximum number of words that may be used to fill a gap\r
164 * to the next memory block due to alignment requirements. */\r
165 #define MHM_MAX_ALIGNGAP MHM_ALIGN_MASK\r
166 \r
167 /* The maximum value of a buffer size and the maximum buffer size. They are\r
168 * not the same due to alignment gap. */\r
169 #define MHM_MAX_SIZEVAL (~0U)\r
170 #define MHM_MAX_SIZE (MHM_MAX_SIZEVAL - MHM_MAX_ALIGNGAP)\r
171 \r
172 /* Nothing past this point */\r