NEORV32 Software Framework Documentation
The NEORV32 RISC-V Processor
Loading...
Searching...
No Matches
neorv32_sysinfo.h
1// ================================================================================ //
2// The NEORV32 RISC-V Processor - https://github.com/stnolting/neorv32 //
3// Copyright (c) NEORV32 contributors. //
4// Copyright (c) 2020 - 2024 Stephan Nolting. All rights reserved. //
5// Licensed under the BSD-3-Clause license, see LICENSE for details. //
6// SPDX-License-Identifier: BSD-3-Clause //
7// ================================================================================ //
8
16#ifndef neorv32_sysinfo_h
17#define neorv32_sysinfo_h
18
19#include <stdint.h>
20
21
22/**********************************************************************/
27typedef volatile struct __attribute__((packed,aligned(4))) {
28 const uint32_t CLK;
29 const uint8_t MEM[4];
30 const uint32_t SOC;
31 const uint32_t CACHE;
33
35#define NEORV32_SYSINFO ((neorv32_sysinfo_t*) (NEORV32_SYSINFO_BASE))
36
38enum NEORV32_SYSINFO_MEM_enum {
39 SYSINFO_MEM_IMEM = 0,
40 SYSINFO_MEM_DMEM = 1
41};
42
44enum NEORV32_SYSINFO_SOC_enum {
45 SYSINFO_SOC_BOOTLOADER = 0,
46 SYSINFO_SOC_XBUS = 1,
47 SYSINFO_SOC_MEM_INT_IMEM = 2,
48 SYSINFO_SOC_MEM_INT_DMEM = 3,
49 SYSINFO_SOC_OCD = 4,
50 SYSINFO_SOC_ICACHE = 5,
51 SYSINFO_SOC_DCACHE = 6,
52 SYSINFO_SOC_CLOCK_GATING = 7,
53 SYSINFO_SOC_XBUS_CACHE = 8,
54 SYSINFO_SOC_XIP = 9,
55 SYSINFO_SOC_XIP_CACHE = 10,
57 SYSINFO_SOC_IO_DMA = 14,
58 SYSINFO_SOC_IO_GPIO = 15,
59 SYSINFO_SOC_IO_MTIME = 16,
60 SYSINFO_SOC_IO_UART0 = 17,
61 SYSINFO_SOC_IO_SPI = 18,
62 SYSINFO_SOC_IO_TWI = 19,
63 SYSINFO_SOC_IO_PWM = 20,
64 SYSINFO_SOC_IO_WDT = 21,
65 SYSINFO_SOC_IO_CFS = 22,
66 SYSINFO_SOC_IO_TRNG = 23,
67 SYSINFO_SOC_IO_SDI = 24,
68 SYSINFO_SOC_IO_UART1 = 25,
69 SYSINFO_SOC_IO_NEOLED = 26,
70 SYSINFO_SOC_IO_XIRQ = 27,
71 SYSINFO_SOC_IO_GPTMR = 28,
72 SYSINFO_SOC_IO_SLINK = 29,
73 SYSINFO_SOC_IO_ONEWIRE = 30,
74 SYSINFO_SOC_IO_CRC = 31
75};
76
78 enum NEORV32_SYSINFO_CACHE_enum {
79 SYSINFO_CACHE_INST_BLOCK_SIZE_0 = 0,
80 SYSINFO_CACHE_INST_BLOCK_SIZE_3 = 3,
81 SYSINFO_CACHE_INST_NUM_BLOCKS_0 = 4,
82 SYSINFO_CACHE_INST_NUM_BLOCKS_3 = 7,
84 SYSINFO_CACHE_DATA_BLOCK_SIZE_0 = 8,
85 SYSINFO_CACHE_DATA_BLOCK_SIZE_3 = 11,
86 SYSINFO_CACHE_DATA_NUM_BLOCKS_0 = 12,
87 SYSINFO_CACHE_DATA_NUM_BLOCKS_3 = 15,
89 SYSINFO_CACHE_XIP_BLOCK_SIZE_0 = 16,
90 SYSINFO_CACHE_XIP_BLOCK_SIZE_3 = 19,
91 SYSINFO_CACHE_XIP_NUM_BLOCKS_0 = 20,
92 SYSINFO_CACHE_XIP_NUM_BLOCKS_3 = 23,
94 SYSINFO_CACHE_XBUS_BLOCK_SIZE_0 = 24,
95 SYSINFO_CACHE_XBUS_BLOCK_SIZE_3 = 27,
96 SYSINFO_CACHE_XBUS_NUM_BLOCKS_0 = 28,
97 SYSINFO_CACHE_XBUS_NUM_BLOCKS_3 = 31
98};
102#endif // neorv32_sysinfo_h
Definition neorv32_sysinfo.h:27
const uint32_t SOC
Definition neorv32_sysinfo.h:30
const uint32_t CACHE
Definition neorv32_sysinfo.h:31
const uint32_t CLK
Definition neorv32_sysinfo.h:28