Skip to content

Commit

Permalink
[t1rocket] refactor mcycle in offline
Browse files Browse the repository at this point in the history
  • Loading branch information
Clo91eaf committed Aug 21, 2024
1 parent 87ab3a7 commit 3ad58d7
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions t1rocketemu/test_common/src/spike_runner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,6 @@ pub struct SpikeRunner {
/// implement the get_t() for mcycle csr update
pub cycle: u64,

/// for mcycle csr update
pub spike_cycle: u64,

pub do_log_vrf: bool,
}

Expand All @@ -64,7 +61,6 @@ impl SpikeRunner {
vlen: args.vlen,
dlen: args.dlen,
cycle: 0,
spike_cycle: 0,
do_log_vrf,
}
}
Expand Down Expand Up @@ -93,7 +89,7 @@ impl SpikeRunner {
let proc = self.spike.get_proc();
let state = proc.get_state();

let mcycle = (self.cycle + self.spike_cycle) as usize;
let mcycle = self.cycle as usize;
state.set_mcycle(0);

let mut event = SpikeEvent::new(spike, self.do_log_vrf);
Expand Down Expand Up @@ -123,8 +119,6 @@ impl SpikeRunner {

state.handle_pc(new_pc).unwrap();

self.spike_cycle += 1;

event
}

Expand Down

0 comments on commit 3ad58d7

Please sign in to comment.