summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Hashe <david.hashe@amd.com>2015-07-20 09:15:18 -0500
committerDavid Hashe <david.hashe@amd.com>2015-07-20 09:15:18 -0500
commit8b32dad4d8545bf33285853936ede834cb39cf77 (patch)
treef90658a35f37477d161491db0b9e2f37516c68cf
parentf9fa242f423a7bfe144d6c48383443ee71d10f35 (diff)
downloadgem5-8b32dad4d8545bf33285853936ede834cb39cf77.tar.xz
ruby: change advance_stage for flit_d
Sets m_stage.second to the second parameter of the function. Then, for every place where advance_stage is called, adds a cycle to the argument being passed.
-rw-r--r--src/mem/ruby/network/garnet/fixed-pipeline/InputUnit_d.cc2
-rw-r--r--src/mem/ruby/network/garnet/fixed-pipeline/RoutingUnit_d.cc2
-rw-r--r--src/mem/ruby/network/garnet/fixed-pipeline/SWallocator_d.cc2
-rw-r--r--src/mem/ruby/network/garnet/fixed-pipeline/Switch_d.cc2
-rw-r--r--src/mem/ruby/network/garnet/fixed-pipeline/VirtualChannel_d.cc2
-rw-r--r--src/mem/ruby/network/garnet/fixed-pipeline/flit_d.hh4
6 files changed, 7 insertions, 7 deletions
diff --git a/src/mem/ruby/network/garnet/fixed-pipeline/InputUnit_d.cc b/src/mem/ruby/network/garnet/fixed-pipeline/InputUnit_d.cc
index 6cb60032a..fb147babc 100644
--- a/src/mem/ruby/network/garnet/fixed-pipeline/InputUnit_d.cc
+++ b/src/mem/ruby/network/garnet/fixed-pipeline/InputUnit_d.cc
@@ -81,7 +81,7 @@ InputUnit_d::wakeup()
m_vcs[vc]->set_enqueue_time(m_router->curCycle());
} else {
- t_flit->advance_stage(SA_, m_router->curCycle());
+ t_flit->advance_stage(SA_, m_router->curCycle() + Cycles(1));
m_router->swarb_req();
}
// write flit into input buffer
diff --git a/src/mem/ruby/network/garnet/fixed-pipeline/RoutingUnit_d.cc b/src/mem/ruby/network/garnet/fixed-pipeline/RoutingUnit_d.cc
index 8d8378738..cd8f974f6 100644
--- a/src/mem/ruby/network/garnet/fixed-pipeline/RoutingUnit_d.cc
+++ b/src/mem/ruby/network/garnet/fixed-pipeline/RoutingUnit_d.cc
@@ -58,7 +58,7 @@ RoutingUnit_d::RC_stage(flit_d *t_flit, InputUnit_d *in_unit, int invc)
{
int outport = routeCompute(t_flit);
in_unit->updateRoute(invc, outport, m_router->curCycle());
- t_flit->advance_stage(VA_, m_router->curCycle());
+ t_flit->advance_stage(VA_, m_router->curCycle() + Cycles(1));
m_router->vcarb_req();
}
diff --git a/src/mem/ruby/network/garnet/fixed-pipeline/SWallocator_d.cc b/src/mem/ruby/network/garnet/fixed-pipeline/SWallocator_d.cc
index cabf435f4..21fbfe6e5 100644
--- a/src/mem/ruby/network/garnet/fixed-pipeline/SWallocator_d.cc
+++ b/src/mem/ruby/network/garnet/fixed-pipeline/SWallocator_d.cc
@@ -178,7 +178,7 @@ SWallocator_d::arbitrate_outports()
// remove flit from Input Unit
flit_d *t_flit = m_input_unit[inport]->getTopFlit(invc);
- t_flit->advance_stage(ST_, m_router->curCycle());
+ t_flit->advance_stage(ST_, m_router->curCycle() + Cycles(1));
t_flit->set_vc(outvc);
t_flit->set_outport(outport);
t_flit->set_time(m_router->curCycle() + Cycles(1));
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 4b4a4f323..911c5a6eb 100644
--- a/src/mem/ruby/network/garnet/fixed-pipeline/Switch_d.cc
+++ b/src/mem/ruby/network/garnet/fixed-pipeline/Switch_d.cc
@@ -73,7 +73,7 @@ Switch_d::wakeup()
flit_d *t_flit = m_switch_buffer[inport]->peekTopFlit();
if (t_flit->is_stage(ST_, m_router->curCycle())) {
int outport = t_flit->get_outport();
- t_flit->advance_stage(LT_, m_router->curCycle());
+ t_flit->advance_stage(LT_, m_router->curCycle() + Cycles(1));
t_flit->set_time(m_router->curCycle() + Cycles(1));
// This will take care of waking up the Network Link
diff --git a/src/mem/ruby/network/garnet/fixed-pipeline/VirtualChannel_d.cc b/src/mem/ruby/network/garnet/fixed-pipeline/VirtualChannel_d.cc
index 109d2a3be..4db087188 100644
--- a/src/mem/ruby/network/garnet/fixed-pipeline/VirtualChannel_d.cc
+++ b/src/mem/ruby/network/garnet/fixed-pipeline/VirtualChannel_d.cc
@@ -57,7 +57,7 @@ VirtualChannel_d::grant_vc(int out_vc, Cycles curTime)
m_vc_state.first = ACTIVE_;
m_vc_state.second = curTime + Cycles(1);
flit_d *t_flit = m_input_buffer->peekTopFlit();
- t_flit->advance_stage(SA_, curTime);
+ t_flit->advance_stage(SA_, curTime + Cycles(1));
}
bool
diff --git a/src/mem/ruby/network/garnet/fixed-pipeline/flit_d.hh b/src/mem/ruby/network/garnet/fixed-pipeline/flit_d.hh
index 55187bd14..eb076d613 100644
--- a/src/mem/ruby/network/garnet/fixed-pipeline/flit_d.hh
+++ b/src/mem/ruby/network/garnet/fixed-pipeline/flit_d.hh
@@ -66,10 +66,10 @@ class flit_d
}
void
- advance_stage(flit_stage t_stage, Cycles curTime)
+ advance_stage(flit_stage t_stage, Cycles newTime)
{
m_stage.first = t_stage;
- m_stage.second = curTime + Cycles(1);
+ m_stage.second = newTime;
}
std::pair<flit_stage, Cycles> get_stage() { return m_stage; }