diff options
author | Brad Beckmann <Brad.Beckmann@amd.com> | 2010-01-29 20:29:32 -0800 |
---|---|---|
committer | Brad Beckmann <Brad.Beckmann@amd.com> | 2010-01-29 20:29:32 -0800 |
commit | 8dd45674aef2822d4c6cb57f1a4aedc7d9ee311c (patch) | |
tree | 47d5d83cfdd2a6ff7025c3417fd843b7cd16841f /src/mem/ruby/network/garnet/flexible-pipeline/Router.cc | |
parent | b5444625056a93cd676c512a891b0c13c44cf58b (diff) | |
download | gem5-8dd45674aef2822d4c6cb57f1a4aedc7d9ee311c.tar.xz |
ruby: Converted Garnet to M5 configuration
Diffstat (limited to 'src/mem/ruby/network/garnet/flexible-pipeline/Router.cc')
-rw-r--r-- | src/mem/ruby/network/garnet/flexible-pipeline/Router.cc | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/mem/ruby/network/garnet/flexible-pipeline/Router.cc b/src/mem/ruby/network/garnet/flexible-pipeline/Router.cc index 63f0373f8..9963555cb 100644 --- a/src/mem/ruby/network/garnet/flexible-pipeline/Router.cc +++ b/src/mem/ruby/network/garnet/flexible-pipeline/Router.cc @@ -39,7 +39,7 @@ Router::Router(int id, GarnetNetwork *network_ptr) m_id = id; m_net_ptr = network_ptr; m_virtual_networks = m_net_ptr->getNumberOfVirtualNetworks(); - m_vc_per_vnet = m_net_ptr->getNetworkConfig()->getVCsPerClass(); + m_vc_per_vnet = m_net_ptr->getVCsPerClass(); m_round_robin_inport = 0; m_round_robin_start = 0; m_num_vcs = m_vc_per_vnet*m_virtual_networks; @@ -98,7 +98,7 @@ void Router::addOutPort(NetworkLink *out_link, const NetDest& routing_table_entr Vector<flitBuffer *> intermediateQueues; for(int i = 0; i < m_num_vcs; i++) { - intermediateQueues.insertAtBottom(new flitBuffer(m_net_ptr->getNetworkConfig()->getBufferSize())); + intermediateQueues.insertAtBottom(new flitBuffer(m_net_ptr->getBufferSize())); } m_router_buffers.insertAtBottom(intermediateQueues); @@ -241,17 +241,17 @@ void Router::routeCompute(flit *m_flit, int inport) int outport = m_in_vc_state[inport][invc]->get_outport(); int outvc = m_in_vc_state[inport][invc]->get_outvc(); - assert(m_net_ptr->getNetworkConfig()->getNumPipeStages() >= 1); - m_flit->set_time(g_eventQueue_ptr->getTime() + (m_net_ptr->getNetworkConfig()->getNumPipeStages() - 1)); // Becasuse 1 cycle will be consumed in scheduling the output link + assert(m_net_ptr->getNumPipeStages() >= 1); + m_flit->set_time(g_eventQueue_ptr->getTime() + (m_net_ptr->getNumPipeStages() - 1)); // Becasuse 1 cycle will be consumed in scheduling the output link m_flit->set_vc(outvc); m_router_buffers[outport][outvc]->insert(m_flit); - if(m_net_ptr->getNetworkConfig()->getNumPipeStages() > 1) - g_eventQueue_ptr->scheduleEvent(this, m_net_ptr->getNetworkConfig()->getNumPipeStages() -1 ); + if(m_net_ptr->getNumPipeStages() > 1) + g_eventQueue_ptr->scheduleEvent(this, m_net_ptr->getNumPipeStages() -1 ); if((m_flit->get_type() == HEAD_) || (m_flit->get_type() == HEAD_TAIL_)) { NetDest destination = dynamic_cast<NetworkMessage*>(m_flit->get_msg_ptr().ref())->getInternalDestination(); - if(m_net_ptr->getNetworkConfig()->getNumPipeStages() > 1) + if(m_net_ptr->getNumPipeStages() > 1) { m_out_vc_state[outport][outvc]->setState(VC_AB_, g_eventQueue_ptr->getTime() + 1); m_out_link[outport]->request_vc_link(outvc, destination, g_eventQueue_ptr->getTime() + 1); |