-
Notifications
You must be signed in to change notification settings - Fork 11
/
RISCVEncoding.core_desc
481 lines (476 loc) · 20.9 KB
/
RISCVEncoding.core_desc
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
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
InstructionSet RISCVEncoding {
architectural_state {
const int RV_CSR_FFLAGS = 0x001;
const int RV_CSR_FRM = 0x002;
const int RV_CSR_FCSR = 0x003;
const int RV_CSR_UTVT = 0x007;
const int RV_CSR_VSTART = 0x008;
const int RV_CSR_VXSAT = 0x009;
const int RV_CSR_VXRM = 0x00A;
const int RV_CSR_VCSR = 0x00F;
const int RV_CSR_SEED = 0x015;
const int RV_CSR_UNXTI = 0x045;
const int RV_CSR_UINTSTATUS = 0x046;
const int RV_CSR_USCRATCHCSW = 0x048;
const int RV_CSR_USCRATCHCSWL = 0x049;
const int RV_CSR_SSTATUS = 0x100;
const int RV_CSR_SEDELEG = 0x102;
const int RV_CSR_SIDELEG = 0x103;
const int RV_CSR_SIE = 0x104;
const int RV_CSR_STVEC = 0x105;
const int RV_CSR_SCOUNTEREN = 0x106;
const int RV_CSR_STVT = 0x107;
const int RV_CSR_SENVCFG = 0x10A;
const int RV_CSR_SSTATEEN0 = 0x10C;
const int RV_CSR_SSTATEEN1 = 0x10D;
const int RV_CSR_SSTATEEN2 = 0x10E;
const int RV_CSR_SSTATEEN3 = 0x10F;
const int RV_CSR_SSCRATCH = 0x140;
const int RV_CSR_SEPC = 0x141;
const int RV_CSR_SCAUSE = 0x142;
const int RV_CSR_STVAL = 0x143;
const int RV_CSR_SIP = 0x144;
const int RV_CSR_SNXTI = 0x145;
const int RV_CSR_SINTSTATUS = 0x146;
const int RV_CSR_SSCRATCHCSW = 0x148;
const int RV_CSR_SSCRATCHCSWL = 0x149;
const int RV_CSR_STIMECMP = 0x14D;
const int RV_CSR_STIMECMPH = 0x15D;
const int RV_CSR_SATP = 0x180;
const int RV_CSR_VSSTATUS = 0x200;
const int RV_CSR_VSIE = 0x204;
const int RV_CSR_VSTVEC = 0x205;
const int RV_CSR_VSSCRATCH = 0x240;
const int RV_CSR_VSEPC = 0x241;
const int RV_CSR_VSCAUSE = 0x242;
const int RV_CSR_VSTVAL = 0x243;
const int RV_CSR_VSIP = 0x244;
const int RV_CSR_VSTIMECMP = 0x24D;
const int RV_CSR_VSTIMECMPH = 0x25D;
const int RV_CSR_VSATP = 0x280;
const int RV_CSR_MSTATUS = 0x300;
const int RV_CSR_MISA = 0x301;
const int RV_CSR_MEDELEG = 0x302;
const int RV_CSR_MIDELEG = 0x303;
const int RV_CSR_MIE = 0x304;
const int RV_CSR_MTVEC = 0x305;
const int RV_CSR_MCOUNTEREN = 0x306;
const int RV_CSR_MTVT = 0x307;
const int RV_CSR_MENVCFG = 0x30A;
const int RV_CSR_MSTATEEN0 = 0x30C;
const int RV_CSR_MSTATEEN1 = 0x30D;
const int RV_CSR_MSTATEEN2 = 0x30E;
const int RV_CSR_MSTATEEN3 = 0x30F;
const int RV_CSR_MSTATUSH = 0x310;
const int RV_CSR_MENVCFGH = 0x31A;
const int RV_CSR_MSTATEEN0H = 0x31C;
const int RV_CSR_MSTATEEN1H = 0x31D;
const int RV_CSR_MSTATEEN2H = 0x31E;
const int RV_CSR_MSTATEEN3H = 0x31F;
const int RV_CSR_MCOUNTINHIBIT = 0x320;
const int RV_CSR_MHPMEVENT3 = 0x323;
const int RV_CSR_MHPMEVENT4 = 0x324;
const int RV_CSR_MHPMEVENT5 = 0x325;
const int RV_CSR_MHPMEVENT6 = 0x326;
const int RV_CSR_MHPMEVENT7 = 0x327;
const int RV_CSR_MHPMEVENT8 = 0x328;
const int RV_CSR_MHPMEVENT9 = 0x329;
const int RV_CSR_MHPMEVENT10 = 0x32A;
const int RV_CSR_MHPMEVENT11 = 0x32B;
const int RV_CSR_MHPMEVENT12 = 0x32C;
const int RV_CSR_MHPMEVENT13 = 0x32D;
const int RV_CSR_MHPMEVENT14 = 0x32E;
const int RV_CSR_MHPMEVENT15 = 0x32F;
const int RV_CSR_MHPMEVENT16 = 0x330;
const int RV_CSR_MHPMEVENT17 = 0x331;
const int RV_CSR_MHPMEVENT18 = 0x332;
const int RV_CSR_MHPMEVENT19 = 0x333;
const int RV_CSR_MHPMEVENT20 = 0x334;
const int RV_CSR_MHPMEVENT21 = 0x335;
const int RV_CSR_MHPMEVENT22 = 0x336;
const int RV_CSR_MHPMEVENT23 = 0x337;
const int RV_CSR_MHPMEVENT24 = 0x338;
const int RV_CSR_MHPMEVENT25 = 0x339;
const int RV_CSR_MHPMEVENT26 = 0x33A;
const int RV_CSR_MHPMEVENT27 = 0x33B;
const int RV_CSR_MHPMEVENT28 = 0x33C;
const int RV_CSR_MHPMEVENT29 = 0x33D;
const int RV_CSR_MHPMEVENT30 = 0x33E;
const int RV_CSR_MHPMEVENT31 = 0x33F;
const int RV_CSR_MSCRATCH = 0x340;
const int RV_CSR_MEPC = 0x341;
const int RV_CSR_MCAUSE = 0x342;
const int RV_CSR_MTVAL = 0x343;
const int RV_CSR_MIP = 0x344;
const int RV_CSR_MNXTI = 0x345;
const int RV_CSR_MINTSTATUS = 0x346;
const int RV_CSR_MSCRATCHCSW = 0x348;
const int RV_CSR_MSCRATCHCSWL = 0x349;
const int RV_CSR_MTINST = 0x34A;
const int RV_CSR_MTVAL2 = 0x34B;
const int RV_CSR_PMPCFG0 = 0x3A0;
const int RV_CSR_PMPCFG1 = 0x3A1;
const int RV_CSR_PMPCFG2 = 0x3A2;
const int RV_CSR_PMPCFG3 = 0x3A3;
const int RV_CSR_PMPCFG4 = 0x3A4;
const int RV_CSR_PMPCFG5 = 0x3A5;
const int RV_CSR_PMPCFG6 = 0x3A6;
const int RV_CSR_PMPCFG7 = 0x3A7;
const int RV_CSR_PMPCFG8 = 0x3A8;
const int RV_CSR_PMPCFG9 = 0x3A9;
const int RV_CSR_PMPCFG10 = 0x3AA;
const int RV_CSR_PMPCFG11 = 0x3AB;
const int RV_CSR_PMPCFG12 = 0x3AC;
const int RV_CSR_PMPCFG13 = 0x3AD;
const int RV_CSR_PMPCFG14 = 0x3AE;
const int RV_CSR_PMPCFG15 = 0x3AF;
const int RV_CSR_PMPADDR0 = 0x3B0;
const int RV_CSR_PMPADDR1 = 0x3B1;
const int RV_CSR_PMPADDR2 = 0x3B2;
const int RV_CSR_PMPADDR3 = 0x3B3;
const int RV_CSR_PMPADDR4 = 0x3B4;
const int RV_CSR_PMPADDR5 = 0x3B5;
const int RV_CSR_PMPADDR6 = 0x3B6;
const int RV_CSR_PMPADDR7 = 0x3B7;
const int RV_CSR_PMPADDR8 = 0x3B8;
const int RV_CSR_PMPADDR9 = 0x3B9;
const int RV_CSR_PMPADDR10 = 0x3BA;
const int RV_CSR_PMPADDR11 = 0x3BB;
const int RV_CSR_PMPADDR12 = 0x3BC;
const int RV_CSR_PMPADDR13 = 0x3BD;
const int RV_CSR_PMPADDR14 = 0x3BE;
const int RV_CSR_PMPADDR15 = 0x3BF;
const int RV_CSR_PMPADDR16 = 0x3C0;
const int RV_CSR_PMPADDR17 = 0x3C1;
const int RV_CSR_PMPADDR18 = 0x3C2;
const int RV_CSR_PMPADDR19 = 0x3C3;
const int RV_CSR_PMPADDR20 = 0x3C4;
const int RV_CSR_PMPADDR21 = 0x3C5;
const int RV_CSR_PMPADDR22 = 0x3C6;
const int RV_CSR_PMPADDR23 = 0x3C7;
const int RV_CSR_PMPADDR24 = 0x3C8;
const int RV_CSR_PMPADDR25 = 0x3C9;
const int RV_CSR_PMPADDR26 = 0x3CA;
const int RV_CSR_PMPADDR27 = 0x3CB;
const int RV_CSR_PMPADDR28 = 0x3CC;
const int RV_CSR_PMPADDR29 = 0x3CD;
const int RV_CSR_PMPADDR30 = 0x3CE;
const int RV_CSR_PMPADDR31 = 0x3CF;
const int RV_CSR_PMPADDR32 = 0x3D0;
const int RV_CSR_PMPADDR33 = 0x3D1;
const int RV_CSR_PMPADDR34 = 0x3D2;
const int RV_CSR_PMPADDR35 = 0x3D3;
const int RV_CSR_PMPADDR36 = 0x3D4;
const int RV_CSR_PMPADDR37 = 0x3D5;
const int RV_CSR_PMPADDR38 = 0x3D6;
const int RV_CSR_PMPADDR39 = 0x3D7;
const int RV_CSR_PMPADDR40 = 0x3D8;
const int RV_CSR_PMPADDR41 = 0x3D9;
const int RV_CSR_PMPADDR42 = 0x3DA;
const int RV_CSR_PMPADDR43 = 0x3DB;
const int RV_CSR_PMPADDR44 = 0x3DC;
const int RV_CSR_PMPADDR45 = 0x3DD;
const int RV_CSR_PMPADDR46 = 0x3DE;
const int RV_CSR_PMPADDR47 = 0x3DF;
const int RV_CSR_PMPADDR48 = 0x3E0;
const int RV_CSR_PMPADDR49 = 0x3E1;
const int RV_CSR_PMPADDR50 = 0x3E2;
const int RV_CSR_PMPADDR51 = 0x3E3;
const int RV_CSR_PMPADDR52 = 0x3E4;
const int RV_CSR_PMPADDR53 = 0x3E5;
const int RV_CSR_PMPADDR54 = 0x3E6;
const int RV_CSR_PMPADDR55 = 0x3E7;
const int RV_CSR_PMPADDR56 = 0x3E8;
const int RV_CSR_PMPADDR57 = 0x3E9;
const int RV_CSR_PMPADDR58 = 0x3EA;
const int RV_CSR_PMPADDR59 = 0x3EB;
const int RV_CSR_PMPADDR60 = 0x3EC;
const int RV_CSR_PMPADDR61 = 0x3ED;
const int RV_CSR_PMPADDR62 = 0x3EE;
const int RV_CSR_PMPADDR63 = 0x3EF;
const int RV_CSR_SCONTEXT = 0x5A8;
const int RV_CSR_HSTATUS = 0x600;
const int RV_CSR_HEDELEG = 0x602;
const int RV_CSR_HIDELEG = 0x603;
const int RV_CSR_HIE = 0x604;
const int RV_CSR_HTIMEDELTA = 0x605;
const int RV_CSR_HCOUNTEREN = 0x606;
const int RV_CSR_HGEIE = 0x607;
const int RV_CSR_HENVCFG = 0x60A;
const int RV_CSR_HSTATEEN0 = 0x60C;
const int RV_CSR_HSTATEEN1 = 0x60D;
const int RV_CSR_HSTATEEN2 = 0x60E;
const int RV_CSR_HSTATEEN3 = 0x60F;
const int RV_CSR_HTIMEDELTAH = 0x615;
const int RV_CSR_HENVCFGH = 0x61A;
const int RV_CSR_HSTATEEN0H = 0x61C;
const int RV_CSR_HSTATEEN1H = 0x61D;
const int RV_CSR_HSTATEEN2H = 0x61E;
const int RV_CSR_HSTATEEN3H = 0x61F;
const int RV_CSR_HTVAL = 0x643;
const int RV_CSR_HIP = 0x644;
const int RV_CSR_HVIP = 0x645;
const int RV_CSR_HTINST = 0x64A;
const int RV_CSR_HGATP = 0x680;
const int RV_CSR_HCONTEXT = 0x6A8;
const int RV_CSR_MHPMEVENT3H = 0x723;
const int RV_CSR_MHPMEVENT4H = 0x724;
const int RV_CSR_MHPMEVENT5H = 0x725;
const int RV_CSR_MHPMEVENT6H = 0x726;
const int RV_CSR_MHPMEVENT7H = 0x727;
const int RV_CSR_MHPMEVENT8H = 0x728;
const int RV_CSR_MHPMEVENT9H = 0x729;
const int RV_CSR_MHPMEVENT10H = 0x72A;
const int RV_CSR_MHPMEVENT11H = 0x72B;
const int RV_CSR_MHPMEVENT12H = 0x72C;
const int RV_CSR_MHPMEVENT13H = 0x72D;
const int RV_CSR_MHPMEVENT14H = 0x72E;
const int RV_CSR_MHPMEVENT15H = 0x72F;
const int RV_CSR_MHPMEVENT16H = 0x730;
const int RV_CSR_MHPMEVENT17H = 0x731;
const int RV_CSR_MHPMEVENT18H = 0x732;
const int RV_CSR_MHPMEVENT19H = 0x733;
const int RV_CSR_MHPMEVENT20H = 0x734;
const int RV_CSR_MHPMEVENT21H = 0x735;
const int RV_CSR_MHPMEVENT22H = 0x736;
const int RV_CSR_MHPMEVENT23H = 0x737;
const int RV_CSR_MHPMEVENT24H = 0x738;
const int RV_CSR_MHPMEVENT25H = 0x739;
const int RV_CSR_MHPMEVENT26H = 0x73A;
const int RV_CSR_MHPMEVENT27H = 0x73B;
const int RV_CSR_MHPMEVENT28H = 0x73C;
const int RV_CSR_MHPMEVENT29H = 0x73D;
const int RV_CSR_MHPMEVENT30H = 0x73E;
const int RV_CSR_MHPMEVENT31H = 0x73F;
const int RV_CSR_MSECCFG = 0x747;
const int RV_CSR_MSECCFGH = 0x757;
const int RV_CSR_TSELECT = 0x7A0;
const int RV_CSR_TDATA1 = 0x7A1;
const int RV_CSR_TDATA2 = 0x7A2;
const int RV_CSR_TDATA3 = 0x7A3;
const int RV_CSR_TINFO = 0x7A4;
const int RV_CSR_TCONTROL = 0x7A5;
const int RV_CSR_MCONTEXT = 0x7A8;
const int RV_CSR_MSCONTEXT = 0x7AA;
const int RV_CSR_DCSR = 0x7B0;
const int RV_CSR_DPC = 0x7B1;
const int RV_CSR_DSCRATCH0 = 0x7B2;
const int RV_CSR_DSCRATCH1 = 0x7B3;
const int RV_CSR_MCYCLE = 0xB00;
const int RV_CSR_MINSTRET = 0xB02;
const int RV_CSR_MHPMCOUNTER3 = 0xB03;
const int RV_CSR_MHPMCOUNTER4 = 0xB04;
const int RV_CSR_MHPMCOUNTER5 = 0xB05;
const int RV_CSR_MHPMCOUNTER6 = 0xB06;
const int RV_CSR_MHPMCOUNTER7 = 0xB07;
const int RV_CSR_MHPMCOUNTER8 = 0xB08;
const int RV_CSR_MHPMCOUNTER9 = 0xB09;
const int RV_CSR_MHPMCOUNTER10 = 0xB0A;
const int RV_CSR_MHPMCOUNTER11 = 0xB0B;
const int RV_CSR_MHPMCOUNTER12 = 0xB0C;
const int RV_CSR_MHPMCOUNTER13 = 0xB0D;
const int RV_CSR_MHPMCOUNTER14 = 0xB0E;
const int RV_CSR_MHPMCOUNTER15 = 0xB0F;
const int RV_CSR_MHPMCOUNTER16 = 0xB10;
const int RV_CSR_MHPMCOUNTER17 = 0xB11;
const int RV_CSR_MHPMCOUNTER18 = 0xB12;
const int RV_CSR_MHPMCOUNTER19 = 0xB13;
const int RV_CSR_MHPMCOUNTER20 = 0xB14;
const int RV_CSR_MHPMCOUNTER21 = 0xB15;
const int RV_CSR_MHPMCOUNTER22 = 0xB16;
const int RV_CSR_MHPMCOUNTER23 = 0xB17;
const int RV_CSR_MHPMCOUNTER24 = 0xB18;
const int RV_CSR_MHPMCOUNTER25 = 0xB19;
const int RV_CSR_MHPMCOUNTER26 = 0xB1A;
const int RV_CSR_MHPMCOUNTER27 = 0xB1B;
const int RV_CSR_MHPMCOUNTER28 = 0xB1C;
const int RV_CSR_MHPMCOUNTER29 = 0xB1D;
const int RV_CSR_MHPMCOUNTER30 = 0xB1E;
const int RV_CSR_MHPMCOUNTER31 = 0xB1F;
const int RV_CSR_MCYCLEH = 0xB80;
const int RV_CSR_MINSTRETH = 0xB82;
const int RV_CSR_MHPMCOUNTER3H = 0xB83;
const int RV_CSR_MHPMCOUNTER4H = 0xB84;
const int RV_CSR_MHPMCOUNTER5H = 0xB85;
const int RV_CSR_MHPMCOUNTER6H = 0xB86;
const int RV_CSR_MHPMCOUNTER7H = 0xB87;
const int RV_CSR_MHPMCOUNTER8H = 0xB88;
const int RV_CSR_MHPMCOUNTER9H = 0xB89;
const int RV_CSR_MHPMCOUNTER10H = 0xB8A;
const int RV_CSR_MHPMCOUNTER11H = 0xB8B;
const int RV_CSR_MHPMCOUNTER12H = 0xB8C;
const int RV_CSR_MHPMCOUNTER13H = 0xB8D;
const int RV_CSR_MHPMCOUNTER14H = 0xB8E;
const int RV_CSR_MHPMCOUNTER15H = 0xB8F;
const int RV_CSR_MHPMCOUNTER16H = 0xB90;
const int RV_CSR_MHPMCOUNTER17H = 0xB91;
const int RV_CSR_MHPMCOUNTER18H = 0xB92;
const int RV_CSR_MHPMCOUNTER19H = 0xB93;
const int RV_CSR_MHPMCOUNTER20H = 0xB94;
const int RV_CSR_MHPMCOUNTER21H = 0xB95;
const int RV_CSR_MHPMCOUNTER22H = 0xB96;
const int RV_CSR_MHPMCOUNTER23H = 0xB97;
const int RV_CSR_MHPMCOUNTER24H = 0xB98;
const int RV_CSR_MHPMCOUNTER25H = 0xB99;
const int RV_CSR_MHPMCOUNTER26H = 0xB9A;
const int RV_CSR_MHPMCOUNTER27H = 0xB9B;
const int RV_CSR_MHPMCOUNTER28H = 0xB9C;
const int RV_CSR_MHPMCOUNTER29H = 0xB9D;
const int RV_CSR_MHPMCOUNTER30H = 0xB9E;
const int RV_CSR_MHPMCOUNTER31H = 0xB9F;
const int RV_CSR_CYCLE = 0xC00;
const int RV_CSR_TIME = 0xC01;
const int RV_CSR_INSTRET = 0xC02;
const int RV_CSR_HPMCOUNTER3 = 0xC03;
const int RV_CSR_HPMCOUNTER4 = 0xC04;
const int RV_CSR_HPMCOUNTER5 = 0xC05;
const int RV_CSR_HPMCOUNTER6 = 0xC06;
const int RV_CSR_HPMCOUNTER7 = 0xC07;
const int RV_CSR_HPMCOUNTER8 = 0xC08;
const int RV_CSR_HPMCOUNTER9 = 0xC09;
const int RV_CSR_HPMCOUNTER10 = 0xC0A;
const int RV_CSR_HPMCOUNTER11 = 0xC0B;
const int RV_CSR_HPMCOUNTER12 = 0xC0C;
const int RV_CSR_HPMCOUNTER13 = 0xC0D;
const int RV_CSR_HPMCOUNTER14 = 0xC0E;
const int RV_CSR_HPMCOUNTER15 = 0xC0F;
const int RV_CSR_HPMCOUNTER16 = 0xC10;
const int RV_CSR_HPMCOUNTER17 = 0xC11;
const int RV_CSR_HPMCOUNTER18 = 0xC12;
const int RV_CSR_HPMCOUNTER19 = 0xC13;
const int RV_CSR_HPMCOUNTER20 = 0xC14;
const int RV_CSR_HPMCOUNTER21 = 0xC15;
const int RV_CSR_HPMCOUNTER22 = 0xC16;
const int RV_CSR_HPMCOUNTER23 = 0xC17;
const int RV_CSR_HPMCOUNTER24 = 0xC18;
const int RV_CSR_HPMCOUNTER25 = 0xC19;
const int RV_CSR_HPMCOUNTER26 = 0xC1A;
const int RV_CSR_HPMCOUNTER27 = 0xC1B;
const int RV_CSR_HPMCOUNTER28 = 0xC1C;
const int RV_CSR_HPMCOUNTER29 = 0xC1D;
const int RV_CSR_HPMCOUNTER30 = 0xC1E;
const int RV_CSR_HPMCOUNTER31 = 0xC1F;
const int RV_CSR_VL = 0xC20;
const int RV_CSR_VTYPE = 0xC21;
const int RV_CSR_VLENB = 0xC22;
const int RV_CSR_CYCLEH = 0xC80;
const int RV_CSR_TIMEH = 0xC81;
const int RV_CSR_INSTRETH = 0xC82;
const int RV_CSR_HPMCOUNTER3H = 0xC83;
const int RV_CSR_HPMCOUNTER4H = 0xC84;
const int RV_CSR_HPMCOUNTER5H = 0xC85;
const int RV_CSR_HPMCOUNTER6H = 0xC86;
const int RV_CSR_HPMCOUNTER7H = 0xC87;
const int RV_CSR_HPMCOUNTER8H = 0xC88;
const int RV_CSR_HPMCOUNTER9H = 0xC89;
const int RV_CSR_HPMCOUNTER10H = 0xC8A;
const int RV_CSR_HPMCOUNTER11H = 0xC8B;
const int RV_CSR_HPMCOUNTER12H = 0xC8C;
const int RV_CSR_HPMCOUNTER13H = 0xC8D;
const int RV_CSR_HPMCOUNTER14H = 0xC8E;
const int RV_CSR_HPMCOUNTER15H = 0xC8F;
const int RV_CSR_HPMCOUNTER16H = 0xC90;
const int RV_CSR_HPMCOUNTER17H = 0xC91;
const int RV_CSR_HPMCOUNTER18H = 0xC92;
const int RV_CSR_HPMCOUNTER19H = 0xC93;
const int RV_CSR_HPMCOUNTER20H = 0xC94;
const int RV_CSR_HPMCOUNTER21H = 0xC95;
const int RV_CSR_HPMCOUNTER22H = 0xC96;
const int RV_CSR_HPMCOUNTER23H = 0xC97;
const int RV_CSR_HPMCOUNTER24H = 0xC98;
const int RV_CSR_HPMCOUNTER25H = 0xC99;
const int RV_CSR_HPMCOUNTER26H = 0xC9A;
const int RV_CSR_HPMCOUNTER27H = 0xC9B;
const int RV_CSR_HPMCOUNTER28H = 0xC9C;
const int RV_CSR_HPMCOUNTER29H = 0xC9D;
const int RV_CSR_HPMCOUNTER30H = 0xC9E;
const int RV_CSR_HPMCOUNTER31H = 0xC9F;
const int RV_CSR_SCOUNTOVF = 0xDA0;
const int RV_CSR_HGEIP = 0xE12;
const int RV_CSR_MVENDORID = 0xF11;
const int RV_CSR_MARCHID = 0xF12;
const int RV_CSR_MIMPID = 0xF13;
const int RV_CSR_MHARTID = 0xF14;
const int RV_CSR_MCONFIGPTR = 0xF15;
const int RV_CAUSE_MISALIGNED_FETCH = 0x00;
const int RV_CAUSE_FETCH_ACCESS = 0x01;
const int RV_CAUSE_ILLEGAL_INSTRUCTION = 0x02;
const int RV_CAUSE_BREAKPOINT = 0x03;
const int RV_CAUSE_MISALIGNED_LOAD = 0x04;
const int RV_CAUSE_LOAD_ACCESS = 0x05;
const int RV_CAUSE_MISALIGNED_STORE = 0x06;
const int RV_CAUSE_STORE_ACCESS = 0x07;
const int RV_CAUSE_USER_ECALL = 0x08;
const int RV_CAUSE_SUPERVISOR_ECALL = 0x09;
const int RV_CAUSE_VIRTUAL_SUPERVISOR_ECALL = 0x0A;
const int RV_CAUSE_MACHINE_ECALL = 0x0B;
const int RV_CAUSE_FETCH_PAGE_FAULT = 0x0C;
const int RV_CAUSE_LOAD_PAGE_FAULT = 0x0D;
const int RV_CAUSE_STORE_PAGE_FAULT = 0x0F;
const int RV_CAUSE_FETCH_GUEST_PAGE_FAULT = 0x14;
const int RV_CAUSE_LOAD_GUEST_PAGE_FAULT = 0x15;
const int RV_CAUSE_VIRTUAL_INSTRUCTION = 0x16;
const int RV_CAUSE_STORE_GUEST_PAGE_FAULT = 0x17;
const int RV_MSTATUS_UIE = 0x00000001;
const int RV_MSTATUS_SIE = 0x00000002;
const int RV_MSTATUS_HIE = 0x00000004;
const int RV_MSTATUS_MIE = 0x00000008;
const int RV_MSTATUS_UPIE = 0x00000010;
const int RV_MSTATUS_SPIE = 0x00000020;
const int RV_MSTATUS_UBE = 0x00000040;
const int RV_MSTATUS_MPIE = 0x00000080;
const int RV_MSTATUS_SPP = 0x00000100;
const int RV_MSTATUS_VS = 0x00000600;
const int RV_MSTATUS_MPP = 0x00001800;
const int RV_MSTATUS_FS = 0x00006000;
const int RV_MSTATUS_XS = 0x00018000;
const int RV_MSTATUS_MPRV = 0x00020000;
const int RV_MSTATUS_SUM = 0x00040000;
const int RV_MSTATUS_MXR = 0x00080000;
const int RV_MSTATUS_TVM = 0x00100000;
const int RV_MSTATUS_TW = 0x00200000;
const int RV_MSTATUS_TSR = 0x00400000;
const int RV_MSTATUS32_SD = 1<<31; //(0x80000000)
// commented as the validator does not handle it properly
// const int<64> RV_MSTATUS_UXL = 0x0000000300000000;
// const int<64> RV_MSTATUS_SXL = 0x0000000C00000000;
// const int<64> RV_MSTATUS_SBE = 0x0000001000000000;
// const int<64> RV_MSTATUS_MBE = 0x0000002000000000;
// const int<64> RV_MSTATUS_GVA = 0x0000004000000000;
// const int<64> RV_MSTATUS_MPV = 0x0000008000000000;
// const int<64> RV_MSTATUS64_SD = 0x8000000000000000;
const int RV_PRV_U = 0;
const int RV_PRV_S = 1;
const int RV_PRV_H = 2;
const int RV_PRV_M = 3;
const int RV_IRQ_U_SOFT = 0;
const int RV_IRQ_S_SOFT = 1;
const int RV_IRQ_VS_SOFT = 2;
const int RV_IRQ_M_SOFT = 3;
const int RV_IRQ_U_TIMER = 4;
const int RV_IRQ_S_TIMER = 5;
const int RV_IRQ_VS_TIMER = 6;
const int RV_IRQ_M_TIMER = 7;
const int RV_IRQ_U_EXT = 8;
const int RV_IRQ_S_EXT = 9;
const int RV_IRQ_VS_EXT = 10;
const int RV_IRQ_M_EXT = 11;
const int RV_IRQ_S_GEXT = 12;
const int RV_IRQ_COP = 12;
const int RV_IRQ_LCOF = 13;
const int RV_MIP_USIP = (1 << RV_IRQ_U_SOFT);
const int RV_MIP_SSIP = (1 << RV_IRQ_S_SOFT);
const int RV_MIP_VSSIP = (1 << RV_IRQ_VS_SOFT);
const int RV_MIP_MSIP = (1 << RV_IRQ_M_SOFT);
const int RV_MIP_UTIP = (1 << RV_IRQ_U_TIMER);
const int RV_MIP_STIP = (1 << RV_IRQ_S_TIMER);
const int RV_MIP_VSTIP = (1 << RV_IRQ_VS_TIMER);
const int RV_MIP_MTIP = (1 << RV_IRQ_M_TIMER);
const int RV_MIP_UEIP = (1 << RV_IRQ_U_EXT);
const int RV_MIP_SEIP = (1 << RV_IRQ_S_EXT);
const int RV_MIP_VSEIP = (1 << RV_IRQ_VS_EXT);
const int RV_MIP_MEIP = (1 << RV_IRQ_M_EXT);
const int RV_MIP_SGEIP = (1 << RV_IRQ_S_GEXT);
const int RV_MIP_LCOFIP = (1 << RV_IRQ_LCOF);
}
}