Skip to content

Commit

Permalink
[difftest] add rtl unexcepted quit check
Browse files Browse the repository at this point in the history
  • Loading branch information
Clo91eaf committed Jul 28, 2024
1 parent 1c188cb commit a1c2f4c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion difftest/offline/src/difftest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ impl Difftest {
JsonEvents::SimulationStop { reason, cycle } => {
info!("simulation stopped at cycle {}, reason {}", cycle, reason);
self.runner.cycle = *cycle;
Ok(())
Err(anyhow::anyhow!("quit: no more events"))
}
JsonEvents::Issue { idx, cycle } => {
self.runner.cycle = *cycle;
Expand Down
2 changes: 1 addition & 1 deletion difftest/offline/src/dut.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ impl Dut {
pub fn step(&mut self) -> anyhow::Result<&JsonEvents> {
let event = match self.events.get(self.idx as usize) {
Some(event) => event,
None => return Err(anyhow::anyhow!("no more events")),
None => return Err(anyhow::anyhow!("error: rtl quit unexpectedly")),
};
self.idx += 1;

Expand Down

0 comments on commit a1c2f4c

Please sign in to comment.