From: Andrew Waterman Date: Tue, 10 Sep 2013 09:07:08 +0000 (-0700) Subject: Don't tick HTIF as often X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=01dab8dbd6dbad38da740d963975b71bf524c39f;p=riscv-isa-sim.git Don't tick HTIF as often --- diff --git a/riscv/sim.cc b/riscv/sim.cc index 9ab61b6..f01e931 100644 --- a/riscv/sim.cc +++ b/riscv/sim.cc @@ -87,10 +87,6 @@ void sim_t::step(size_t n, bool noisy) { for (size_t i = 0, steps = 0; i < n; i += steps) { - htif->tick(); - if (!running()) - break; - steps = std::min(n - i, INTERLEAVE - current_step); procs[current_proc]->step(steps, noisy); @@ -101,6 +97,10 @@ void sim_t::step(size_t n, bool noisy) procs[current_proc]->yield_load_reservation(); if (++current_proc == procs.size()) current_proc = 0; + + htif->tick(); + if (!running()) + break; } } }