API Reference
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 - 2026 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
14#ifndef NEORV32_CLINT_H
15#define NEORV32_CLINT_H
16
17#include <neorv32.h>
18#include <stdint.h>
19
20/**********************************************************************/
25typedef volatile struct __attribute__((packed,aligned(4))) {
26 uint32_t MSWI[4096];
27 subwords64_t MTIMECMP[4095];
30
32#define NEORV32_CLINT ((neorv32_clint_t*) (NEORV32_CLINT_BASE))
35/**********************************************************************/
40void neorv32_clint_msi_set(int hart);
41void neorv32_clint_msi_clr(int hart);
42uint32_t neorv32_clint_msi_get(int hart);
43void neorv32_clint_time_set(uint64_t time);
44uint64_t neorv32_clint_time_get(void);
45void neorv32_clint_mtimecmp_set(uint64_t timecmp);
46uint64_t neorv32_clint_mtimecmp_get(void);
47void neorv32_clint_unixtime_set(uint64_t unixtime);
48uint64_t neorv32_clint_unixtime_get(void);
51#endif // NEORV32_CLINT_H
Main NEORV32 core library / driver / HAL include file.
void neorv32_clint_mtimecmp_set(uint64_t timecmp)
Definition neorv32_clint.c:98
int neorv32_clint_available(void)
Definition neorv32_clint.c:20
void neorv32_clint_msi_set(int hart)
Definition neorv32_clint.c:29
void neorv32_clint_msi_clr(int hart)
Definition neorv32_clint.c:39
uint32_t neorv32_clint_msi_get(int hart)
Definition neorv32_clint.c:48
uint64_t neorv32_clint_unixtime_get(void)
Definition neorv32_clint.c:135
uint64_t neorv32_clint_time_get(void)
Definition neorv32_clint.c:74
void neorv32_clint_unixtime_set(uint64_t unixtime)
Definition neorv32_clint.c:126
uint64_t neorv32_clint_mtimecmp_get(void)
Definition neorv32_clint.c:116
void neorv32_clint_time_set(uint64_t time)
Definition neorv32_clint.c:58
Definition neorv32_clint.h:25
subwords64_t MTIME
Definition neorv32_clint.h:28
Definition neorv32.h:213