Skip to content

Commit

Permalink
[difftest] remove unused rev() dut to only one issue_idx in queue
Browse files Browse the repository at this point in the history
  • Loading branch information
Clo91eaf committed Jul 16, 2024
1 parent b3f2592 commit f6905a4
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions difftest/offline/src/json_events.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -210,7 +209,7 @@ impl JsonEventRunner for SpikeRunner {
let mut retire_issue: Option<u8> = 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?}",
Expand Down Expand Up @@ -333,7 +332,7 @@ impl JsonEventRunner for SpikeRunner {

let mut should_retire: Option<u8> = 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} ({})",
Expand Down

0 comments on commit f6905a4

Please sign in to comment.