Skip to content

Commit 5caf7f1

Browse files
committed
Add Smdbltrp
1 parent 9143106 commit 5caf7f1

File tree

4 files changed

+10
-3
lines changed

4 files changed

+10
-3
lines changed

riscv/csrs.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -684,7 +684,7 @@ class dcsr_csr_t: public csr_t {
684684
dcsr_csr_t(processor_t* const proc, const reg_t addr);
685685
virtual void verify_permissions(insn_t insn, bool write) const override;
686686
virtual reg_t read() const noexcept override;
687-
void update_fields(const uint8_t cause, const reg_t prv,
687+
void update_fields(const uint8_t cause, const uint8_t ext_cause, const reg_t prv,
688688
const bool v, const elp_t pelp) noexcept;
689689
protected:
690690
virtual bool unlogged_write(const reg_t val) noexcept override;
@@ -699,6 +699,8 @@ class dcsr_csr_t: public csr_t {
699699
bool halt;
700700
bool v;
701701
uint8_t cause;
702+
uint8_t ext_cause;
703+
bool cetrig;
702704
elp_t pelp;
703705
};
704706

riscv/encoding.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
/*
66
* This file is auto-generated by running 'make' in
7-
* https://github.com/riscv/riscv-opcodes (c55d30f)
7+
* https://github.com/riscv/riscv-opcodes (23a394b)
88
*/
99

1010
#ifndef RISCV_CSR_ENCODING_H
@@ -110,6 +110,9 @@
110110
#define DCSR_CAUSE_STEP 4
111111
#define DCSR_CAUSE_HALT 5
112112
#define DCSR_CAUSE_GROUP 6
113+
#define DCSR_CAUSE_EXTCAUSE 7
114+
115+
#define DCSR_EXTCAUSE_CRITERR 0
113116

114117
#define MCONTROL_TYPE(xlen) (0xfULL<<((xlen)-4))
115118
#define MCONTROL_DMODE(xlen) (1ULL<<((xlen)-5))

riscv/isa_parser.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ typedef enum {
8181
EXT_SSQOSID,
8282
EXT_ZICFILP,
8383
EXT_ZICFISS,
84+
EXT_SMDBLTRP,
8485
NUM_ISA_EXTENSIONS
8586
} isa_extension_t;
8687

riscv/processor.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,7 @@ struct state_t
189189
int last_inst_flen;
190190

191191
elp_t elp;
192+
bool critical_error;
192193
};
193194

194195
class opcode_cache_entry_t {
@@ -401,7 +402,7 @@ class processor_t : public abstract_device_t
401402
void register_insn(insn_desc_t, bool);
402403
int paddr_bits();
403404

404-
void enter_debug_mode(uint8_t cause);
405+
void enter_debug_mode(uint8_t cause, uint8_t ext_cause);
405406

406407
void debug_output_log(std::stringstream *s); // either output to interactive user or write to log file
407408

0 commit comments

Comments
 (0)