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