Skip to content

Commit

Permalink
triggers: mcontrol: refactor: Add mcontrol_t::maskmax
Browse files Browse the repository at this point in the history
  • Loading branch information
YenHaoChen committed Aug 27, 2024
1 parent 1b80449 commit d13dc0b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion riscv/triggers.cc
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ reg_t mcontrol_t::tdata1_read(const processor_t * const proc) const noexcept {
auto xlen = proc->get_xlen();
v = set_field(v, MCONTROL_TYPE(xlen), CSR_TDATA1_TYPE_MCONTROL);
v = set_field(v, CSR_MCONTROL_DMODE(xlen), dmode);
v = set_field(v, MCONTROL_MASKMAX(xlen), 0);
v = set_field(v, MCONTROL_MASKMAX(xlen), maskmax);
v = set_field(v, CSR_MCONTROL_HIT, hit);
v = set_field(v, MCONTROL_SELECT, select);
v = set_field(v, MCONTROL_TIMING, timing);
Expand Down
1 change: 1 addition & 0 deletions riscv/triggers.h
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,7 @@ class mcontrol_t : public mcontrol_common_t {

private:
bool hit = false;
const reg_t maskmax = 0;
};

class mcontrol6_t : public mcontrol_common_t {
Expand Down

0 comments on commit d13dc0b

Please sign in to comment.