diff options
author | Nilay Vaish <nilay@cs.wisc.edu> | 2014-02-20 17:28:01 -0600 |
---|---|---|
committer | Nilay Vaish <nilay@cs.wisc.edu> | 2014-02-20 17:28:01 -0600 |
commit | f8f8b7e5c2382dac32a8109c56f1aaad7e6a5fd7 (patch) | |
tree | ebc3d4f4de1ff44452ff1d2a9040cd28c532977f /src/mem/ruby/network/garnet/fixed-pipeline/Switch_d.cc | |
parent | 896654746adeebc264150692a9dda4e3fa48a6a3 (diff) | |
download | gem5-f8f8b7e5c2382dac32a8109c56f1aaad7e6a5fd7.tar.xz |
ruby: network: garnet: fixed: removes next cycle functions
At several places, there are functions that take a cycle value as input
and performs some computation. Along with each such function, another
function was being defined that simply added one more cycle to input and
computed the same function. This patch removes this second copy of the
function. Places where these functions were being called have been updated
to use the original function with argument being current cycle + 1.
Diffstat (limited to 'src/mem/ruby/network/garnet/fixed-pipeline/Switch_d.cc')
-rw-r--r-- | src/mem/ruby/network/garnet/fixed-pipeline/Switch_d.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mem/ruby/network/garnet/fixed-pipeline/Switch_d.cc b/src/mem/ruby/network/garnet/fixed-pipeline/Switch_d.cc index f41dc884d..4b4a4f323 100644 --- a/src/mem/ruby/network/garnet/fixed-pipeline/Switch_d.cc +++ b/src/mem/ruby/network/garnet/fixed-pipeline/Switch_d.cc @@ -88,8 +88,10 @@ Switch_d::wakeup() void Switch_d::check_for_wakeup() { + Cycles nextCycle = m_router->curCycle() + Cycles(1); + for (int inport = 0; inport < m_num_inports; inport++) { - if (m_switch_buffer[inport]->isReadyForNext(m_router->curCycle())) { + if (m_switch_buffer[inport]->isReady(nextCycle)) { scheduleEvent(Cycles(1)); break; } |