• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /******************************************************************************
2  *                                                                            *
3  * Copyright (C) 2018 The Android Open Source Project
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at:
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  *****************************************************************************
18  * Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore
19 */
20 #ifndef IXHEAACD_MEMORY_STANDARDS_H
21 #define IXHEAACD_MEMORY_STANDARDS_H
22 
23 /*****************************************************************************/
24 /* type definitions                                                          */
25 /*****************************************************************************/
26 /* standard memory table descriptor for libraries */
27 typedef struct {
28   UWORD32 ui_size;         /* size of the memory in bytes   */
29   UWORD32 ui_alignment;    /* alignment in bytes            */
30   UWORD32 ui_type;         /* type of memory                */
31   UWORD32 ui_placement[2]; /* 64 bit placement info     */
32   UWORD32 ui_priority;     /* the importance for placement  */
33   UWORD32 ui_placed[2];    /* the o_red location for placement  */
34 } ia_mem_info_struct;
35 
36 typedef struct {
37   WORD8 *p_lib_name;
38   WORD8 *p_version_num;
39 } ia_lib_info_struct;
40 
41 VOID ixheaacd_get_lib_id_strings(pVOID pv_output);
42 
43 /*****************************************************************************/
44 /* Constant hash defines                                                     */
45 /*****************************************************************************/
46 /* when you don't need alignment, pass this to memory library */
47 #define IA_MEM_NO_ALIGN 0x01
48 
49 /* ittiam standard memory types */
50 /* to be used inter frames */
51 #define IA_MEMTYPE_PERSIST 0x00
52 /* read write, to be used intra frames */
53 #define IA_MEMTYPE_SCRATCH 0x01
54 /* read only memory, intra frame */
55 #define IA_MEMTYPE_INPUT 0x02
56 /* read-write memory, for usable output, intra frame */
57 #define IA_MEMTYPE_OUTPUT 0x03
58 /* readonly memory, inter frame */
59 #define IA_MEMTYPE_TABLE 0x04
60 /* input buffer before mem tabs allocation */
61 #define IA_MEMTYPE_PRE_FRAME_INPUT 0x05
62 /* input buffer before mem tabs allocation */
63 #define IA_MEMTYPE_PRE_FRAME_SCRATCH 0x06
64 /* for local variables */
65 #define IA_MEMTYPE_AUTO_VAR 0x80
66 
67 /* ittiam standard memory priorities */
68 #define IA_MEMPRIORITY_ANYWHERE 0x00
69 #define IA_MEMPRIORITY_LOWEST 0x01
70 #define IA_MEMPRIORITY_LOW 0x02
71 #define IA_MEMPRIORITY_NORM 0x03
72 #define IA_MEMPRIORITY_ABOVE_NORM 0x04
73 #define IA_MEMPRIORITY_HIGH 0x05
74 #define IA_MEMPRIORITY_HIGHER 0x06
75 #define IA_MEMPRIORITY_CRITICAL 0x07
76 
77 /* ittiam standard memory placements */
78 /* placement is defined by 64 bits */
79 
80 #define IA_MEMPLACE_FAST_RAM_0 0x000001
81 #define IA_MEMPLACE_FAST_RAM_1 0x000002
82 #define IA_MEMPLACE_FAST_RAM_2 0x000004
83 #define IA_MEMPLACE_FAST_RAM_3 0x000008
84 #define IA_MEMPLACE_FAST_RAM_4 0x000010
85 #define IA_MEMPLACE_FAST_RAM_5 0x000020
86 #define IA_MEMPLACE_FAST_RAM_6 0x000040
87 #define IA_MEMPLACE_FAST_RAM_7 0x000080
88 
89 #define IA_MEMPLACE_INT_RAM_0 0x000100
90 #define IA_MEMPLACE_INT_RAM_1 0x000200
91 #define IA_MEMPLACE_INT_RAM_2 0x000400
92 #define IA_MEMPLACE_INT_RAM_3 0x000800
93 #define IA_MEMPLACE_INT_RAM_4 0x001000
94 #define IA_MEMPLACE_INT_RAM_5 0x002000
95 #define IA_MEMPLACE_INT_RAM_6 0x004000
96 #define IA_MEMPLACE_INT_RAM_7 0x008000
97 
98 #define IA_MEMPLACE_EXT_RAM_0 0x010000
99 #define IA_MEMPLACE_EXT_RAM_1 0x020000
100 #define IA_MEMPLACE_EXT_RAM_2 0x040000
101 #define IA_MEMPLACE_EXT_RAM_3 0x080000
102 #define IA_MEMPLACE_EXT_RAM_4 0x100000
103 #define IA_MEMPLACE_EXT_RAM_5 0x200000
104 #define IA_MEMPLACE_EXT_RAM_6 0x400000
105 #define IA_MEMPLACE_EXT_RAM_7 0x800000
106 
107 #define IA_MEMPLACE_DONTCARE_H 0xFFFFFFFF
108 #define IA_MEMPLACE_DONTCARE_L 0xFFFFFFFF
109 
110 /* the simple common PC RAM */
111 #define IA_PC_RAM_H 0x00000000
112 #define IA_PC_RAM_L IA_MEMPLACE_EXT_RAM_0
113 
114 #endif /* IXHEAACD_MEMORY_STANDARDS_H */
115