ruby: network: move message buffers to base network class.
This commit is contained in:
parent
bd8f954526
commit
cd33f9bc42
10 changed files with 7 additions and 36 deletions
|
@ -46,9 +46,6 @@ class BasicRouter : public ClockedObject
|
||||||
void init();
|
void init();
|
||||||
|
|
||||||
void print(std::ostream& out) const;
|
void print(std::ostream& out) const;
|
||||||
|
|
||||||
friend class Topology;
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
//
|
//
|
||||||
// ID in relation to other routers in the system
|
// ID in relation to other routers in the system
|
||||||
|
|
|
@ -54,7 +54,6 @@
|
||||||
|
|
||||||
class NetDest;
|
class NetDest;
|
||||||
class MessageBuffer;
|
class MessageBuffer;
|
||||||
class Throttle;
|
|
||||||
|
|
||||||
class Network : public ClockedObject
|
class Network : public ClockedObject
|
||||||
{
|
{
|
||||||
|
@ -111,6 +110,13 @@ class Network : public ClockedObject
|
||||||
static uint32_t m_control_msg_size;
|
static uint32_t m_control_msg_size;
|
||||||
static uint32_t m_data_msg_size;
|
static uint32_t m_data_msg_size;
|
||||||
|
|
||||||
|
// vector of queues from the components
|
||||||
|
std::vector<std::vector<MessageBuffer*> > m_toNetQueues;
|
||||||
|
std::vector<std::vector<MessageBuffer*> > m_fromNetQueues;
|
||||||
|
|
||||||
|
std::vector<bool> m_in_use;
|
||||||
|
std::vector<bool> m_ordered;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
//! Callback class used for collating statistics from all the
|
//! Callback class used for collating statistics from all the
|
||||||
//! controller of this type.
|
//! controller of this type.
|
||||||
|
|
|
@ -29,8 +29,6 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "mem/ruby/buffers/MessageBuffer.hh"
|
#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"
|
#include "mem/ruby/network/garnet/BaseGarnetNetwork.hh"
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
|
@ -88,12 +88,6 @@ class BaseGarnetNetwork : public Network
|
||||||
int m_vcs_per_vnet;
|
int m_vcs_per_vnet;
|
||||||
bool m_enable_fault_model;
|
bool m_enable_fault_model;
|
||||||
|
|
||||||
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;
|
|
||||||
|
|
||||||
// Statistical variables
|
// Statistical variables
|
||||||
Stats::Vector m_flits_received;
|
Stats::Vector m_flits_received;
|
||||||
Stats::Vector m_flits_injected;
|
Stats::Vector m_flits_injected;
|
||||||
|
|
|
@ -33,16 +33,13 @@
|
||||||
#include "base/cast.hh"
|
#include "base/cast.hh"
|
||||||
#include "base/stl_helpers.hh"
|
#include "base/stl_helpers.hh"
|
||||||
#include "mem/protocol/MachineType.hh"
|
#include "mem/protocol/MachineType.hh"
|
||||||
#include "mem/ruby/buffers/MessageBuffer.hh"
|
|
||||||
#include "mem/ruby/common/NetDest.hh"
|
#include "mem/ruby/common/NetDest.hh"
|
||||||
#include "mem/ruby/network/garnet/BaseGarnetNetwork.hh"
|
|
||||||
#include "mem/ruby/network/garnet/fixed-pipeline/CreditLink_d.hh"
|
#include "mem/ruby/network/garnet/fixed-pipeline/CreditLink_d.hh"
|
||||||
#include "mem/ruby/network/garnet/fixed-pipeline/GarnetLink_d.hh"
|
#include "mem/ruby/network/garnet/fixed-pipeline/GarnetLink_d.hh"
|
||||||
#include "mem/ruby/network/garnet/fixed-pipeline/GarnetNetwork_d.hh"
|
#include "mem/ruby/network/garnet/fixed-pipeline/GarnetNetwork_d.hh"
|
||||||
#include "mem/ruby/network/garnet/fixed-pipeline/NetworkInterface_d.hh"
|
#include "mem/ruby/network/garnet/fixed-pipeline/NetworkInterface_d.hh"
|
||||||
#include "mem/ruby/network/garnet/fixed-pipeline/NetworkLink_d.hh"
|
#include "mem/ruby/network/garnet/fixed-pipeline/NetworkLink_d.hh"
|
||||||
#include "mem/ruby/network/garnet/fixed-pipeline/Router_d.hh"
|
#include "mem/ruby/network/garnet/fixed-pipeline/Router_d.hh"
|
||||||
#include "mem/ruby/network/Topology.hh"
|
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
using m5::stl_helpers::deletePointers;
|
using m5::stl_helpers::deletePointers;
|
||||||
|
|
|
@ -36,14 +36,11 @@
|
||||||
|
|
||||||
#include "mem/ruby/network/garnet/BaseGarnetNetwork.hh"
|
#include "mem/ruby/network/garnet/BaseGarnetNetwork.hh"
|
||||||
#include "mem/ruby/network/garnet/NetworkHeader.hh"
|
#include "mem/ruby/network/garnet/NetworkHeader.hh"
|
||||||
#include "mem/ruby/network/Network.hh"
|
|
||||||
#include "params/GarnetNetwork_d.hh"
|
#include "params/GarnetNetwork_d.hh"
|
||||||
|
|
||||||
class FaultModel;
|
class FaultModel;
|
||||||
class NetworkInterface_d;
|
class NetworkInterface_d;
|
||||||
class MessageBuffer;
|
|
||||||
class Router_d;
|
class Router_d;
|
||||||
class Topology;
|
|
||||||
class NetDest;
|
class NetDest;
|
||||||
class NetworkLink_d;
|
class NetworkLink_d;
|
||||||
class CreditLink_d;
|
class CreditLink_d;
|
||||||
|
|
|
@ -33,7 +33,6 @@
|
||||||
#include "base/cast.hh"
|
#include "base/cast.hh"
|
||||||
#include "base/stl_helpers.hh"
|
#include "base/stl_helpers.hh"
|
||||||
#include "mem/protocol/MachineType.hh"
|
#include "mem/protocol/MachineType.hh"
|
||||||
#include "mem/ruby/buffers/MessageBuffer.hh"
|
|
||||||
#include "mem/ruby/common/NetDest.hh"
|
#include "mem/ruby/common/NetDest.hh"
|
||||||
#include "mem/ruby/network/BasicLink.hh"
|
#include "mem/ruby/network/BasicLink.hh"
|
||||||
#include "mem/ruby/network/garnet/flexible-pipeline/GarnetLink.hh"
|
#include "mem/ruby/network/garnet/flexible-pipeline/GarnetLink.hh"
|
||||||
|
@ -41,7 +40,6 @@
|
||||||
#include "mem/ruby/network/garnet/flexible-pipeline/NetworkInterface.hh"
|
#include "mem/ruby/network/garnet/flexible-pipeline/NetworkInterface.hh"
|
||||||
#include "mem/ruby/network/garnet/flexible-pipeline/NetworkLink.hh"
|
#include "mem/ruby/network/garnet/flexible-pipeline/NetworkLink.hh"
|
||||||
#include "mem/ruby/network/garnet/flexible-pipeline/Router.hh"
|
#include "mem/ruby/network/garnet/flexible-pipeline/Router.hh"
|
||||||
#include "mem/ruby/network/Topology.hh"
|
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
using m5::stl_helpers::deletePointers;
|
using m5::stl_helpers::deletePointers;
|
||||||
|
@ -145,7 +143,6 @@ GarnetNetwork::makeInternalLink(SwitchID src, SwitchID dest, BasicLink* link,
|
||||||
m_routers[dest]->addInPort(net_link);
|
m_routers[dest]->addInPort(net_link);
|
||||||
m_routers[src]->addOutPort(net_link, routing_table_entry,
|
m_routers[src]->addOutPort(net_link, routing_table_entry,
|
||||||
link->m_weight);
|
link->m_weight);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
@ -36,13 +36,10 @@
|
||||||
|
|
||||||
#include "mem/ruby/network/garnet/BaseGarnetNetwork.hh"
|
#include "mem/ruby/network/garnet/BaseGarnetNetwork.hh"
|
||||||
#include "mem/ruby/network/garnet/NetworkHeader.hh"
|
#include "mem/ruby/network/garnet/NetworkHeader.hh"
|
||||||
#include "mem/ruby/network/Network.hh"
|
|
||||||
#include "params/GarnetNetwork.hh"
|
#include "params/GarnetNetwork.hh"
|
||||||
|
|
||||||
class NetworkInterface;
|
class NetworkInterface;
|
||||||
class MessageBuffer;
|
|
||||||
class Router;
|
class Router;
|
||||||
class Topology;
|
|
||||||
class NetDest;
|
class NetDest;
|
||||||
class NetworkLink;
|
class NetworkLink;
|
||||||
|
|
||||||
|
|
|
@ -33,12 +33,10 @@
|
||||||
#include "base/stl_helpers.hh"
|
#include "base/stl_helpers.hh"
|
||||||
#include "mem/ruby/buffers/MessageBuffer.hh"
|
#include "mem/ruby/buffers/MessageBuffer.hh"
|
||||||
#include "mem/ruby/common/NetDest.hh"
|
#include "mem/ruby/common/NetDest.hh"
|
||||||
#include "mem/ruby/network/BasicLink.hh"
|
|
||||||
#include "mem/ruby/network/simple/SimpleLink.hh"
|
#include "mem/ruby/network/simple/SimpleLink.hh"
|
||||||
#include "mem/ruby/network/simple/SimpleNetwork.hh"
|
#include "mem/ruby/network/simple/SimpleNetwork.hh"
|
||||||
#include "mem/ruby/network/simple/Switch.hh"
|
#include "mem/ruby/network/simple/Switch.hh"
|
||||||
#include "mem/ruby/network/simple/Throttle.hh"
|
#include "mem/ruby/network/simple/Throttle.hh"
|
||||||
#include "mem/ruby/network/Topology.hh"
|
|
||||||
#include "mem/ruby/profiler/Profiler.hh"
|
#include "mem/ruby/profiler/Profiler.hh"
|
||||||
#include "mem/ruby/system/System.hh"
|
#include "mem/ruby/system/System.hh"
|
||||||
|
|
||||||
|
|
|
@ -32,16 +32,13 @@
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#include "mem/ruby/common/Global.hh"
|
|
||||||
#include "mem/ruby/network/Network.hh"
|
#include "mem/ruby/network/Network.hh"
|
||||||
#include "params/SimpleNetwork.hh"
|
#include "params/SimpleNetwork.hh"
|
||||||
#include "sim/sim_object.hh"
|
|
||||||
|
|
||||||
class NetDest;
|
class NetDest;
|
||||||
class MessageBuffer;
|
class MessageBuffer;
|
||||||
class Throttle;
|
class Throttle;
|
||||||
class Switch;
|
class Switch;
|
||||||
class Topology;
|
|
||||||
|
|
||||||
class SimpleNetwork : public Network
|
class SimpleNetwork : public Network
|
||||||
{
|
{
|
||||||
|
@ -94,13 +91,6 @@ class SimpleNetwork : public Network
|
||||||
// Private copy constructor and assignment operator
|
// Private copy constructor and assignment operator
|
||||||
SimpleNetwork(const SimpleNetwork& obj);
|
SimpleNetwork(const SimpleNetwork& obj);
|
||||||
SimpleNetwork& operator=(const SimpleNetwork& obj);
|
SimpleNetwork& operator=(const SimpleNetwork& obj);
|
||||||
|
|
||||||
// vector of queues from the components
|
|
||||||
std::vector<std::vector<MessageBuffer*> > m_toNetQueues;
|
|
||||||
std::vector<std::vector<MessageBuffer*> > m_fromNetQueues;
|
|
||||||
|
|
||||||
std::vector<bool> m_in_use;
|
|
||||||
std::vector<bool> m_ordered;
|
|
||||||
std::vector<Switch*> m_switches;
|
std::vector<Switch*> m_switches;
|
||||||
std::vector<MessageBuffer*> m_buffers_to_free;
|
std::vector<MessageBuffer*> m_buffers_to_free;
|
||||||
std::vector<Switch*> m_endpoint_switches;
|
std::vector<Switch*> m_endpoint_switches;
|
||||||
|
|
Loading…
Reference in a new issue