Skip to content

Commit

Permalink
refactor: Merge halt and halt_on_reset variables in processor_t
Browse files Browse the repository at this point in the history
  • Loading branch information
YenHaoChen committed Sep 27, 2024
1 parent 871d945 commit 5c814c7
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 5 deletions.
4 changes: 2 additions & 2 deletions riscv/execute.cc
Original file line number Diff line number Diff line change
Expand Up @@ -216,8 +216,8 @@ void processor_t::step(size_t n)
enter_debug_mode(DCSR_CAUSE_DEBUGINT, 0);
} else if (halt_request == HR_GROUP) {
enter_debug_mode(DCSR_CAUSE_GROUP, 0);
} else if (halt) {
halt = false;
} else if (halt_on_reset) {
halt_on_reset = false;
enter_debug_mode(DCSR_CAUSE_HALT, 0);
}
}
Expand Down
2 changes: 0 additions & 2 deletions riscv/processor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -186,8 +186,6 @@ void processor_t::reset()
{
xlen = isa.get_max_xlen();
state.reset(this, isa.get_max_isa());
halt = halt_on_reset;
halt_on_reset = false;
if (any_vector_extensions())
VU.reset();
in_wfi = false;
Expand Down
1 change: 0 additions & 1 deletion riscv/processor.h
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,6 @@ class processor_t : public abstract_device_t
FILE *log_file;
std::ostream sout_; // needed for socket command interface -s, also used for -d and -l, but not for --log
bool halt_on_reset;
bool halt;
bool in_wfi;
bool check_triggers_icount;
std::vector<bool> impl_table;
Expand Down

0 comments on commit 5c814c7

Please sign in to comment.