Skip to content

Commit

Permalink
Stop pipeline "run" execution when pipeline signals finished #31
Browse files Browse the repository at this point in the history
Run execution would not check for ecall::exit within the pipeline, and thus
would only stop when there were no more instructions to fetch and execute.
While execution is correct, this results in a bug where a discrepancy
between the cycles and instructions executed between stepping through the
program and running through the program, were different.
  • Loading branch information
mortbopet committed Mar 31, 2019
1 parent 4764aa1 commit afd5a42
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/rundialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,12 @@ void RunDialog::finished() {
if (ecall_val.first != Pipeline::ECALL::none) {
// An ECALL has been invoked during continuous running. Handle ecall and continue to run
m_processorTab->handleEcall(ecall_val);
m_runWatcher.setFuture(startSimulation());
// Check whether to stop the pipeline given an ecall::exit instruction
if (!(Pipeline::getPipeline()->isFinished() || ecall_val.first == Pipeline::ECALL::exit)) {
m_runWatcher.setFuture(startSimulation());
} else {
accept();
}
}
}
}
Expand Down

0 comments on commit afd5a42

Please sign in to comment.