NEORV32 Software Framework Documentation
The NEORV32 RISC-V Processor
Loading...
Searching...
No Matches
neorv32_clint.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_clint_h
17#define neorv32_clint_h
18
19#include <stdint.h>
20
21
22/**********************************************************************/
27typedef volatile struct __attribute__((packed,aligned(4))) {
28 uint32_t MSWI[4096];
29 subwords64_t MTIMECMP[4095];
32
34#define NEORV32_CLINT ((neorv32_clint_t*) (NEORV32_CLINT_BASE))
38/**********************************************************************/
43void neorv32_clint_msi_set(int hart);
44void neorv32_clint_msi_clr(int hart);
45uint32_t neorv32_clint_msi_get(int hart);
46void neorv32_clint_time_set(uint64_t time);
47uint64_t neorv32_clint_time_get(void);
48void neorv32_clint_mtimecmp_set(uint64_t timecmp);
49uint64_t neorv32_clint_mtimecmp_get(void);
50void neorv32_clint_unixtime_set(uint64_t unixtime);
51uint64_t neorv32_clint_unixtime_get(void);
54#endif // neorv32_clint_h
void neorv32_clint_mtimecmp_set(uint64_t timecmp)
Definition neorv32_clint.c:121
int neorv32_clint_available(void)
Definition neorv32_clint.c:24
void neorv32_clint_msi_set(int hart)
Definition neorv32_clint.c:40
void neorv32_clint_msi_clr(int hart)
Definition neorv32_clint.c:51
uint32_t neorv32_clint_msi_get(int hart)
Definition neorv32_clint.c:62
uint64_t neorv32_clint_unixtime_get(void)
Definition neorv32_clint.c:165
uint64_t neorv32_clint_time_get(void)
Definition neorv32_clint.c:94
void neorv32_clint_unixtime_set(uint64_t unixtime)
Definition neorv32_clint.c:154
uint64_t neorv32_clint_mtimecmp_get(void)
Definition neorv32_clint.c:142
void neorv32_clint_time_set(uint64_t time)
Definition neorv32_clint.c:75
Definition neorv32_clint.h:27
subwords64_t MTIME
Definition neorv32_clint.h:30
Definition neorv32.h:226