diff options
Diffstat (limited to 'riscv/triggers.h')
-rw-r--r-- | riscv/triggers.h | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/riscv/triggers.h b/riscv/triggers.h index b2a86f4..0ab4110 100644 --- a/riscv/triggers.h +++ b/riscv/triggers.h @@ -178,7 +178,7 @@ private: action_t action; }; -class mcontrol_t : public trigger_t { +class mcontrol_common_t : public trigger_t { public: typedef enum { @@ -190,9 +190,6 @@ public: MATCH_MASK_HIGH = MCONTROL_MATCH_MASK_HIGH } match_t; - virtual reg_t tdata1_read(const processor_t * const proc) const noexcept override; - virtual void tdata1_write(processor_t * const proc, const reg_t val, const bool allow_chain) noexcept override; - virtual bool get_dmode() const override { return dmode; } virtual bool get_chain() const override { return chain; } virtual bool get_execute() const override { return execute; } @@ -206,6 +203,7 @@ public: private: bool simple_match(unsigned xlen, reg_t value) const; +protected: bool dmode = false; action_t action = ACTION_DEBUG_EXCEPTION; bool hit = false; @@ -218,6 +216,12 @@ private: bool load = false; }; +class mcontrol_t : public mcontrol_common_t { +public: + virtual reg_t tdata1_read(const processor_t * const proc) const noexcept override; + virtual void tdata1_write(processor_t * const proc, const reg_t val, const bool allow_chain) noexcept override; +}; + class module_t { public: module_t(unsigned count); |