NEORV32 Software Framework Documentation
The NEORV32 RISC-V Processor
Loading...
Searching...
No Matches
neorv32_sysinfo.h
Go to the documentation of this file.
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 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
44
80
106/**********************************************************************/
110uint32_t neorv32_sysinfo_get_clk(void);
111void neorv32_sysinfo_set_clk(uint32_t clock);
115#endif // neorv32_sysinfo_h
uint32_t neorv32_sysinfo_get_clk(void)
Definition neorv32_sysinfo.c:24
NEORV32_SYSINFO_CACHE_enum
Definition neorv32_sysinfo.h:82
@ SYSINFO_CACHE_INST_NUM_BLOCKS_3
Definition neorv32_sysinfo.h:86
@ SYSINFO_CACHE_INST_BLOCK_SIZE_0
Definition neorv32_sysinfo.h:83
@ SYSINFO_CACHE_XBUS_BLOCK_SIZE_0
Definition neorv32_sysinfo.h:98
@ SYSINFO_CACHE_XIP_BLOCK_SIZE_3
Definition neorv32_sysinfo.h:94
@ SYSINFO_CACHE_DATA_NUM_BLOCKS_3
Definition neorv32_sysinfo.h:91
@ SYSINFO_CACHE_XBUS_NUM_BLOCKS_0
Definition neorv32_sysinfo.h:100
@ SYSINFO_CACHE_DATA_BLOCK_SIZE_0
Definition neorv32_sysinfo.h:88
@ SYSINFO_CACHE_XBUS_BLOCK_SIZE_3
Definition neorv32_sysinfo.h:99
@ SYSINFO_CACHE_XIP_NUM_BLOCKS_0
Definition neorv32_sysinfo.h:95
@ SYSINFO_CACHE_DATA_BLOCK_SIZE_3
Definition neorv32_sysinfo.h:89
@ SYSINFO_CACHE_DATA_NUM_BLOCKS_0
Definition neorv32_sysinfo.h:90
@ SYSINFO_CACHE_INST_NUM_BLOCKS_0
Definition neorv32_sysinfo.h:85
@ SYSINFO_CACHE_XBUS_NUM_BLOCKS_3
Definition neorv32_sysinfo.h:101
@ SYSINFO_CACHE_XIP_BLOCK_SIZE_0
Definition neorv32_sysinfo.h:93
@ SYSINFO_CACHE_INST_BLOCK_SIZE_3
Definition neorv32_sysinfo.h:84
@ SYSINFO_CACHE_XIP_NUM_BLOCKS_3
Definition neorv32_sysinfo.h:96
void neorv32_sysinfo_set_clk(uint32_t clock)
Definition neorv32_sysinfo.c:35
NEORV32_SYSINFO_SOC_enum
Definition neorv32_sysinfo.h:46
@ SYSINFO_SOC_ICACHE
Definition neorv32_sysinfo.h:52
@ SYSINFO_SOC_OCD_AUTH
Definition neorv32_sysinfo.h:58
@ SYSINFO_SOC_IO_NEOLED
Definition neorv32_sysinfo.h:73
@ SYSINFO_SOC_IO_TWI
Definition neorv32_sysinfo.h:66
@ SYSINFO_SOC_MEM_INT_IMEM
Definition neorv32_sysinfo.h:49
@ SYSINFO_SOC_IO_UART0
Definition neorv32_sysinfo.h:64
@ SYSINFO_SOC_IO_DMA
Definition neorv32_sysinfo.h:61
@ SYSINFO_SOC_IO_SLINK
Definition neorv32_sysinfo.h:76
@ SYSINFO_SOC_CLOCK_GATING
Definition neorv32_sysinfo.h:54
@ SYSINFO_SOC_OCD
Definition neorv32_sysinfo.h:51
@ SYSINFO_SOC_IO_TRNG
Definition neorv32_sysinfo.h:70
@ SYSINFO_SOC_IO_GPTMR
Definition neorv32_sysinfo.h:75
@ SYSINFO_SOC_IO_SPI
Definition neorv32_sysinfo.h:65
@ SYSINFO_SOC_XIP
Definition neorv32_sysinfo.h:56
@ SYSINFO_SOC_IO_UART1
Definition neorv32_sysinfo.h:72
@ SYSINFO_SOC_IO_MTIME
Definition neorv32_sysinfo.h:63
@ SYSINFO_SOC_XBUS_CACHE
Definition neorv32_sysinfo.h:55
@ SYSINFO_SOC_MEM_INT_DMEM
Definition neorv32_sysinfo.h:50
@ SYSINFO_SOC_IO_GPIO
Definition neorv32_sysinfo.h:62
@ SYSINFO_SOC_BOOTLOADER
Definition neorv32_sysinfo.h:47
@ SYSINFO_SOC_IO_SDI
Definition neorv32_sysinfo.h:71
@ SYSINFO_SOC_IO_PWM
Definition neorv32_sysinfo.h:67
@ SYSINFO_SOC_DCACHE
Definition neorv32_sysinfo.h:53
@ SYSINFO_SOC_IO_ONEWIRE
Definition neorv32_sysinfo.h:77
@ SYSINFO_SOC_IMEM_ROM
Definition neorv32_sysinfo.h:59
@ SYSINFO_SOC_IO_CRC
Definition neorv32_sysinfo.h:78
@ SYSINFO_SOC_XIP_CACHE
Definition neorv32_sysinfo.h:57
@ SYSINFO_SOC_IO_XIRQ
Definition neorv32_sysinfo.h:74
@ SYSINFO_SOC_XBUS
Definition neorv32_sysinfo.h:48
@ SYSINFO_SOC_IO_CFS
Definition neorv32_sysinfo.h:69
@ SYSINFO_SOC_IO_WDT
Definition neorv32_sysinfo.h:68
NEORV32_SYSINFO_MEM_enum
Definition neorv32_sysinfo.h:38
@ SYSINFO_MEM_BOOT
Definition neorv32_sysinfo.h:42
@ SYSINFO_MEM_res
Definition neorv32_sysinfo.h:41
@ SYSINFO_MEM_IMEM
Definition neorv32_sysinfo.h:39
@ SYSINFO_MEM_DMEM
Definition neorv32_sysinfo.h:40
Definition neorv32_sysinfo.h:27
uint32_t CLK
Definition neorv32_sysinfo.h:28
const uint32_t SOC
Definition neorv32_sysinfo.h:30
const uint32_t CACHE
Definition neorv32_sysinfo.h:31