network: set the ExtLink bw to 16 bytes
Therefore all links by default are 16 bytes wide and thus work with Garnet's uniform link bandwidth assumption.
This commit is contained in:
parent
6c7429dbe3
commit
93a50fc318
7 changed files with 49 additions and 90 deletions
|
@ -45,7 +45,7 @@ class BasicExtLink(BasicLink):
|
|||
type = 'BasicExtLink'
|
||||
ext_node = Param.RubyController("External node")
|
||||
int_node = Param.BasicRouter("ID of internal node")
|
||||
bandwidth_factor = 64
|
||||
bandwidth_factor = 16
|
||||
|
||||
class BasicIntLink(BasicLink):
|
||||
type = 'BasicIntLink'
|
||||
|
|
|
@ -28,6 +28,7 @@
|
|||
* Authors: Niket Agarwal
|
||||
*/
|
||||
|
||||
#include "mem/ruby/buffers/MessageBuffer.hh"
|
||||
#include "mem/ruby/network/BasicLink.hh"
|
||||
#include "mem/ruby/network/Topology.hh"
|
||||
#include "mem/ruby/network/garnet/BaseGarnetNetwork.hh"
|
||||
|
@ -41,6 +42,12 @@ BaseGarnetNetwork::BaseGarnetNetwork(const Params *p)
|
|||
m_buffers_per_data_vc = p->buffers_per_data_vc;
|
||||
m_buffers_per_ctrl_vc = p->buffers_per_ctrl_vc;
|
||||
|
||||
m_ruby_start = 0;
|
||||
m_flits_received = 0;
|
||||
m_flits_injected = 0;
|
||||
m_network_latency = 0.0;
|
||||
m_queueing_latency = 0.0;
|
||||
|
||||
// Currently Garnet only supports uniform bandwidth for all
|
||||
// links and network interfaces.
|
||||
for (std::vector<BasicExtLink*>::const_iterator i =
|
||||
|
@ -59,6 +66,34 @@ BaseGarnetNetwork::BaseGarnetNetwork(const Params *p)
|
|||
fatal("Garnet only supports uniform bw across all links and NIs\n");
|
||||
}
|
||||
}
|
||||
|
||||
// Allocate to and from queues
|
||||
|
||||
// Queues that are getting messages from protocol
|
||||
m_toNetQueues.resize(m_nodes);
|
||||
|
||||
// Queues that are feeding the protocol
|
||||
m_fromNetQueues.resize(m_nodes);
|
||||
|
||||
m_in_use.resize(m_virtual_networks);
|
||||
m_ordered.resize(m_virtual_networks);
|
||||
for (int i = 0; i < m_virtual_networks; i++) {
|
||||
m_in_use[i] = false;
|
||||
m_ordered[i] = false;
|
||||
}
|
||||
|
||||
for (int node = 0; node < m_nodes; node++) {
|
||||
// Setting number of virtual message buffers per Network Queue
|
||||
m_toNetQueues[node].resize(m_virtual_networks);
|
||||
m_fromNetQueues[node].resize(m_virtual_networks);
|
||||
|
||||
// Instantiating the Message Buffers that
|
||||
// interact with the coherence protocol
|
||||
for (int j = 0; j < m_virtual_networks; j++) {
|
||||
m_toNetQueues[node][j] = new MessageBuffer();
|
||||
m_fromNetQueues[node][j] = new MessageBuffer();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -60,6 +60,19 @@ class BaseGarnetNetwork : public Network
|
|||
int m_vcs_per_class;
|
||||
int m_buffers_per_data_vc;
|
||||
int m_buffers_per_ctrl_vc;
|
||||
|
||||
int m_flits_received;
|
||||
int m_flits_injected;
|
||||
double m_network_latency;
|
||||
double m_queueing_latency;
|
||||
|
||||
std::vector<bool> m_in_use;
|
||||
std::vector<bool> m_ordered;
|
||||
|
||||
std::vector<std::vector<MessageBuffer*> > m_toNetQueues;
|
||||
std::vector<std::vector<MessageBuffer*> > m_fromNetQueues;
|
||||
|
||||
Time m_ruby_start;
|
||||
};
|
||||
|
||||
#endif // __MEM_RUBY_NETWORK_GARNET_BASEGARNETNETWORK_HH__
|
||||
|
|
|
@ -49,12 +49,6 @@ using m5::stl_helpers::deletePointers;
|
|||
GarnetNetwork_d::GarnetNetwork_d(const Params *p)
|
||||
: BaseGarnetNetwork(p)
|
||||
{
|
||||
m_ruby_start = 0;
|
||||
m_flits_received = 0;
|
||||
m_flits_injected = 0;
|
||||
m_network_latency = 0.0;
|
||||
m_queueing_latency = 0.0;
|
||||
|
||||
// record the routers
|
||||
for (vector<BasicRouter*>::const_iterator i =
|
||||
m_topology_ptr->params()->routers.begin();
|
||||
|
@ -62,32 +56,6 @@ GarnetNetwork_d::GarnetNetwork_d(const Params *p)
|
|||
Router_d* router = safe_cast<Router_d*>(*i);
|
||||
m_router_ptr_vector.push_back(router);
|
||||
}
|
||||
|
||||
// Queues that are getting messages from protocol
|
||||
m_toNetQueues.resize(m_nodes);
|
||||
|
||||
// Queues that are feeding the protocol
|
||||
m_fromNetQueues.resize(m_nodes);
|
||||
m_in_use.resize(m_virtual_networks);
|
||||
m_ordered.resize(m_virtual_networks);
|
||||
for (int i = 0; i < m_virtual_networks; i++) {
|
||||
m_in_use[i] = false;
|
||||
m_ordered[i] = false;
|
||||
}
|
||||
|
||||
for (int node = 0; node < m_nodes; node++) {
|
||||
// Setting how many vitual message buffers
|
||||
// will there be per Network Queue
|
||||
m_toNetQueues[node].resize(m_virtual_networks);
|
||||
m_fromNetQueues[node].resize(m_virtual_networks);
|
||||
|
||||
// Instantiating the Message Buffers
|
||||
// that interact with the coherence protocol
|
||||
for (int j = 0; j < m_virtual_networks; j++) {
|
||||
m_toNetQueues[node][j] = new MessageBuffer();
|
||||
m_fromNetQueues[node][j] = new MessageBuffer();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -125,24 +125,11 @@ class GarnetNetwork_d : public BaseGarnetNetwork
|
|||
GarnetNetwork_d& operator=(const GarnetNetwork_d& obj);
|
||||
|
||||
std::vector<VNET_type > m_vnet_type;
|
||||
// int m_virtual_networks;
|
||||
// int m_nodes;
|
||||
int m_flits_received, m_flits_injected;
|
||||
double m_network_latency, m_queueing_latency;
|
||||
|
||||
std::vector<bool> m_in_use;
|
||||
std::vector<bool> m_ordered;
|
||||
|
||||
std::vector<std::vector<MessageBuffer*> > m_toNetQueues;
|
||||
std::vector<std::vector<MessageBuffer*> > m_fromNetQueues;
|
||||
|
||||
std::vector<Router_d *> m_router_ptr_vector; // All Routers in Network
|
||||
std::vector<NetworkLink_d *> m_link_ptr_vector; // All links in the network
|
||||
std::vector<CreditLink_d *> m_creditlink_ptr_vector; // All links in net
|
||||
std::vector<NetworkInterface_d *> m_ni_ptr_vector; // All NI's in Network
|
||||
|
||||
// Topology* m_topology_ptr;
|
||||
Time m_ruby_start;
|
||||
};
|
||||
|
||||
inline std::ostream&
|
||||
|
|
|
@ -50,12 +50,6 @@ GarnetNetwork::GarnetNetwork(const Params *p)
|
|||
{
|
||||
m_buffer_size = p->buffer_size;
|
||||
|
||||
m_ruby_start = 0;
|
||||
m_flits_received = 0;
|
||||
m_flits_injected = 0;
|
||||
m_network_latency = 0.0;
|
||||
m_queueing_latency = 0.0;
|
||||
|
||||
// record the routers
|
||||
for (vector<BasicRouter*>::const_iterator i =
|
||||
m_topology_ptr->params()->routers.begin();
|
||||
|
@ -63,34 +57,6 @@ GarnetNetwork::GarnetNetwork(const Params *p)
|
|||
Router* router = safe_cast<Router*>(*i);
|
||||
m_router_ptr_vector.push_back(router);
|
||||
}
|
||||
|
||||
// Allocate to and from queues
|
||||
|
||||
// Queues that are getting messages from protocol
|
||||
m_toNetQueues.resize(m_nodes);
|
||||
|
||||
// Queues that are feeding the protocol
|
||||
m_fromNetQueues.resize(m_nodes);
|
||||
|
||||
m_in_use.resize(m_virtual_networks);
|
||||
m_ordered.resize(m_virtual_networks);
|
||||
for (int i = 0; i < m_virtual_networks; i++) {
|
||||
m_in_use[i] = false;
|
||||
m_ordered[i] = false;
|
||||
}
|
||||
|
||||
for (int node = 0; node < m_nodes; node++) {
|
||||
//Setting number of virtual message buffers per Network Queue
|
||||
m_toNetQueues[node].resize(m_virtual_networks);
|
||||
m_fromNetQueues[node].resize(m_virtual_networks);
|
||||
|
||||
// Instantiating the Message Buffers that
|
||||
// interact with the coherence protocol
|
||||
for (int j = 0; j < m_virtual_networks; j++) {
|
||||
m_toNetQueues[node][j] = new MessageBuffer();
|
||||
m_fromNetQueues[node][j] = new MessageBuffer();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -110,20 +110,10 @@ class GarnetNetwork : public BaseGarnetNetwork
|
|||
GarnetNetwork(const GarnetNetwork& obj);
|
||||
GarnetNetwork& operator=(const GarnetNetwork& obj);
|
||||
|
||||
int m_flits_received, m_flits_injected;
|
||||
double m_network_latency, m_queueing_latency;
|
||||
|
||||
std::vector<bool> m_in_use;
|
||||
std::vector<bool> m_ordered;
|
||||
|
||||
std::vector<std::vector<MessageBuffer*> > m_toNetQueues;
|
||||
std::vector<std::vector<MessageBuffer*> > m_fromNetQueues;
|
||||
|
||||
std::vector<Router *> m_router_ptr_vector; // All Routers in Network
|
||||
std::vector<NetworkLink *> m_link_ptr_vector; // All links in network
|
||||
std::vector<NetworkInterface *> m_ni_ptr_vector; // All NI's in Network
|
||||
|
||||
Time m_ruby_start;
|
||||
int m_buffer_size;
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue