1 /*******************************************************************************
2  * Copyright 2019-2021 Microchip FPGA Embedded Systems Solutions.
3  *
4  * SPDX-License-Identifier: MIT
5  *
6  * @file hw_cache.h
7  * @author Microchip-FPGA Embedded Systems Solutions
8  *
9  *
10  * Note 1: This file should not be edited. If you need to modify a parameter
11  * without going through regenerating using the MSS Configurator Libero flow
12  * or editing the associated xml file
13  * the following method is recommended:
14 
15  * 1. edit the following file
16  * boards/your_board/platform_config/mpfs_hal_config/mss_sw_config.h
17 
18  * 2. define the value you want to override there.
19  * (Note: There is a commented example in the platform directory)
20 
21  * Note 2: The definition in mss_sw_config.h takes precedence, as
22  * mss_sw_config.h is included prior to the generated header files located in
23  * boards/your_board/fpga_design_config
24  *
25  */
26 
27 #ifndef HW_CACHE_H_
28 #define HW_CACHE_H_
29 
30 
31 #ifdef __cplusplus
32 extern  "C" {
33 #endif
34 
35 #if !defined (LIBERO_SETTING_WAY_ENABLE)
36 /*Way indexes less than or equal to this register value may be used by the
37 cache. E.g. set to 0x7, will allocate 8 cache ways, 0-7 to cache, and leave
38 8-15 as LIM. Note 1: Way 0 is always allocated as cache. Note 2: each way is
39 128KB. */
40 #define LIBERO_SETTING_WAY_ENABLE    0x0000000BUL
41     /* WAY_ENABLE                        [0:8]   RW value= 0xB */
42 #endif
43 #if !defined (LIBERO_SETTING_WAY_MASK_DMA)
44 /*Way mask register master DMA. Set field to zero to disable way from this
45 master. The available cache ways are 0 to number set in WAY_ENABLE register. If
46 using scratch pad memory, the ways you want reserved for scrathpad are not
47 available for selection, you must set to 0. e.g. If three ways reserved for
48 scratchpad, WAY_MASK_0, WAY_MASK_1 and WAY_MASK_2 will be set to zero for all
49 masters, so they can not evict the way. */
50 #define LIBERO_SETTING_WAY_MASK_DMA    0x0000F0FFUL
51     /* WAY_MASK_0                        [0:1]   RW value= 0x1 */
52     /* WAY_MASK_1                        [1:1]   RW value= 0x1 */
53     /* WAY_MASK_2                        [2:1]   RW value= 0x1 */
54     /* WAY_MASK_3                        [3:1]   RW value= 0x1 */
55     /* WAY_MASK_4                        [4:1]   RW value= 0x1 */
56     /* WAY_MASK_5                        [5:1]   RW value= 0x1 */
57     /* WAY_MASK_6                        [6:1]   RW value= 0x1 */
58     /* WAY_MASK_7                        [7:1]   RW value= 0x1 */
59     /* WAY_MASK_8                        [8:1]   RW value= 0x0 */
60     /* WAY_MASK_9                        [9:1]   RW value= 0x0 */
61     /* WAY_MASK_10                       [10:1]  RW value= 0x0 */
62     /* WAY_MASK_11                       [11:1]  RW value= 0x0 */
63     /* WAY_MASK_12                       [12:1]  RW value= 0x1 */
64     /* WAY_MASK_13                       [13:1]  RW value= 0x1 */
65     /* WAY_MASK_14                       [14:1]  RW value= 0x1 */
66     /* WAY_MASK_15                       [15:1]  RW value= 0x1 */
67 #endif
68 #if !defined (LIBERO_SETTING_WAY_MASK_AXI4_PORT_0)
69 /*Way mask register master DMA. Set field to zero to disable way from this
70 master. The available cache ways are 0 to number set in WAY_ENABLE register. If
71 using scratch pad memory, the ways you want reserved for scrathpad are not
72 available for selection, you must set to 0. e.g. If three ways reserved for
73 scratchpad, WAY_MASK_0, WAY_MASK_1 and WAY_MASK_2 will be set to zero for all
74 masters, so they can not evict the way. */
75 #define LIBERO_SETTING_WAY_MASK_AXI4_PORT_0    0x0000F0FFUL
76     /* WAY_MASK_0                        [0:1]   RW value= 0x1 */
77     /* WAY_MASK_1                        [1:1]   RW value= 0x1 */
78     /* WAY_MASK_2                        [2:1]   RW value= 0x1 */
79     /* WAY_MASK_3                        [3:1]   RW value= 0x1 */
80     /* WAY_MASK_4                        [4:1]   RW value= 0x1 */
81     /* WAY_MASK_5                        [5:1]   RW value= 0x1 */
82     /* WAY_MASK_6                        [6:1]   RW value= 0x1 */
83     /* WAY_MASK_7                        [7:1]   RW value= 0x1 */
84     /* WAY_MASK_8                        [8:1]   RW value= 0x0 */
85     /* WAY_MASK_9                        [9:1]   RW value= 0x0 */
86     /* WAY_MASK_10                       [10:1]  RW value= 0x0 */
87     /* WAY_MASK_11                       [11:1]  RW value= 0x0 */
88     /* WAY_MASK_12                       [12:1]  RW value= 0x1 */
89     /* WAY_MASK_13                       [13:1]  RW value= 0x1 */
90     /* WAY_MASK_14                       [14:1]  RW value= 0x1 */
91     /* WAY_MASK_15                       [15:1]  RW value= 0x1 */
92 #endif
93 #if !defined (LIBERO_SETTING_WAY_MASK_AXI4_PORT_1)
94 /*Way mask register master DMA. Set field to zero to disable way from this
95 master. The available cache ways are 0 to number set in WAY_ENABLE register. If
96 using scratch pad memory, the ways you want reserved for scrathpad are not
97 available for selection, you must set to 0. e.g. If three ways reserved for
98 scratchpad, WAY_MASK_0, WAY_MASK_1 and WAY_MASK_2 will be set to zero for all
99 masters, so they can not evict the way. */
100 #define LIBERO_SETTING_WAY_MASK_AXI4_PORT_1    0x0000F0FFUL
101     /* WAY_MASK_0                        [0:1]   RW value= 0x1 */
102     /* WAY_MASK_1                        [1:1]   RW value= 0x1 */
103     /* WAY_MASK_2                        [2:1]   RW value= 0x1 */
104     /* WAY_MASK_3                        [3:1]   RW value= 0x1 */
105     /* WAY_MASK_4                        [4:1]   RW value= 0x1 */
106     /* WAY_MASK_5                        [5:1]   RW value= 0x1 */
107     /* WAY_MASK_6                        [6:1]   RW value= 0x1 */
108     /* WAY_MASK_7                        [7:1]   RW value= 0x1 */
109     /* WAY_MASK_8                        [8:1]   RW value= 0x0 */
110     /* WAY_MASK_9                        [9:1]   RW value= 0x0 */
111     /* WAY_MASK_10                       [10:1]  RW value= 0x0 */
112     /* WAY_MASK_11                       [11:1]  RW value= 0x0 */
113     /* WAY_MASK_12                       [12:1]  RW value= 0x1 */
114     /* WAY_MASK_13                       [13:1]  RW value= 0x1 */
115     /* WAY_MASK_14                       [14:1]  RW value= 0x1 */
116     /* WAY_MASK_15                       [15:1]  RW value= 0x1 */
117 #endif
118 #if !defined (LIBERO_SETTING_WAY_MASK_AXI4_PORT_2)
119 /*Way mask registerAXI slave port 2. Set field to zero to disable way from this
120 master. The available cache ways are 0 to number set in WAY_ENABLE register. If
121 using scratch pad memory, the ways you want reserved for scrathpad are not
122 available for selection, you must set to 0. e.g. If three ways reserved for
123 scratchpad, WAY_MASK_0, WAY_MASK_1 and WAY_MASK_2 will be set to zero for all
124 masters, so they can not evict the way. */
125 #define LIBERO_SETTING_WAY_MASK_AXI4_PORT_2    0x0000F0FFUL
126     /* WAY_MASK_0                        [0:1]   RW value= 0x1 */
127     /* WAY_MASK_1                        [1:1]   RW value= 0x1 */
128     /* WAY_MASK_2                        [2:1]   RW value= 0x1 */
129     /* WAY_MASK_3                        [3:1]   RW value= 0x1 */
130     /* WAY_MASK_4                        [4:1]   RW value= 0x1 */
131     /* WAY_MASK_5                        [5:1]   RW value= 0x1 */
132     /* WAY_MASK_6                        [6:1]   RW value= 0x1 */
133     /* WAY_MASK_7                        [7:1]   RW value= 0x1 */
134     /* WAY_MASK_8                        [8:1]   RW value= 0x0 */
135     /* WAY_MASK_9                        [9:1]   RW value= 0x0 */
136     /* WAY_MASK_10                       [10:1]  RW value= 0x0 */
137     /* WAY_MASK_11                       [11:1]  RW value= 0x0 */
138     /* WAY_MASK_12                       [12:1]  RW value= 0x1 */
139     /* WAY_MASK_13                       [13:1]  RW value= 0x1 */
140     /* WAY_MASK_14                       [14:1]  RW value= 0x1 */
141     /* WAY_MASK_15                       [15:1]  RW value= 0x1 */
142 #endif
143 #if !defined (LIBERO_SETTING_WAY_MASK_AXI4_PORT_3)
144 /*Way mask register AXI slave port 3. Set field to 1 to disable way from this
145 master. Set field to zero to disable way from this master. The available cache
146 ways are 0 to number set in WAY_ENABLE register. If using scratch pad memory,
147 the ways you want reserved for scrathpad are not available for selection, you
148 must set to 0. e.g. If three ways reserved for scratchpad, WAY_MASK_0,
149 WAY_MASK_1 and WAY_MASK_2 will be set to zero for all masters, so they can not
150 evict the way. */
151 #define LIBERO_SETTING_WAY_MASK_AXI4_PORT_3    0x0000F0FFUL
152     /* WAY_MASK_0                        [0:1]   RW value= 0x1 */
153     /* WAY_MASK_1                        [1:1]   RW value= 0x1 */
154     /* WAY_MASK_2                        [2:1]   RW value= 0x1 */
155     /* WAY_MASK_3                        [3:1]   RW value= 0x1 */
156     /* WAY_MASK_4                        [4:1]   RW value= 0x1 */
157     /* WAY_MASK_5                        [5:1]   RW value= 0x1 */
158     /* WAY_MASK_6                        [6:1]   RW value= 0x1 */
159     /* WAY_MASK_7                        [7:1]   RW value= 0x1 */
160     /* WAY_MASK_8                        [8:1]   RW value= 0x0 */
161     /* WAY_MASK_9                        [9:1]   RW value= 0x0 */
162     /* WAY_MASK_10                       [10:1]  RW value= 0x0 */
163     /* WAY_MASK_11                       [11:1]  RW value= 0x0 */
164     /* WAY_MASK_12                       [12:1]  RW value= 0x1 */
165     /* WAY_MASK_13                       [13:1]  RW value= 0x1 */
166     /* WAY_MASK_14                       [14:1]  RW value= 0x1 */
167     /* WAY_MASK_15                       [15:1]  RW value= 0x1 */
168 #endif
169 #if !defined (LIBERO_SETTING_WAY_MASK_E51_DCACHE)
170 /*Way mask register E51 data cache (hart0). Set field to zero to disable way
171 from this master. The available cache ways are 0 to number set in WAY_ENABLE
172 register. If using scratch pad memory, the ways you want reserved for scrathpad
173 are not available for selection, you must set to 0. e.g. If three ways reserved
174 for scratchpad, WAY_MASK_0, WAY_MASK_1 and WAY_MASK_2 will be set to zero for
175 all masters, so they can not evict the way. */
176 #define LIBERO_SETTING_WAY_MASK_E51_DCACHE    0x0000F0FFUL
177     /* WAY_MASK_0                        [0:1]   RW value= 0x1 */
178     /* WAY_MASK_1                        [1:1]   RW value= 0x1 */
179     /* WAY_MASK_2                        [2:1]   RW value= 0x1 */
180     /* WAY_MASK_3                        [3:1]   RW value= 0x1 */
181     /* WAY_MASK_4                        [4:1]   RW value= 0x1 */
182     /* WAY_MASK_5                        [5:1]   RW value= 0x1 */
183     /* WAY_MASK_6                        [6:1]   RW value= 0x1 */
184     /* WAY_MASK_7                        [7:1]   RW value= 0x1 */
185     /* WAY_MASK_8                        [8:1]   RW value= 0x0 */
186     /* WAY_MASK_9                        [9:1]   RW value= 0x0 */
187     /* WAY_MASK_10                       [10:1]  RW value= 0x0 */
188     /* WAY_MASK_11                       [11:1]  RW value= 0x0 */
189     /* WAY_MASK_12                       [12:1]  RW value= 0x1 */
190     /* WAY_MASK_13                       [13:1]  RW value= 0x1 */
191     /* WAY_MASK_14                       [14:1]  RW value= 0x1 */
192     /* WAY_MASK_15                       [15:1]  RW value= 0x1 */
193 #endif
194 #if !defined (LIBERO_SETTING_WAY_MASK_E51_ICACHE)
195 /*Way mask registerE52 instruction cache (hart0). Set field to zero to disable
196 way from this master. The available cache ways are 0 to number set in
197 WAY_ENABLE register. If using scratch pad memory, the ways you want reserved
198 for scrathpad are not available for selection, you must set to 0. e.g. If three
199 ways reserved for scratchpad, WAY_MASK_0, WAY_MASK_1 and WAY_MASK_2 will be set
200 to zero for all masters, so they can not evict the way. */
201 #define LIBERO_SETTING_WAY_MASK_E51_ICACHE    0x0000F0FFUL
202     /* WAY_MASK_0                        [0:1]   RW value= 0x1 */
203     /* WAY_MASK_1                        [1:1]   RW value= 0x1 */
204     /* WAY_MASK_2                        [2:1]   RW value= 0x1 */
205     /* WAY_MASK_3                        [3:1]   RW value= 0x1 */
206     /* WAY_MASK_4                        [4:1]   RW value= 0x1 */
207     /* WAY_MASK_5                        [5:1]   RW value= 0x1 */
208     /* WAY_MASK_6                        [6:1]   RW value= 0x1 */
209     /* WAY_MASK_7                        [7:1]   RW value= 0x1 */
210     /* WAY_MASK_8                        [8:1]   RW value= 0x0 */
211     /* WAY_MASK_9                        [9:1]   RW value= 0x0 */
212     /* WAY_MASK_10                       [10:1]  RW value= 0x0 */
213     /* WAY_MASK_11                       [11:1]  RW value= 0x0 */
214     /* WAY_MASK_12                       [12:1]  RW value= 0x1 */
215     /* WAY_MASK_13                       [13:1]  RW value= 0x1 */
216     /* WAY_MASK_14                       [14:1]  RW value= 0x1 */
217     /* WAY_MASK_15                       [15:1]  RW value= 0x1 */
218 #endif
219 #if !defined (LIBERO_SETTING_WAY_MASK_U54_1_DCACHE)
220 /*Way mask register data cache (hart1). Set field to zero to disable way from
221 this master. The available cache ways are 0 to number set in WAY_ENABLE
222 register. If using scratch pad memory, the ways you want reserved for scrathpad
223 are not available for selection, you must set to 0. e.g. If three ways reserved
224 for scratchpad, WAY_MASK_0, WAY_MASK_1 and WAY_MASK_2 will be set to zero for
225 all masters, so they can not evict the way. */
226 #define LIBERO_SETTING_WAY_MASK_U54_1_DCACHE    0x0000F0FFUL
227     /* WAY_MASK_0                        [0:1]   RW value= 0x1 */
228     /* WAY_MASK_1                        [1:1]   RW value= 0x1 */
229     /* WAY_MASK_2                        [2:1]   RW value= 0x1 */
230     /* WAY_MASK_3                        [3:1]   RW value= 0x1 */
231     /* WAY_MASK_4                        [4:1]   RW value= 0x1 */
232     /* WAY_MASK_5                        [5:1]   RW value= 0x1 */
233     /* WAY_MASK_6                        [6:1]   RW value= 0x1 */
234     /* WAY_MASK_7                        [7:1]   RW value= 0x1 */
235     /* WAY_MASK_8                        [8:1]   RW value= 0x0 */
236     /* WAY_MASK_9                        [9:1]   RW value= 0x0 */
237     /* WAY_MASK_10                       [10:1]  RW value= 0x0 */
238     /* WAY_MASK_11                       [11:1]  RW value= 0x0 */
239     /* WAY_MASK_12                       [12:1]  RW value= 0x1 */
240     /* WAY_MASK_13                       [13:1]  RW value= 0x1 */
241     /* WAY_MASK_14                       [14:1]  RW value= 0x1 */
242     /* WAY_MASK_15                       [15:1]  RW value= 0x1 */
243 #endif
244 #if !defined (LIBERO_SETTING_WAY_MASK_U54_1_ICACHE)
245 /*Way mask register instruction cache (hart1). Set field to zero to disable way
246 from this master. The available cache ways are 0 to number set in WAY_ENABLE
247 register. If using scratch pad memory, the ways you want reserved for scrathpad
248 are not available for selection, you must set to 0. e.g. If three ways reserved
249 for scratchpad, WAY_MASK_0, WAY_MASK_1 and WAY_MASK_2 will be set to zero for
250 all masters, so they can not evict the way. */
251 #define LIBERO_SETTING_WAY_MASK_U54_1_ICACHE    0x0000F0FFUL
252     /* WAY_MASK_0                        [0:1]   RW value= 0x1 */
253     /* WAY_MASK_1                        [1:1]   RW value= 0x1 */
254     /* WAY_MASK_2                        [2:1]   RW value= 0x1 */
255     /* WAY_MASK_3                        [3:1]   RW value= 0x1 */
256     /* WAY_MASK_4                        [4:1]   RW value= 0x1 */
257     /* WAY_MASK_5                        [5:1]   RW value= 0x1 */
258     /* WAY_MASK_6                        [6:1]   RW value= 0x1 */
259     /* WAY_MASK_7                        [7:1]   RW value= 0x1 */
260     /* WAY_MASK_8                        [8:1]   RW value= 0x0 */
261     /* WAY_MASK_9                        [9:1]   RW value= 0x0 */
262     /* WAY_MASK_10                       [10:1]  RW value= 0x0 */
263     /* WAY_MASK_11                       [11:1]  RW value= 0x0 */
264     /* WAY_MASK_12                       [12:1]  RW value= 0x1 */
265     /* WAY_MASK_13                       [13:1]  RW value= 0x1 */
266     /* WAY_MASK_14                       [14:1]  RW value= 0x1 */
267     /* WAY_MASK_15                       [15:1]  RW value= 0x1 */
268 #endif
269 #if !defined (LIBERO_SETTING_WAY_MASK_U54_2_DCACHE)
270 /*Way mask register data cache (hart2). Set field to 1 to disable way from this
271 master. Set field to zero to disable way from this master. The available cache
272 ways are 0 to number set in WAY_ENABLE register. If using scratch pad memory,
273 the ways you want reserved for scrathpad are not available for selection, you
274 must set to 0. e.g. If three ways reserved for scratchpad, WAY_MASK_0,
275 WAY_MASK_1 and WAY_MASK_2 will be set to zero for all masters, so they can not
276 evict the way. */
277 #define LIBERO_SETTING_WAY_MASK_U54_2_DCACHE    0x0000F0FFUL
278     /* WAY_MASK_0                        [0:1]   RW value= 0x1 */
279     /* WAY_MASK_1                        [1:1]   RW value= 0x1 */
280     /* WAY_MASK_2                        [2:1]   RW value= 0x1 */
281     /* WAY_MASK_3                        [3:1]   RW value= 0x1 */
282     /* WAY_MASK_4                        [4:1]   RW value= 0x1 */
283     /* WAY_MASK_5                        [5:1]   RW value= 0x1 */
284     /* WAY_MASK_6                        [6:1]   RW value= 0x1 */
285     /* WAY_MASK_7                        [7:1]   RW value= 0x1 */
286     /* WAY_MASK_8                        [8:1]   RW value= 0x0 */
287     /* WAY_MASK_9                        [9:1]   RW value= 0x0 */
288     /* WAY_MASK_10                       [10:1]  RW value= 0x0 */
289     /* WAY_MASK_11                       [11:1]  RW value= 0x0 */
290     /* WAY_MASK_12                       [12:1]  RW value= 0x1 */
291     /* WAY_MASK_13                       [13:1]  RW value= 0x1 */
292     /* WAY_MASK_14                       [14:1]  RW value= 0x1 */
293     /* WAY_MASK_15                       [15:1]  RW value= 0x1 */
294 #endif
295 #if !defined (LIBERO_SETTING_WAY_MASK_U54_2_ICACHE)
296 /*Way mask register instruction cache (hart2). Set field to zero to disable way
297 from this master. The available cache ways are 0 to number set in WAY_ENABLE
298 register. If using scratch pad memory, the ways you want reserved for scrathpad
299 are not available for selection, you must set to 0. e.g. If three ways reserved
300 for scratchpad, WAY_MASK_0, WAY_MASK_1 and WAY_MASK_2 will be set to zero for
301 all masters, so they can not evict the way. */
302 #define LIBERO_SETTING_WAY_MASK_U54_2_ICACHE    0x0000F0FFUL
303     /* WAY_MASK_0                        [0:1]   RW value= 0x1 */
304     /* WAY_MASK_1                        [1:1]   RW value= 0x1 */
305     /* WAY_MASK_2                        [2:1]   RW value= 0x1 */
306     /* WAY_MASK_3                        [3:1]   RW value= 0x1 */
307     /* WAY_MASK_4                        [4:1]   RW value= 0x1 */
308     /* WAY_MASK_5                        [5:1]   RW value= 0x1 */
309     /* WAY_MASK_6                        [6:1]   RW value= 0x1 */
310     /* WAY_MASK_7                        [7:1]   RW value= 0x1 */
311     /* WAY_MASK_8                        [8:1]   RW value= 0x0 */
312     /* WAY_MASK_9                        [9:1]   RW value= 0x0 */
313     /* WAY_MASK_10                       [10:1]  RW value= 0x0 */
314     /* WAY_MASK_11                       [11:1]  RW value= 0x0 */
315     /* WAY_MASK_12                       [12:1]  RW value= 0x1 */
316     /* WAY_MASK_13                       [13:1]  RW value= 0x1 */
317     /* WAY_MASK_14                       [14:1]  RW value= 0x1 */
318     /* WAY_MASK_15                       [15:1]  RW value= 0x1 */
319 #endif
320 #if !defined (LIBERO_SETTING_WAY_MASK_U54_3_DCACHE)
321 /*Way mask register data cache (hart3). Set field to 1 to disable way from this
322 master.Set field to zero to disable way from this master. The available cache
323 ways are 0 to number set in WAY_ENABLE register. If using scratch pad memory,
324 the ways you want reserved for scrathpad are not available for selection, you
325 must set to 0. e.g. If three ways reserved for scratchpad, WAY_MASK_0,
326 WAY_MASK_1 and WAY_MASK_2 will be set to zero for all masters, so they can not
327 evict the way. */
328 #define LIBERO_SETTING_WAY_MASK_U54_3_DCACHE    0x0000F0FFUL
329     /* WAY_MASK_0                        [0:1]   RW value= 0x1 */
330     /* WAY_MASK_1                        [1:1]   RW value= 0x1 */
331     /* WAY_MASK_2                        [2:1]   RW value= 0x1 */
332     /* WAY_MASK_3                        [3:1]   RW value= 0x1 */
333     /* WAY_MASK_4                        [4:1]   RW value= 0x1 */
334     /* WAY_MASK_5                        [5:1]   RW value= 0x1 */
335     /* WAY_MASK_6                        [6:1]   RW value= 0x1 */
336     /* WAY_MASK_7                        [7:1]   RW value= 0x1 */
337     /* WAY_MASK_8                        [8:1]   RW value= 0x0 */
338     /* WAY_MASK_9                        [9:1]   RW value= 0x0 */
339     /* WAY_MASK_10                       [10:1]  RW value= 0x0 */
340     /* WAY_MASK_11                       [11:1]  RW value= 0x0 */
341     /* WAY_MASK_12                       [12:1]  RW value= 0x1 */
342     /* WAY_MASK_13                       [13:1]  RW value= 0x1 */
343     /* WAY_MASK_14                       [14:1]  RW value= 0x1 */
344     /* WAY_MASK_15                       [15:1]  RW value= 0x1 */
345 #endif
346 #if !defined (LIBERO_SETTING_WAY_MASK_U54_3_ICACHE)
347 /*Way mask register instruction cache(hart3). Set field to zero to disable way
348 from this master. The available cache ways are 0 to number set in WAY_ENABLE
349 register. If using scratch pad memory, the ways you want reserved for scrathpad
350 are not available for selection, you must set to 0. e.g. If three ways reserved
351 for scratchpad, WAY_MASK_0, WAY_MASK_1 and WAY_MASK_2 will be set to zero for
352 all masters, so they can not evict the way. */
353 #define LIBERO_SETTING_WAY_MASK_U54_3_ICACHE    0x0000F0FFUL
354     /* WAY_MASK_0                        [0:1]   RW value= 0x1 */
355     /* WAY_MASK_1                        [1:1]   RW value= 0x1 */
356     /* WAY_MASK_2                        [2:1]   RW value= 0x1 */
357     /* WAY_MASK_3                        [3:1]   RW value= 0x1 */
358     /* WAY_MASK_4                        [4:1]   RW value= 0x1 */
359     /* WAY_MASK_5                        [5:1]   RW value= 0x1 */
360     /* WAY_MASK_6                        [6:1]   RW value= 0x1 */
361     /* WAY_MASK_7                        [7:1]   RW value= 0x1 */
362     /* WAY_MASK_8                        [8:1]   RW value= 0x0 */
363     /* WAY_MASK_9                        [9:1]   RW value= 0x0 */
364     /* WAY_MASK_10                       [10:1]  RW value= 0x0 */
365     /* WAY_MASK_11                       [11:1]  RW value= 0x0 */
366     /* WAY_MASK_12                       [12:1]  RW value= 0x1 */
367     /* WAY_MASK_13                       [13:1]  RW value= 0x1 */
368     /* WAY_MASK_14                       [14:1]  RW value= 0x1 */
369     /* WAY_MASK_15                       [15:1]  RW value= 0x1 */
370 #endif
371 #if !defined (LIBERO_SETTING_WAY_MASK_U54_4_DCACHE)
372 /*Way mask register data cache (hart4). Set field to 1 to disable way from this
373 master. Set field to zero to disable way from this master. The available cache
374 ways are 0 to number set in WAY_ENABLE register. If using scratch pad memory,
375 the ways you want reserved for scrathpad are not available for selection, you
376 must set to 0. e.g. If three ways reserved for scratchpad, WAY_MASK_0,
377 WAY_MASK_1 and WAY_MASK_2 will be set to zero for all masters, so they can not
378 evict the way. */
379 #define LIBERO_SETTING_WAY_MASK_U54_4_DCACHE    0x0000F0FFUL
380     /* WAY_MASK_0                        [0:1]   RW value= 0x1 */
381     /* WAY_MASK_1                        [1:1]   RW value= 0x1 */
382     /* WAY_MASK_2                        [2:1]   RW value= 0x1 */
383     /* WAY_MASK_3                        [3:1]   RW value= 0x1 */
384     /* WAY_MASK_4                        [4:1]   RW value= 0x1 */
385     /* WAY_MASK_5                        [5:1]   RW value= 0x1 */
386     /* WAY_MASK_6                        [6:1]   RW value= 0x1 */
387     /* WAY_MASK_7                        [7:1]   RW value= 0x1 */
388     /* WAY_MASK_8                        [8:1]   RW value= 0x0 */
389     /* WAY_MASK_9                        [9:1]   RW value= 0x0 */
390     /* WAY_MASK_10                       [10:1]  RW value= 0x0 */
391     /* WAY_MASK_11                       [11:1]  RW value= 0x0 */
392     /* WAY_MASK_12                       [12:1]  RW value= 0x1 */
393     /* WAY_MASK_13                       [13:1]  RW value= 0x1 */
394     /* WAY_MASK_14                       [14:1]  RW value= 0x1 */
395     /* WAY_MASK_15                       [15:1]  RW value= 0x1 */
396 #endif
397 #if !defined (LIBERO_SETTING_WAY_MASK_U54_4_ICACHE)
398 /*Way mask register instruction cache (hart4). Set field to zero to disable way
399 from this master. The available cache ways are 0 to number set in WAY_ENABLE
400 register. If using scratch pad memory, the ways you want reserved for scrathpad
401 are not available for selection, you must set to 0. e.g. If three ways reserved
402 for scratchpad, WAY_MASK_0, WAY_MASK_1 and WAY_MASK_2 will be set to zero for
403 all masters, so they can not evict the way. */
404 #define LIBERO_SETTING_WAY_MASK_U54_4_ICACHE    0x0000F0FFUL
405     /* WAY_MASK_0                        [0:1]   RW value= 0x1 */
406     /* WAY_MASK_1                        [1:1]   RW value= 0x1 */
407     /* WAY_MASK_2                        [2:1]   RW value= 0x1 */
408     /* WAY_MASK_3                        [3:1]   RW value= 0x1 */
409     /* WAY_MASK_4                        [4:1]   RW value= 0x1 */
410     /* WAY_MASK_5                        [5:1]   RW value= 0x1 */
411     /* WAY_MASK_6                        [6:1]   RW value= 0x1 */
412     /* WAY_MASK_7                        [7:1]   RW value= 0x1 */
413     /* WAY_MASK_8                        [8:1]   RW value= 0x0 */
414     /* WAY_MASK_9                        [9:1]   RW value= 0x0 */
415     /* WAY_MASK_10                       [10:1]  RW value= 0x0 */
416     /* WAY_MASK_11                       [11:1]  RW value= 0x0 */
417     /* WAY_MASK_12                       [12:1]  RW value= 0x1 */
418     /* WAY_MASK_13                       [13:1]  RW value= 0x1 */
419     /* WAY_MASK_14                       [14:1]  RW value= 0x1 */
420     /* WAY_MASK_15                       [15:1]  RW value= 0x1 */
421 #endif
422 #if !defined (LIBERO_SETTING_NUM_SCRATCH_PAD_WAYS)
423 /*Number of ways reserved for scratchpad. Note 1: This is not a register Note
424 2: each way is 128KB. Note 3: Embedded software expects cache ways allocated
425 for scratchpad start at way 0, and work up. */
426 #define LIBERO_SETTING_NUM_SCRATCH_PAD_WAYS    0x00000004UL
427     /* NUM_OF_WAYS                       [0:8]   RW value= 0x4 */
428 #endif
429 
430 #ifdef __cplusplus
431 }
432 #endif
433 
434 
435 #endif /* #ifdef HW_CACHE_H_ */
436 
437