1+ /*
2+
3+ Copyright (c) 2010 - 2026, Nordic Semiconductor ASA All rights reserved.
4+
5+ SPDX-License-Identifier: BSD-3-Clause
6+
7+ Redistribution and use in source and binary forms, with or without
8+ modification, are permitted provided that the following conditions are met:
9+
10+ 1. Redistributions of source code must retain the above copyright notice, this
11+ list of conditions and the following disclaimer.
12+
13+ 2. Redistributions in binary form must reproduce the above copyright
14+ notice, this list of conditions and the following disclaimer in the
15+ documentation and/or other materials provided with the distribution.
16+
17+ 3. Neither the name of Nordic Semiconductor ASA nor the names of its
18+ contributors may be used to endorse or promote products derived from this
19+ software without specific prior written permission.
20+
21+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
22+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23+ IMPLIED WARRANTIES OF MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE
24+ ARE DISCLAIMED. IN NO EVENT SHALL NORDIC SEMICONDUCTOR ASA OR CONTRIBUTORS BE
25+ LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
26+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
27+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
28+ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
29+ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
30+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
31+ POSSIBILITY OF SUCH DAMAGE.
32+
33+ */
34+
35+ #ifndef _CORE_VPR_H
36+ #define _CORE_VPR_H
37+
38+ #ifndef __ASSEMBLY__
39+ #include <stdint.h>
40+ #endif
41+
42+ #include "riscv_encoding.h"
43+
44+ #define __MTVT_PRESENT 1
45+
46+ /* =========================================================================================================================== */
47+ /* ================ CSR declaration ================ */
48+ /* =========================================================================================================================== */
49+
50+ #define CSR_MCYCLE 0xB00
51+ #define CSR_MINSTRET 0xB02
52+ #define CSR_MCYCLEH 0xB80
53+ #define CSR_MINSTRETH 0xB82
54+ #define CSR_MVENDORID 0xF11
55+ #define CSR_MARCHID 0xF12
56+ #define CSR_MIMPID 0xF13
57+ #define CSR_MHARTID 0xF14
58+ #define CSR_MSTATUS 0x300
59+ #define CSR_MISA 0x301
60+ #define CSR_MTVEC 0x305
61+ #define CSR_MTVT 0x307
62+ #define CSR_MSCRATCH 0x340
63+ #define CSR_MEPC 0x341
64+ #define CSR_MCAUSE 0x342
65+ #define CSR_MTVAL 0x343
66+ #define CSR_MINTSTATUS 0x346
67+ #define CSR_MCLICBASE 0x350
68+ #define CSR_DCSR 0x7b0
69+ #define CSR_DPC 0x7b1
70+ #define CSR_UCYCLE 0xc00
71+ #define CSR_UINSTRET 0xc02
72+ #define CSR_UCYCLEH 0xc80
73+ #define CSR_UINSTRETH 0xc82
74+
75+
76+ #define CSR_NORDIC_CTRL 0x7c0
77+ #define CSR_NORDIC_SLEEP 0x7c1
78+ #define CSR_NORDIC_DISFTR 0x7c2
79+ #define CSR_NORDIC_VIOPINS 0x7c3
80+
81+
82+ #define VTIM_CNTMODE0 0x7d0
83+ #define VTIM_CNTMODE1 0x7d1
84+ #define VTIM_CNT 0x7d2
85+ #define VTIM_CNTTOP 0x7d3
86+ #define VTIM_CNTADD 0x7d4
87+ #define VTIM_CNT0 0x7d5
88+ #define VTIM_CNTADD0 0x7d6
89+ #define VTIM_CNT1 0x7d7
90+ #define VTIM_CNTADD1 0x7d8
91+
92+
93+ #define CSR_NORDIC_TASKS 0x7e0
94+ #define CSR_NORDIC_SUBSCRIBE 0x7e1
95+ #define CSR_NORDIC_EVENTS 0x7e2
96+ #define CSR_NORDIC_PUBLISH 0x7e3
97+ #define CSR_NORDIC_INTEN 0x7e4
98+ #define CSR_NORDIC_EVENTSB 0x7e5
99+ #define CSR_NORDIC_EVENTSBS 0x7e6
100+
101+
102+ #endif /* _CORE_VPR_H */
0 commit comments