From f6905a41f539febdc2a7400d69bf21b09a25901d Mon Sep 17 00:00:00 2001 From: Clo91eaf Date: Tue, 16 Jul 2024 13:23:39 +0800 Subject: [PATCH] [difftest] remove unused rev() dut to only one issue_idx in queue --- difftest/offline/src/json_events.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/difftest/offline/src/json_events.rs b/difftest/offline/src/json_events.rs index 73c3aff2b..3f6e49b39 100644 --- a/difftest/offline/src/json_events.rs +++ b/difftest/offline/src/json_events.rs @@ -187,7 +187,6 @@ impl JsonEventRunner for SpikeRunner { if let Some(se) = self .commit_queue .iter_mut() - .rev() .find(|se| (se.is_load() || se.is_store()) && se.lsu_idx == LSU_IDX_DEFAULT) { let index = enq.trailing_zeros() as u8; @@ -210,7 +209,7 @@ impl JsonEventRunner for SpikeRunner { let mut retire_issue: Option = None; if let Some(se) = - self.commit_queue.iter_mut().rev().find(|se| se.issue_idx == vrf_write.issue_idx) + self.commit_queue.iter_mut().find(|se| se.issue_idx == vrf_write.issue_idx) { debug!( "[{}] VrfWrite: lane={}, vd={}, idx_base={}, issue_idx={}, offset={}, mask={}, data={:x?}", @@ -333,7 +332,7 @@ impl JsonEventRunner for SpikeRunner { let mut should_retire: Option = None; - if let Some(se) = self.commit_queue.iter_mut().rev().find(|se| se.issue_idx == issue_idx) { + if let Some(se) = self.commit_queue.iter_mut().find(|se| se.issue_idx == issue_idx) { assert!( se.vrf_access_record.retired_writes <= count, "[{cycle}] retired_writes({}) should be less than count({count}), issue_idx={issue_idx} ({})",