File tree Expand file tree Collapse file tree 2 files changed +19
-4
lines changed Expand file tree Collapse file tree 2 files changed +19
-4
lines changed Original file line number Diff line number Diff line change @@ -14,9 +14,16 @@ access:
1414encoding :
1515 match : " 00110000001000000000000001110011"
1616operation() : |
17- if (implemented?(ExtensionName::S) && CSR[mstatus].MPP != 2'b11) {
17+ if (CSR[mstatus].MPP != 2'b11) {
1818 CSR[mstatus].MPRV = 0;
1919 }
20+ if (implemented?(ExtensionName::Smdbltrp)) {
21+ if (xlen() == 64) {
22+ CSR[mstatus].MDT = 1'b0;
23+ } else {
24+ CSR[mstatush].MDT = 1'b0;
25+ }
26+ }
2027 CSR[mstatus].MIE = CSR[mstatus].MPIE;
2128 CSR[mstatus].MPIE = 1;
2229 if (CSR[mstatus].MPP == 2'b00) {
Original file line number Diff line number Diff line change 33$schema : inst_schema.json#
44kind : instruction
55name : mnret
6- long_name : No synopsis available.
6+ long_name : Machine NMI Return
77description : |
8- No description available .
8+ Returns from an NMI in M-mode .
99definedBy : Smrnmi
1010assembly : mnret
1111encoding :
@@ -18,9 +18,17 @@ access:
1818 vu : always
1919data_independent_timing : false
2020operation() : |
21- if (implemented?(ExtensionName::S) && CSR[mstatus].MPP != 2'b11) {
21+ if (CSR[mnstatus].MNPP != 2'b11) {
2222 CSR[mstatus].MPRV = 0;
23+ if (implemented?(ExtensionName::Smdbltrp)) {
24+ if (xlen() == 64) {
25+ CSR[mstatus].MDT = 1'b0;
26+ } else {
27+ CSR[mstatush].MDT = 1'b0;
28+ }
29+ }
2330 }
31+ CSR[mnstatus].NMIE = 1'b1;
2432 if (CSR[mnstatus].MNPP == 2'b00) {
2533 set_mode(PrivilegeMode::U);
2634 } else if (CSR[mnstatus].MNPP == 2'b01) {
You can’t perform that action at this time.
0 commit comments