Skip to content

Commit

Permalink
[tests] remove mcycle dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
Clo91eaf committed Aug 24, 2024
1 parent 747038a commit 4c6dbfe
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 1 deletion.
2 changes: 1 addition & 1 deletion t1rocketemu/test_common/src/spike_runner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ impl SpikeRunner {
let state = proc.get_state();

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

let mut event = SpikeEvent::new(spike, self.do_log_vrf);
state.clear();
Expand Down
2 changes: 2 additions & 0 deletions tests/asm/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ let

src = sourcePath;

patches = [ ./mcycle.patch ];

passthru.featuresRequired = getTestRequiredFeatures sourcePath;
isFp = lib.pathExists (lib.path.append sourcePath "isFp");

Expand Down
14 changes: 14 additions & 0 deletions tests/asm/mcycle.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
diff --git a/smoke.S b/smoke.S
index 57e517f8..7c458acf 100644
--- a/smoke.S
+++ b/smoke.S
@@ -27,9 +27,6 @@ loop:
addi a2, a2, -1
bnez a2, add_test

- # read cycles
- csrr t0, mcycle
-
ret

will_not_be_executed:

0 comments on commit 4c6dbfe

Please sign in to comment.