Pavona Software APIs
top_egret_memory.h
Go to the documentation of this file.
1// Copyright lowRISC contributors (OpenTitan project).
2// Licensed under the Apache License, Version 2.0, see LICENSE for details.
3// SPDX-License-Identifier: Apache-2.0
4//
5// ------------------- W A R N I N G: A U T O - G E N E R A T E D C O D E !! -------------------//
6// PLEASE DO NOT HAND-EDIT THIS FILE. IT HAS BEEN AUTO-GENERATED WITH THE FOLLOWING COMMAND:
7// util/gen_top_sw.py -t hw/top_egret/data/autogen/top_egret.gen.hjson
8
9#ifndef OPENTITAN_HW_TOP_EGRET_SW_AUTOGEN_TOP_EGRET_MEMORY_H_
10#define OPENTITAN_HW_TOP_EGRET_SW_AUTOGEN_TOP_EGRET_MEMORY_H_
11
12/**
13 * @file
14 * @brief Assembler-only Top-Specific Definitions.
15 *
16 * This file contains preprocessor definitions for use within assembly code.
17 *
18 * These are not shared with C/C++ code because these are only allowed to be
19 * preprocessor definitions, no data or type declarations are allowed. The
20 * assembler is also stricter about literals (not allowing suffixes for
21 * signed/unsigned which are sensible to use for unsigned values in C/C++).
22 */
23
24// Include guard for assembler
25#ifdef __ASSEMBLER__
26
27/**
28 * Memory base for ram memory on sram_ctrl_ret_aon in top egret.
29 */
30#define TOP_EGRET_SRAM_CTRL_RET_AON_RAM_BASE_ADDR 0x40600000
31
32/**
33 * Memory size for ram memory on sram_ctrl_ret_aon in top egret.
34 */
35#define TOP_EGRET_SRAM_CTRL_RET_AON_RAM_SIZE_BYTES 0x1000
36
37/**
38 * Memory base for mem memory on flash_ctrl in top egret.
39 */
40#define TOP_EGRET_FLASH_CTRL_MEM_BASE_ADDR 0x20000000
41
42/**
43 * Memory size for mem memory on flash_ctrl in top egret.
44 */
45#define TOP_EGRET_FLASH_CTRL_MEM_SIZE_BYTES 0x100000
46
47/**
48 * Memory base for ram memory on sram_ctrl_main in top egret.
49 */
50#define TOP_EGRET_SRAM_CTRL_MAIN_RAM_BASE_ADDR 0x10000000
51
52/**
53 * Memory size for ram memory on sram_ctrl_main in top egret.
54 */
55#define TOP_EGRET_SRAM_CTRL_MAIN_RAM_SIZE_BYTES 0x20000
56
57/**
58 * Memory base for rom memory on rom_ctrl in top egret.
59 */
60#define TOP_EGRET_ROM_CTRL_ROM_BASE_ADDR 0x8000
61
62/**
63 * Memory size for rom memory on rom_ctrl in top egret.
64 */
65#define TOP_EGRET_ROM_CTRL_ROM_SIZE_BYTES 0x8000
66
67
68/**
69 * Peripheral base address for uart0 in top egret.
70 *
71 * This should be used with #mmio_region_from_addr to access the memory-mapped
72 * registers associated with the peripheral (usually via a DIF).
73 */
74#define TOP_EGRET_UART0_BASE_ADDR 0x40000000
75
76/**
77 * Peripheral size for uart0 in top egret.
78 *
79 * This is the size (in bytes) of the peripheral's reserved memory area. All
80 * memory-mapped registers associated with this peripheral should have an
81 * address between #TOP_EGRET_UART0_BASE_ADDR and
82 * `TOP_EGRET_UART0_BASE_ADDR + TOP_EGRET_UART0_SIZE_BYTES`.
83 */
84#define TOP_EGRET_UART0_SIZE_BYTES 0x40
85/**
86 * Peripheral base address for uart1 in top egret.
87 *
88 * This should be used with #mmio_region_from_addr to access the memory-mapped
89 * registers associated with the peripheral (usually via a DIF).
90 */
91#define TOP_EGRET_UART1_BASE_ADDR 0x40010000
92
93/**
94 * Peripheral size for uart1 in top egret.
95 *
96 * This is the size (in bytes) of the peripheral's reserved memory area. All
97 * memory-mapped registers associated with this peripheral should have an
98 * address between #TOP_EGRET_UART1_BASE_ADDR and
99 * `TOP_EGRET_UART1_BASE_ADDR + TOP_EGRET_UART1_SIZE_BYTES`.
100 */
101#define TOP_EGRET_UART1_SIZE_BYTES 0x40
102/**
103 * Peripheral base address for uart2 in top egret.
104 *
105 * This should be used with #mmio_region_from_addr to access the memory-mapped
106 * registers associated with the peripheral (usually via a DIF).
107 */
108#define TOP_EGRET_UART2_BASE_ADDR 0x40020000
109
110/**
111 * Peripheral size for uart2 in top egret.
112 *
113 * This is the size (in bytes) of the peripheral's reserved memory area. All
114 * memory-mapped registers associated with this peripheral should have an
115 * address between #TOP_EGRET_UART2_BASE_ADDR and
116 * `TOP_EGRET_UART2_BASE_ADDR + TOP_EGRET_UART2_SIZE_BYTES`.
117 */
118#define TOP_EGRET_UART2_SIZE_BYTES 0x40
119/**
120 * Peripheral base address for uart3 in top egret.
121 *
122 * This should be used with #mmio_region_from_addr to access the memory-mapped
123 * registers associated with the peripheral (usually via a DIF).
124 */
125#define TOP_EGRET_UART3_BASE_ADDR 0x40030000
126
127/**
128 * Peripheral size for uart3 in top egret.
129 *
130 * This is the size (in bytes) of the peripheral's reserved memory area. All
131 * memory-mapped registers associated with this peripheral should have an
132 * address between #TOP_EGRET_UART3_BASE_ADDR and
133 * `TOP_EGRET_UART3_BASE_ADDR + TOP_EGRET_UART3_SIZE_BYTES`.
134 */
135#define TOP_EGRET_UART3_SIZE_BYTES 0x40
136/**
137 * Peripheral base address for gpio in top egret.
138 *
139 * This should be used with #mmio_region_from_addr to access the memory-mapped
140 * registers associated with the peripheral (usually via a DIF).
141 */
142#define TOP_EGRET_GPIO_BASE_ADDR 0x40040000
143
144/**
145 * Peripheral size for gpio in top egret.
146 *
147 * This is the size (in bytes) of the peripheral's reserved memory area. All
148 * memory-mapped registers associated with this peripheral should have an
149 * address between #TOP_EGRET_GPIO_BASE_ADDR and
150 * `TOP_EGRET_GPIO_BASE_ADDR + TOP_EGRET_GPIO_SIZE_BYTES`.
151 */
152#define TOP_EGRET_GPIO_SIZE_BYTES 0x80
153/**
154 * Peripheral base address for spi_device in top egret.
155 *
156 * This should be used with #mmio_region_from_addr to access the memory-mapped
157 * registers associated with the peripheral (usually via a DIF).
158 */
159#define TOP_EGRET_SPI_DEVICE_BASE_ADDR 0x40050000
160
161/**
162 * Peripheral size for spi_device in top egret.
163 *
164 * This is the size (in bytes) of the peripheral's reserved memory area. All
165 * memory-mapped registers associated with this peripheral should have an
166 * address between #TOP_EGRET_SPI_DEVICE_BASE_ADDR and
167 * `TOP_EGRET_SPI_DEVICE_BASE_ADDR + TOP_EGRET_SPI_DEVICE_SIZE_BYTES`.
168 */
169#define TOP_EGRET_SPI_DEVICE_SIZE_BYTES 0x2000
170/**
171 * Peripheral base address for i2c0 in top egret.
172 *
173 * This should be used with #mmio_region_from_addr to access the memory-mapped
174 * registers associated with the peripheral (usually via a DIF).
175 */
176#define TOP_EGRET_I2C0_BASE_ADDR 0x40080000
177
178/**
179 * Peripheral size for i2c0 in top egret.
180 *
181 * This is the size (in bytes) of the peripheral's reserved memory area. All
182 * memory-mapped registers associated with this peripheral should have an
183 * address between #TOP_EGRET_I2C0_BASE_ADDR and
184 * `TOP_EGRET_I2C0_BASE_ADDR + TOP_EGRET_I2C0_SIZE_BYTES`.
185 */
186#define TOP_EGRET_I2C0_SIZE_BYTES 0x80
187/**
188 * Peripheral base address for i2c1 in top egret.
189 *
190 * This should be used with #mmio_region_from_addr to access the memory-mapped
191 * registers associated with the peripheral (usually via a DIF).
192 */
193#define TOP_EGRET_I2C1_BASE_ADDR 0x40090000
194
195/**
196 * Peripheral size for i2c1 in top egret.
197 *
198 * This is the size (in bytes) of the peripheral's reserved memory area. All
199 * memory-mapped registers associated with this peripheral should have an
200 * address between #TOP_EGRET_I2C1_BASE_ADDR and
201 * `TOP_EGRET_I2C1_BASE_ADDR + TOP_EGRET_I2C1_SIZE_BYTES`.
202 */
203#define TOP_EGRET_I2C1_SIZE_BYTES 0x80
204/**
205 * Peripheral base address for i2c2 in top egret.
206 *
207 * This should be used with #mmio_region_from_addr to access the memory-mapped
208 * registers associated with the peripheral (usually via a DIF).
209 */
210#define TOP_EGRET_I2C2_BASE_ADDR 0x400A0000
211
212/**
213 * Peripheral size for i2c2 in top egret.
214 *
215 * This is the size (in bytes) of the peripheral's reserved memory area. All
216 * memory-mapped registers associated with this peripheral should have an
217 * address between #TOP_EGRET_I2C2_BASE_ADDR and
218 * `TOP_EGRET_I2C2_BASE_ADDR + TOP_EGRET_I2C2_SIZE_BYTES`.
219 */
220#define TOP_EGRET_I2C2_SIZE_BYTES 0x80
221/**
222 * Peripheral base address for pattgen in top egret.
223 *
224 * This should be used with #mmio_region_from_addr to access the memory-mapped
225 * registers associated with the peripheral (usually via a DIF).
226 */
227#define TOP_EGRET_PATTGEN_BASE_ADDR 0x400E0000
228
229/**
230 * Peripheral size for pattgen in top egret.
231 *
232 * This is the size (in bytes) of the peripheral's reserved memory area. All
233 * memory-mapped registers associated with this peripheral should have an
234 * address between #TOP_EGRET_PATTGEN_BASE_ADDR and
235 * `TOP_EGRET_PATTGEN_BASE_ADDR + TOP_EGRET_PATTGEN_SIZE_BYTES`.
236 */
237#define TOP_EGRET_PATTGEN_SIZE_BYTES 0x40
238/**
239 * Peripheral base address for rv_timer in top egret.
240 *
241 * This should be used with #mmio_region_from_addr to access the memory-mapped
242 * registers associated with the peripheral (usually via a DIF).
243 */
244#define TOP_EGRET_RV_TIMER_BASE_ADDR 0x40100000
245
246/**
247 * Peripheral size for rv_timer in top egret.
248 *
249 * This is the size (in bytes) of the peripheral's reserved memory area. All
250 * memory-mapped registers associated with this peripheral should have an
251 * address between #TOP_EGRET_RV_TIMER_BASE_ADDR and
252 * `TOP_EGRET_RV_TIMER_BASE_ADDR + TOP_EGRET_RV_TIMER_SIZE_BYTES`.
253 */
254#define TOP_EGRET_RV_TIMER_SIZE_BYTES 0x200
255/**
256 * Peripheral base address for core device on otp_ctrl in top egret.
257 *
258 * This should be used with #mmio_region_from_addr to access the memory-mapped
259 * registers associated with the peripheral (usually via a DIF).
260 */
261#define TOP_EGRET_OTP_CTRL_CORE_BASE_ADDR 0x40130000
262
263/**
264 * Peripheral size for core device on otp_ctrl in top egret.
265 *
266 * This is the size (in bytes) of the peripheral's reserved memory area. All
267 * memory-mapped registers associated with this peripheral should have an
268 * address between #TOP_EGRET_OTP_CTRL_CORE_BASE_ADDR and
269 * `TOP_EGRET_OTP_CTRL_CORE_BASE_ADDR + TOP_EGRET_OTP_CTRL_CORE_SIZE_BYTES`.
270 */
271#define TOP_EGRET_OTP_CTRL_CORE_SIZE_BYTES 0x1000
272/**
273 * Peripheral base address for prim device on otp_macro in top egret.
274 *
275 * This should be used with #mmio_region_from_addr to access the memory-mapped
276 * registers associated with the peripheral (usually via a DIF).
277 */
278#define TOP_EGRET_OTP_MACRO_PRIM_BASE_ADDR 0x40138000
279
280/**
281 * Peripheral size for prim device on otp_macro in top egret.
282 *
283 * This is the size (in bytes) of the peripheral's reserved memory area. All
284 * memory-mapped registers associated with this peripheral should have an
285 * address between #TOP_EGRET_OTP_MACRO_PRIM_BASE_ADDR and
286 * `TOP_EGRET_OTP_MACRO_PRIM_BASE_ADDR + TOP_EGRET_OTP_MACRO_PRIM_SIZE_BYTES`.
287 */
288#define TOP_EGRET_OTP_MACRO_PRIM_SIZE_BYTES 0x20
289/**
290 * Peripheral base address for regs device on lc_ctrl in top egret.
291 *
292 * This should be used with #mmio_region_from_addr to access the memory-mapped
293 * registers associated with the peripheral (usually via a DIF).
294 */
295#define TOP_EGRET_LC_CTRL_REGS_BASE_ADDR 0x40140000
296
297/**
298 * Peripheral size for regs device on lc_ctrl in top egret.
299 *
300 * This is the size (in bytes) of the peripheral's reserved memory area. All
301 * memory-mapped registers associated with this peripheral should have an
302 * address between #TOP_EGRET_LC_CTRL_REGS_BASE_ADDR and
303 * `TOP_EGRET_LC_CTRL_REGS_BASE_ADDR + TOP_EGRET_LC_CTRL_REGS_SIZE_BYTES`.
304 */
305#define TOP_EGRET_LC_CTRL_REGS_SIZE_BYTES 0x100
306/**
307 * Peripheral base address for dmi device on lc_ctrl in top egret.
308 *
309 * This should be used with #mmio_region_from_addr to access the memory-mapped
310 * registers associated with the peripheral (usually via a DIF).
311 */
312#define TOP_EGRET_LC_CTRL_DMI_BASE_ADDR 0x0
313
314/**
315 * Peripheral size for dmi device on lc_ctrl in top egret.
316 *
317 * This is the size (in bytes) of the peripheral's reserved memory area. All
318 * memory-mapped registers associated with this peripheral should have an
319 * address between #TOP_EGRET_LC_CTRL_DMI_BASE_ADDR and
320 * `TOP_EGRET_LC_CTRL_DMI_BASE_ADDR + TOP_EGRET_LC_CTRL_DMI_SIZE_BYTES`.
321 */
322#define TOP_EGRET_LC_CTRL_DMI_SIZE_BYTES 0x1000
323/**
324 * Peripheral base address for alert_handler in top egret.
325 *
326 * This should be used with #mmio_region_from_addr to access the memory-mapped
327 * registers associated with the peripheral (usually via a DIF).
328 */
329#define TOP_EGRET_ALERT_HANDLER_BASE_ADDR 0x40150000
330
331/**
332 * Peripheral size for alert_handler in top egret.
333 *
334 * This is the size (in bytes) of the peripheral's reserved memory area. All
335 * memory-mapped registers associated with this peripheral should have an
336 * address between #TOP_EGRET_ALERT_HANDLER_BASE_ADDR and
337 * `TOP_EGRET_ALERT_HANDLER_BASE_ADDR + TOP_EGRET_ALERT_HANDLER_SIZE_BYTES`.
338 */
339#define TOP_EGRET_ALERT_HANDLER_SIZE_BYTES 0x800
340/**
341 * Peripheral base address for spi_host0 in top egret.
342 *
343 * This should be used with #mmio_region_from_addr to access the memory-mapped
344 * registers associated with the peripheral (usually via a DIF).
345 */
346#define TOP_EGRET_SPI_HOST0_BASE_ADDR 0x40300000
347
348/**
349 * Peripheral size for spi_host0 in top egret.
350 *
351 * This is the size (in bytes) of the peripheral's reserved memory area. All
352 * memory-mapped registers associated with this peripheral should have an
353 * address between #TOP_EGRET_SPI_HOST0_BASE_ADDR and
354 * `TOP_EGRET_SPI_HOST0_BASE_ADDR + TOP_EGRET_SPI_HOST0_SIZE_BYTES`.
355 */
356#define TOP_EGRET_SPI_HOST0_SIZE_BYTES 0x40
357/**
358 * Peripheral base address for spi_host1 in top egret.
359 *
360 * This should be used with #mmio_region_from_addr to access the memory-mapped
361 * registers associated with the peripheral (usually via a DIF).
362 */
363#define TOP_EGRET_SPI_HOST1_BASE_ADDR 0x40310000
364
365/**
366 * Peripheral size for spi_host1 in top egret.
367 *
368 * This is the size (in bytes) of the peripheral's reserved memory area. All
369 * memory-mapped registers associated with this peripheral should have an
370 * address between #TOP_EGRET_SPI_HOST1_BASE_ADDR and
371 * `TOP_EGRET_SPI_HOST1_BASE_ADDR + TOP_EGRET_SPI_HOST1_SIZE_BYTES`.
372 */
373#define TOP_EGRET_SPI_HOST1_SIZE_BYTES 0x40
374/**
375 * Peripheral base address for usbdev in top egret.
376 *
377 * This should be used with #mmio_region_from_addr to access the memory-mapped
378 * registers associated with the peripheral (usually via a DIF).
379 */
380#define TOP_EGRET_USBDEV_BASE_ADDR 0x40320000
381
382/**
383 * Peripheral size for usbdev in top egret.
384 *
385 * This is the size (in bytes) of the peripheral's reserved memory area. All
386 * memory-mapped registers associated with this peripheral should have an
387 * address between #TOP_EGRET_USBDEV_BASE_ADDR and
388 * `TOP_EGRET_USBDEV_BASE_ADDR + TOP_EGRET_USBDEV_SIZE_BYTES`.
389 */
390#define TOP_EGRET_USBDEV_SIZE_BYTES 0x1000
391/**
392 * Peripheral base address for pwrmgr_aon in top egret.
393 *
394 * This should be used with #mmio_region_from_addr to access the memory-mapped
395 * registers associated with the peripheral (usually via a DIF).
396 */
397#define TOP_EGRET_PWRMGR_AON_BASE_ADDR 0x40400000
398
399/**
400 * Peripheral size for pwrmgr_aon in top egret.
401 *
402 * This is the size (in bytes) of the peripheral's reserved memory area. All
403 * memory-mapped registers associated with this peripheral should have an
404 * address between #TOP_EGRET_PWRMGR_AON_BASE_ADDR and
405 * `TOP_EGRET_PWRMGR_AON_BASE_ADDR + TOP_EGRET_PWRMGR_AON_SIZE_BYTES`.
406 */
407#define TOP_EGRET_PWRMGR_AON_SIZE_BYTES 0x80
408/**
409 * Peripheral base address for rstmgr_aon in top egret.
410 *
411 * This should be used with #mmio_region_from_addr to access the memory-mapped
412 * registers associated with the peripheral (usually via a DIF).
413 */
414#define TOP_EGRET_RSTMGR_AON_BASE_ADDR 0x40410000
415
416/**
417 * Peripheral size for rstmgr_aon in top egret.
418 *
419 * This is the size (in bytes) of the peripheral's reserved memory area. All
420 * memory-mapped registers associated with this peripheral should have an
421 * address between #TOP_EGRET_RSTMGR_AON_BASE_ADDR and
422 * `TOP_EGRET_RSTMGR_AON_BASE_ADDR + TOP_EGRET_RSTMGR_AON_SIZE_BYTES`.
423 */
424#define TOP_EGRET_RSTMGR_AON_SIZE_BYTES 0x80
425/**
426 * Peripheral base address for clkmgr_aon in top egret.
427 *
428 * This should be used with #mmio_region_from_addr to access the memory-mapped
429 * registers associated with the peripheral (usually via a DIF).
430 */
431#define TOP_EGRET_CLKMGR_AON_BASE_ADDR 0x40420000
432
433/**
434 * Peripheral size for clkmgr_aon in top egret.
435 *
436 * This is the size (in bytes) of the peripheral's reserved memory area. All
437 * memory-mapped registers associated with this peripheral should have an
438 * address between #TOP_EGRET_CLKMGR_AON_BASE_ADDR and
439 * `TOP_EGRET_CLKMGR_AON_BASE_ADDR + TOP_EGRET_CLKMGR_AON_SIZE_BYTES`.
440 */
441#define TOP_EGRET_CLKMGR_AON_SIZE_BYTES 0x80
442/**
443 * Peripheral base address for sysrst_ctrl_aon in top egret.
444 *
445 * This should be used with #mmio_region_from_addr to access the memory-mapped
446 * registers associated with the peripheral (usually via a DIF).
447 */
448#define TOP_EGRET_SYSRST_CTRL_AON_BASE_ADDR 0x40430000
449
450/**
451 * Peripheral size for sysrst_ctrl_aon in top egret.
452 *
453 * This is the size (in bytes) of the peripheral's reserved memory area. All
454 * memory-mapped registers associated with this peripheral should have an
455 * address between #TOP_EGRET_SYSRST_CTRL_AON_BASE_ADDR and
456 * `TOP_EGRET_SYSRST_CTRL_AON_BASE_ADDR + TOP_EGRET_SYSRST_CTRL_AON_SIZE_BYTES`.
457 */
458#define TOP_EGRET_SYSRST_CTRL_AON_SIZE_BYTES 0x100
459/**
460 * Peripheral base address for adc_ctrl_aon in top egret.
461 *
462 * This should be used with #mmio_region_from_addr to access the memory-mapped
463 * registers associated with the peripheral (usually via a DIF).
464 */
465#define TOP_EGRET_ADC_CTRL_AON_BASE_ADDR 0x40440000
466
467/**
468 * Peripheral size for adc_ctrl_aon in top egret.
469 *
470 * This is the size (in bytes) of the peripheral's reserved memory area. All
471 * memory-mapped registers associated with this peripheral should have an
472 * address between #TOP_EGRET_ADC_CTRL_AON_BASE_ADDR and
473 * `TOP_EGRET_ADC_CTRL_AON_BASE_ADDR + TOP_EGRET_ADC_CTRL_AON_SIZE_BYTES`.
474 */
475#define TOP_EGRET_ADC_CTRL_AON_SIZE_BYTES 0x80
476/**
477 * Peripheral base address for pwm_aon in top egret.
478 *
479 * This should be used with #mmio_region_from_addr to access the memory-mapped
480 * registers associated with the peripheral (usually via a DIF).
481 */
482#define TOP_EGRET_PWM_AON_BASE_ADDR 0x40450000
483
484/**
485 * Peripheral size for pwm_aon in top egret.
486 *
487 * This is the size (in bytes) of the peripheral's reserved memory area. All
488 * memory-mapped registers associated with this peripheral should have an
489 * address between #TOP_EGRET_PWM_AON_BASE_ADDR and
490 * `TOP_EGRET_PWM_AON_BASE_ADDR + TOP_EGRET_PWM_AON_SIZE_BYTES`.
491 */
492#define TOP_EGRET_PWM_AON_SIZE_BYTES 0x80
493/**
494 * Peripheral base address for pinmux_aon in top egret.
495 *
496 * This should be used with #mmio_region_from_addr to access the memory-mapped
497 * registers associated with the peripheral (usually via a DIF).
498 */
499#define TOP_EGRET_PINMUX_AON_BASE_ADDR 0x40460000
500
501/**
502 * Peripheral size for pinmux_aon in top egret.
503 *
504 * This is the size (in bytes) of the peripheral's reserved memory area. All
505 * memory-mapped registers associated with this peripheral should have an
506 * address between #TOP_EGRET_PINMUX_AON_BASE_ADDR and
507 * `TOP_EGRET_PINMUX_AON_BASE_ADDR + TOP_EGRET_PINMUX_AON_SIZE_BYTES`.
508 */
509#define TOP_EGRET_PINMUX_AON_SIZE_BYTES 0x1000
510/**
511 * Peripheral base address for aon_timer_aon in top egret.
512 *
513 * This should be used with #mmio_region_from_addr to access the memory-mapped
514 * registers associated with the peripheral (usually via a DIF).
515 */
516#define TOP_EGRET_AON_TIMER_AON_BASE_ADDR 0x40470000
517
518/**
519 * Peripheral size for aon_timer_aon in top egret.
520 *
521 * This is the size (in bytes) of the peripheral's reserved memory area. All
522 * memory-mapped registers associated with this peripheral should have an
523 * address between #TOP_EGRET_AON_TIMER_AON_BASE_ADDR and
524 * `TOP_EGRET_AON_TIMER_AON_BASE_ADDR + TOP_EGRET_AON_TIMER_AON_SIZE_BYTES`.
525 */
526#define TOP_EGRET_AON_TIMER_AON_SIZE_BYTES 0x40
527/**
528 * Peripheral base address for ast in top egret.
529 *
530 * This should be used with #mmio_region_from_addr to access the memory-mapped
531 * registers associated with the peripheral (usually via a DIF).
532 */
533#define TOP_EGRET_AST_BASE_ADDR 0x40480000
534
535/**
536 * Peripheral size for ast in top egret.
537 *
538 * This is the size (in bytes) of the peripheral's reserved memory area. All
539 * memory-mapped registers associated with this peripheral should have an
540 * address between #TOP_EGRET_AST_BASE_ADDR and
541 * `TOP_EGRET_AST_BASE_ADDR + TOP_EGRET_AST_SIZE_BYTES`.
542 */
543#define TOP_EGRET_AST_SIZE_BYTES 0x400
544/**
545 * Peripheral base address for sensor_ctrl_aon in top egret.
546 *
547 * This should be used with #mmio_region_from_addr to access the memory-mapped
548 * registers associated with the peripheral (usually via a DIF).
549 */
550#define TOP_EGRET_SENSOR_CTRL_AON_BASE_ADDR 0x40490000
551
552/**
553 * Peripheral size for sensor_ctrl_aon in top egret.
554 *
555 * This is the size (in bytes) of the peripheral's reserved memory area. All
556 * memory-mapped registers associated with this peripheral should have an
557 * address between #TOP_EGRET_SENSOR_CTRL_AON_BASE_ADDR and
558 * `TOP_EGRET_SENSOR_CTRL_AON_BASE_ADDR + TOP_EGRET_SENSOR_CTRL_AON_SIZE_BYTES`.
559 */
560#define TOP_EGRET_SENSOR_CTRL_AON_SIZE_BYTES 0x80
561/**
562 * Peripheral base address for regs device on sram_ctrl_ret_aon in top egret.
563 *
564 * This should be used with #mmio_region_from_addr to access the memory-mapped
565 * registers associated with the peripheral (usually via a DIF).
566 */
567#define TOP_EGRET_SRAM_CTRL_RET_AON_REGS_BASE_ADDR 0x40500000
568
569/**
570 * Peripheral size for regs device on sram_ctrl_ret_aon in top egret.
571 *
572 * This is the size (in bytes) of the peripheral's reserved memory area. All
573 * memory-mapped registers associated with this peripheral should have an
574 * address between #TOP_EGRET_SRAM_CTRL_RET_AON_REGS_BASE_ADDR and
575 * `TOP_EGRET_SRAM_CTRL_RET_AON_REGS_BASE_ADDR + TOP_EGRET_SRAM_CTRL_RET_AON_REGS_SIZE_BYTES`.
576 */
577#define TOP_EGRET_SRAM_CTRL_RET_AON_REGS_SIZE_BYTES 0x40
578/**
579 * Peripheral base address for core device on flash_ctrl in top egret.
580 *
581 * This should be used with #mmio_region_from_addr to access the memory-mapped
582 * registers associated with the peripheral (usually via a DIF).
583 */
584#define TOP_EGRET_FLASH_CTRL_CORE_BASE_ADDR 0x41000000
585
586/**
587 * Peripheral size for core device on flash_ctrl in top egret.
588 *
589 * This is the size (in bytes) of the peripheral's reserved memory area. All
590 * memory-mapped registers associated with this peripheral should have an
591 * address between #TOP_EGRET_FLASH_CTRL_CORE_BASE_ADDR and
592 * `TOP_EGRET_FLASH_CTRL_CORE_BASE_ADDR + TOP_EGRET_FLASH_CTRL_CORE_SIZE_BYTES`.
593 */
594#define TOP_EGRET_FLASH_CTRL_CORE_SIZE_BYTES 0x200
595/**
596 * Peripheral base address for flash_macro_wrapper in top egret.
597 *
598 * This should be used with #mmio_region_from_addr to access the memory-mapped
599 * registers associated with the peripheral (usually via a DIF).
600 */
601#define TOP_EGRET_FLASH_MACRO_WRAPPER_BASE_ADDR 0x41008000
602
603/**
604 * Peripheral size for flash_macro_wrapper in top egret.
605 *
606 * This is the size (in bytes) of the peripheral's reserved memory area. All
607 * memory-mapped registers associated with this peripheral should have an
608 * address between #TOP_EGRET_FLASH_MACRO_WRAPPER_BASE_ADDR and
609 * `TOP_EGRET_FLASH_MACRO_WRAPPER_BASE_ADDR + TOP_EGRET_FLASH_MACRO_WRAPPER_SIZE_BYTES`.
610 */
611#define TOP_EGRET_FLASH_MACRO_WRAPPER_SIZE_BYTES 0x80
612/**
613 * Peripheral base address for regs device on rv_dm in top egret.
614 *
615 * This should be used with #mmio_region_from_addr to access the memory-mapped
616 * registers associated with the peripheral (usually via a DIF).
617 */
618#define TOP_EGRET_RV_DM_REGS_BASE_ADDR 0x41200000
619
620/**
621 * Peripheral size for regs device on rv_dm in top egret.
622 *
623 * This is the size (in bytes) of the peripheral's reserved memory area. All
624 * memory-mapped registers associated with this peripheral should have an
625 * address between #TOP_EGRET_RV_DM_REGS_BASE_ADDR and
626 * `TOP_EGRET_RV_DM_REGS_BASE_ADDR + TOP_EGRET_RV_DM_REGS_SIZE_BYTES`.
627 */
628#define TOP_EGRET_RV_DM_REGS_SIZE_BYTES 0x10
629/**
630 * Peripheral base address for mem device on rv_dm in top egret.
631 *
632 * This should be used with #mmio_region_from_addr to access the memory-mapped
633 * registers associated with the peripheral (usually via a DIF).
634 */
635#define TOP_EGRET_RV_DM_MEM_BASE_ADDR 0x10000
636
637/**
638 * Peripheral size for mem device on rv_dm in top egret.
639 *
640 * This is the size (in bytes) of the peripheral's reserved memory area. All
641 * memory-mapped registers associated with this peripheral should have an
642 * address between #TOP_EGRET_RV_DM_MEM_BASE_ADDR and
643 * `TOP_EGRET_RV_DM_MEM_BASE_ADDR + TOP_EGRET_RV_DM_MEM_SIZE_BYTES`.
644 */
645#define TOP_EGRET_RV_DM_MEM_SIZE_BYTES 0x1000
646/**
647 * Peripheral base address for dbg device on rv_dm in top egret.
648 *
649 * This should be used with #mmio_region_from_addr to access the memory-mapped
650 * registers associated with the peripheral (usually via a DIF).
651 */
652#define TOP_EGRET_RV_DM_DBG_BASE_ADDR 0x1000
653
654/**
655 * Peripheral size for dbg device on rv_dm in top egret.
656 *
657 * This is the size (in bytes) of the peripheral's reserved memory area. All
658 * memory-mapped registers associated with this peripheral should have an
659 * address between #TOP_EGRET_RV_DM_DBG_BASE_ADDR and
660 * `TOP_EGRET_RV_DM_DBG_BASE_ADDR + TOP_EGRET_RV_DM_DBG_SIZE_BYTES`.
661 */
662#define TOP_EGRET_RV_DM_DBG_SIZE_BYTES 0x200
663/**
664 * Peripheral base address for rv_plic in top egret.
665 *
666 * This should be used with #mmio_region_from_addr to access the memory-mapped
667 * registers associated with the peripheral (usually via a DIF).
668 */
669#define TOP_EGRET_RV_PLIC_BASE_ADDR 0x48000000
670
671/**
672 * Peripheral size for rv_plic in top egret.
673 *
674 * This is the size (in bytes) of the peripheral's reserved memory area. All
675 * memory-mapped registers associated with this peripheral should have an
676 * address between #TOP_EGRET_RV_PLIC_BASE_ADDR and
677 * `TOP_EGRET_RV_PLIC_BASE_ADDR + TOP_EGRET_RV_PLIC_SIZE_BYTES`.
678 */
679#define TOP_EGRET_RV_PLIC_SIZE_BYTES 0x8000000
680/**
681 * Peripheral base address for acc in top egret.
682 *
683 * This should be used with #mmio_region_from_addr to access the memory-mapped
684 * registers associated with the peripheral (usually via a DIF).
685 */
686#define TOP_EGRET_ACC_BASE_ADDR 0x41300000
687
688/**
689 * Peripheral size for acc in top egret.
690 *
691 * This is the size (in bytes) of the peripheral's reserved memory area. All
692 * memory-mapped registers associated with this peripheral should have an
693 * address between #TOP_EGRET_ACC_BASE_ADDR and
694 * `TOP_EGRET_ACC_BASE_ADDR + TOP_EGRET_ACC_SIZE_BYTES`.
695 */
696#define TOP_EGRET_ACC_SIZE_BYTES 0x20000
697/**
698 * Peripheral base address for aes in top egret.
699 *
700 * This should be used with #mmio_region_from_addr to access the memory-mapped
701 * registers associated with the peripheral (usually via a DIF).
702 */
703#define TOP_EGRET_AES_BASE_ADDR 0x41100000
704
705/**
706 * Peripheral size for aes in top egret.
707 *
708 * This is the size (in bytes) of the peripheral's reserved memory area. All
709 * memory-mapped registers associated with this peripheral should have an
710 * address between #TOP_EGRET_AES_BASE_ADDR and
711 * `TOP_EGRET_AES_BASE_ADDR + TOP_EGRET_AES_SIZE_BYTES`.
712 */
713#define TOP_EGRET_AES_SIZE_BYTES 0x100
714/**
715 * Peripheral base address for hmac in top egret.
716 *
717 * This should be used with #mmio_region_from_addr to access the memory-mapped
718 * registers associated with the peripheral (usually via a DIF).
719 */
720#define TOP_EGRET_HMAC_BASE_ADDR 0x41110000
721
722/**
723 * Peripheral size for hmac in top egret.
724 *
725 * This is the size (in bytes) of the peripheral's reserved memory area. All
726 * memory-mapped registers associated with this peripheral should have an
727 * address between #TOP_EGRET_HMAC_BASE_ADDR and
728 * `TOP_EGRET_HMAC_BASE_ADDR + TOP_EGRET_HMAC_SIZE_BYTES`.
729 */
730#define TOP_EGRET_HMAC_SIZE_BYTES 0x2000
731/**
732 * Peripheral base address for kmac in top egret.
733 *
734 * This should be used with #mmio_region_from_addr to access the memory-mapped
735 * registers associated with the peripheral (usually via a DIF).
736 */
737#define TOP_EGRET_KMAC_BASE_ADDR 0x41120000
738
739/**
740 * Peripheral size for kmac in top egret.
741 *
742 * This is the size (in bytes) of the peripheral's reserved memory area. All
743 * memory-mapped registers associated with this peripheral should have an
744 * address between #TOP_EGRET_KMAC_BASE_ADDR and
745 * `TOP_EGRET_KMAC_BASE_ADDR + TOP_EGRET_KMAC_SIZE_BYTES`.
746 */
747#define TOP_EGRET_KMAC_SIZE_BYTES 0x1000
748/**
749 * Peripheral base address for keymgr in top egret.
750 *
751 * This should be used with #mmio_region_from_addr to access the memory-mapped
752 * registers associated with the peripheral (usually via a DIF).
753 */
754#define TOP_EGRET_KEYMGR_BASE_ADDR 0x41140000
755
756/**
757 * Peripheral size for keymgr in top egret.
758 *
759 * This is the size (in bytes) of the peripheral's reserved memory area. All
760 * memory-mapped registers associated with this peripheral should have an
761 * address between #TOP_EGRET_KEYMGR_BASE_ADDR and
762 * `TOP_EGRET_KEYMGR_BASE_ADDR + TOP_EGRET_KEYMGR_SIZE_BYTES`.
763 */
764#define TOP_EGRET_KEYMGR_SIZE_BYTES 0x100
765/**
766 * Peripheral base address for csrng in top egret.
767 *
768 * This should be used with #mmio_region_from_addr to access the memory-mapped
769 * registers associated with the peripheral (usually via a DIF).
770 */
771#define TOP_EGRET_CSRNG_BASE_ADDR 0x41150000
772
773/**
774 * Peripheral size for csrng in top egret.
775 *
776 * This is the size (in bytes) of the peripheral's reserved memory area. All
777 * memory-mapped registers associated with this peripheral should have an
778 * address between #TOP_EGRET_CSRNG_BASE_ADDR and
779 * `TOP_EGRET_CSRNG_BASE_ADDR + TOP_EGRET_CSRNG_SIZE_BYTES`.
780 */
781#define TOP_EGRET_CSRNG_SIZE_BYTES 0x80
782/**
783 * Peripheral base address for entropy_src in top egret.
784 *
785 * This should be used with #mmio_region_from_addr to access the memory-mapped
786 * registers associated with the peripheral (usually via a DIF).
787 */
788#define TOP_EGRET_ENTROPY_SRC_BASE_ADDR 0x41160000
789
790/**
791 * Peripheral size for entropy_src in top egret.
792 *
793 * This is the size (in bytes) of the peripheral's reserved memory area. All
794 * memory-mapped registers associated with this peripheral should have an
795 * address between #TOP_EGRET_ENTROPY_SRC_BASE_ADDR and
796 * `TOP_EGRET_ENTROPY_SRC_BASE_ADDR + TOP_EGRET_ENTROPY_SRC_SIZE_BYTES`.
797 */
798#define TOP_EGRET_ENTROPY_SRC_SIZE_BYTES 0x100
799/**
800 * Peripheral base address for edn0 in top egret.
801 *
802 * This should be used with #mmio_region_from_addr to access the memory-mapped
803 * registers associated with the peripheral (usually via a DIF).
804 */
805#define TOP_EGRET_EDN0_BASE_ADDR 0x41170000
806
807/**
808 * Peripheral size for edn0 in top egret.
809 *
810 * This is the size (in bytes) of the peripheral's reserved memory area. All
811 * memory-mapped registers associated with this peripheral should have an
812 * address between #TOP_EGRET_EDN0_BASE_ADDR and
813 * `TOP_EGRET_EDN0_BASE_ADDR + TOP_EGRET_EDN0_SIZE_BYTES`.
814 */
815#define TOP_EGRET_EDN0_SIZE_BYTES 0x80
816/**
817 * Peripheral base address for edn1 in top egret.
818 *
819 * This should be used with #mmio_region_from_addr to access the memory-mapped
820 * registers associated with the peripheral (usually via a DIF).
821 */
822#define TOP_EGRET_EDN1_BASE_ADDR 0x41180000
823
824/**
825 * Peripheral size for edn1 in top egret.
826 *
827 * This is the size (in bytes) of the peripheral's reserved memory area. All
828 * memory-mapped registers associated with this peripheral should have an
829 * address between #TOP_EGRET_EDN1_BASE_ADDR and
830 * `TOP_EGRET_EDN1_BASE_ADDR + TOP_EGRET_EDN1_SIZE_BYTES`.
831 */
832#define TOP_EGRET_EDN1_SIZE_BYTES 0x80
833/**
834 * Peripheral base address for regs device on sram_ctrl_main in top egret.
835 *
836 * This should be used with #mmio_region_from_addr to access the memory-mapped
837 * registers associated with the peripheral (usually via a DIF).
838 */
839#define TOP_EGRET_SRAM_CTRL_MAIN_REGS_BASE_ADDR 0x411C0000
840
841/**
842 * Peripheral size for regs device on sram_ctrl_main in top egret.
843 *
844 * This is the size (in bytes) of the peripheral's reserved memory area. All
845 * memory-mapped registers associated with this peripheral should have an
846 * address between #TOP_EGRET_SRAM_CTRL_MAIN_REGS_BASE_ADDR and
847 * `TOP_EGRET_SRAM_CTRL_MAIN_REGS_BASE_ADDR + TOP_EGRET_SRAM_CTRL_MAIN_REGS_SIZE_BYTES`.
848 */
849#define TOP_EGRET_SRAM_CTRL_MAIN_REGS_SIZE_BYTES 0x40
850/**
851 * Peripheral base address for regs device on rom_ctrl in top egret.
852 *
853 * This should be used with #mmio_region_from_addr to access the memory-mapped
854 * registers associated with the peripheral (usually via a DIF).
855 */
856#define TOP_EGRET_ROM_CTRL_REGS_BASE_ADDR 0x411E0000
857
858/**
859 * Peripheral size for regs device on rom_ctrl in top egret.
860 *
861 * This is the size (in bytes) of the peripheral's reserved memory area. All
862 * memory-mapped registers associated with this peripheral should have an
863 * address between #TOP_EGRET_ROM_CTRL_REGS_BASE_ADDR and
864 * `TOP_EGRET_ROM_CTRL_REGS_BASE_ADDR + TOP_EGRET_ROM_CTRL_REGS_SIZE_BYTES`.
865 */
866#define TOP_EGRET_ROM_CTRL_REGS_SIZE_BYTES 0x80
867/**
868 * Peripheral base address for cfg device on rv_core_ibex in top egret.
869 *
870 * This should be used with #mmio_region_from_addr to access the memory-mapped
871 * registers associated with the peripheral (usually via a DIF).
872 */
873#define TOP_EGRET_RV_CORE_IBEX_CFG_BASE_ADDR 0x411F0000
874
875/**
876 * Peripheral size for cfg device on rv_core_ibex in top egret.
877 *
878 * This is the size (in bytes) of the peripheral's reserved memory area. All
879 * memory-mapped registers associated with this peripheral should have an
880 * address between #TOP_EGRET_RV_CORE_IBEX_CFG_BASE_ADDR and
881 * `TOP_EGRET_RV_CORE_IBEX_CFG_BASE_ADDR + TOP_EGRET_RV_CORE_IBEX_CFG_SIZE_BYTES`.
882 */
883#define TOP_EGRET_RV_CORE_IBEX_CFG_SIZE_BYTES 0x100
884
885/**
886 * MMIO Region
887 *
888 * MMIO region excludes any memory that is separate from the module
889 * configuration space, i.e. ROM, main SRAM, and flash are excluded but
890 * retention SRAM, spi_device memory, or usbdev memory are included.
891 */
892#define TOP_EGRET_MMIO_BASE_ADDR 0x40000000
893#define TOP_EGRET_MMIO_SIZE_BYTES 0x10000000
894
895#endif // __ASSEMBLER__
896
897#endif // OPENTITAN_HW_TOP_EGRET_SW_AUTOGEN_TOP_EGRET_MEMORY_H_