forked from michaeljclark/riscv-meta
-
Notifications
You must be signed in to change notification settings - Fork 0
/
enums
131 lines (116 loc) · 9.9 KB
/
enums
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
# format of a line in this file:
# <enum group> <enum name> <enum value> "<enum description>" <version>
# Types
type none 0 "None" 1.7-
type arg 1 "Argument" 1.7-
type creg 2 "Compressed Register" 1.7-
type ireg 3 "Integer Register" 1.7-
type freg 4 "Floating Point Register" 1.7-
type offset 5 "Signed Offset" 1.7-
type simm 6 "Sign Extended Immediate" 1.7-
type uimm 7 "Zero Extended Immediate" 1.7-
# Round Mode
rm rne 0b000 "Round to Nearest, ties to Even" 1.7-
rm rtz 0b001 "Round towards Zero" 1.7-
rm rdn 0b010 "Round Down (towards -∞)" 1.7-
rm rup 0b011 "Round Up (towards +∞)" 1.7-
rm rmm 0b100 "Round to Nearest, ties to Max Magnitude" 1.7-
rm dyn 0b111 "Dynamic Rounding Mode" 1.7-
# Memory order (AMO aqrl argument)
aqrl relaxed 0 "Atomicity - no explicit ordering" 1.7-
aqrl acquire 2 "Acquire - prior writes from other harts visible" 1.7-
aqrl release 1 "Release - subsequent reads visible to other harts" 1.7-
aqrl acq_rel 3 "Acquire-Release - global order of reads and writes" 1.7-
# Fence (pred and succ values)
fence i 8 "Input" 1.7-
fence o 4 "Output" 1.7-
fence r 2 "Read" 1.7-
fence w 1 "Write" 1.7-
# Floating Point Exception Register (fcsr)
fcsr NX 1 "Inexact" 1.7-
fcsr UF 2 "Underflow" 1.7-
fcsr OF 4 "Overflow" 1.7-
fcsr DZ 8 "Divide by Zero" 1.7-
fcsr NV 16 "Invalid Operation" 1.7-
# Floating Point types returned by fclass
fclass neg_inf 1 "negative infinity" 1.7-
fclass neg_norm 2 "negative normal number" 1.7-
fclass neg_subnorm 4 "negative subnormal number" 1.7-
fclass neg_zero 8 "negative zero" 1.7-
fclass pos_zero 16 "positive zero" 1.7-
fclass pos_subnorm 32 "positive subnormal number" 1.7-
fclass pos_norm 64 "positive normal number" 1.7-
fclass pos_inf 128 "positive infinity" 1.7-
fclass signaling_nan 256 "signaling NaN" 1.7-
fclass quiet_nan 512 "quiet NaN" 1.7-
# FPU Status (mstatus.fs)
fs off 0 "Off" 1.7-
fs initial 1 "Initial" 1.7-
fs clean 2 "Clean" 1.7-
fs dirty 3 "Dirty" 1.7-
# Extension Status (mstatus.xs)
xs all 0 "All off" 1.7-
xs initial 1 "None dirty or clean, some on" 1.7-
xs clean 2 "None dirty, some clean" 1.7-
xs dirty 3 "Some dirty" 1.7-
# Base ISA field (misa)
isa rv32 1 "RV32" 1.7-
isa rv64 2 "RV64" 1.7-
isa rv128 3 "RV128" 1.7-
# ISA Extensions (misa)
ext I 256 "RV32I/64I/128I Base ISA" 1.7-
ext M 4096 "Integer Multiply/Divide extension" 1.7-
ext A 1 "Atomic Extension" 1.7-
ext F 32 "Single-precision foating-point extension" 1.7-
ext D 8 "Double-precision foating-point extension" 1.7-
ext C 4 "Compressed extension" 1.7-
# Privilege mode
mode U 0 "User mode" 1.7-
mode S 1 "Supervisor mode" 1.7-
mode H 2 "Hypervisor mode" 1.7-
mode M 3 "Machine mode" 1.7-
# Virtualization Management field (mstatus.vm)
vm mbare 0 "No translation or protection" 1.7-1.9.1
vm mbb 1 "Single base-and-bound" 1.7-1.9.1
vm mbid 2 "Separate instruction and data base-and-bound" 1.7-1.9.1
vm sv32 8 "Page-based 32-bit virtual addressing" 1.7-1.9.1
vm sv39 9 "Page-based 39-bit virtual addressing" 1.7-1.9.1
vm sv48 10 "Page-based 48-bit virtual addressing" 1.7-1.9.1
vm sv57 11 "Reserved for page-based 48-bit virtual addressing" 1.7-1.9.1
vm sv64 12 "Reserved for page-based 48-bit virtual addressing" 1.7-1.9.1
# Virtualization Management field (satp.vm)
svm mbare 0 "No translation or protection" 1.10
svm sv32 1 "Page-based 32-bit virtual addressing" 1.10,rv32
svm sv39 8 "Page-based 39-bit virtual addressing" 1.10,rv64
svm sv48 9 "Page-based 48-bit virtual addressing" 1.10,rv64
svm sv57 10 "Reserved for page-based 48-bit virtual addressing" 1.10,rv64
svm sv64 11 "Reserved for page-based 48-bit virtual addressing" 1.10,rv64
# Machine Cause Register faults (mcause), interrupt bit clear
cause misaligned_fetch 0 "Instruction address misaligned" 1.7-
cause fault_fetch 1 "Instruction access fault" 1.7-
cause illegal_instruction 2 "Illegal instruction" 1.7-
cause breakpoint 3 "Breakpoint" 1.7-
cause misaligned_load 4 "Load address misaligned" 1.7-
cause fault_load 5 "Load access fault" 1.7-
cause misaligned_store 6 "Store/AMO address misaligned" 1.7-
cause fault_store 7 "Store/AMO access fault" 1.7-
cause user_ecall 8 "Environment call from U-mode" 1.7-
cause supervisor_ecall 9 "Environment call from S-mode" 1.7-
cause hypervisor_ecall 10 "Environment call from H-mode" 1.7-1.9.1
cause machine_ecall 11 "Environment call from M-mode" 1.7-
cause exec_page_fault 12 "Instruction page fault" 1.10-
cause load_page_fault 13 "Load page fault" 1.10-
cause store_page_fault 15 "Store/AMO page fault" 1.10-
# Machine Cause Register interrupts (mcause) interrupt bit set
intr u_software 0 "User software interrupt" 1.7-
intr s_software 1 "Supervisor software interrupt" 1.7-
intr h_software 2 "Hypervisor software interrupt" 1.7-1.9.1
intr m_software 3 "Machine software interrupt" 1.7-1.9.1
intr u_timer 4 "User timer interrupt" 1.7-
intr s_timer 5 "Supervisor timer interrupt" 1.7-
intr h_timer 6 "Hypervisor timer interrupt" 1.7-1.9.1
intr m_timer 7 "Machine timer interrupt" 1.7-1.9.1
intr u_external 8 "User external interrupt" 1.7-
intr s_external 9 "Supervisor external interrupt" 1.7-
intr h_external 10 "Hypervisor external interrupt" 1.7-1.9.1
intr m_external 11 "Machine external interrupt" 1.7-1.9.1