summaryrefslogtreecommitdiff
path: root/src/mem/ruby/network
diff options
context:
space:
mode:
Diffstat (limited to 'src/mem/ruby/network')
-rw-r--r--src/mem/ruby/network/garnet/fixed-pipeline/NetworkInterface_d.cc13
-rw-r--r--src/mem/ruby/network/garnet/fixed-pipeline/NetworkInterface_d.hh1
-rw-r--r--src/mem/ruby/network/garnet/fixed-pipeline/RoutingUnit_d.cc6
-rw-r--r--src/mem/ruby/network/garnet/flexible-pipeline/NetworkInterface.cc15
-rw-r--r--src/mem/ruby/network/garnet/flexible-pipeline/NetworkInterface.hh1
-rw-r--r--src/mem/ruby/network/garnet/flexible-pipeline/Router.cc7
-rw-r--r--src/mem/ruby/network/simple/PerfectSwitch.cc12
-rw-r--r--src/mem/ruby/network/simple/Throttle.cc9
8 files changed, 29 insertions, 35 deletions
diff --git a/src/mem/ruby/network/garnet/fixed-pipeline/NetworkInterface_d.cc b/src/mem/ruby/network/garnet/fixed-pipeline/NetworkInterface_d.cc
index 47ded231c..c7bd6178a 100644
--- a/src/mem/ruby/network/garnet/fixed-pipeline/NetworkInterface_d.cc
+++ b/src/mem/ruby/network/garnet/fixed-pipeline/NetworkInterface_d.cc
@@ -37,7 +37,7 @@
#include "mem/ruby/network/MessageBuffer.hh"
#include "mem/ruby/network/garnet/fixed-pipeline/NetworkInterface_d.hh"
#include "mem/ruby/network/garnet/fixed-pipeline/flitBuffer_d.hh"
-#include "mem/ruby/slicc_interface/NetworkMessage.hh"
+#include "mem/ruby/slicc_interface/Message.hh"
using namespace std;
using m5::stl_helpers::deletePointers;
@@ -129,8 +129,8 @@ NetworkInterface_d::addNode(vector<MessageBuffer *>& in,
bool
NetworkInterface_d::flitisizeMessage(MsgPtr msg_ptr, int vnet)
{
- NetworkMessage *net_msg_ptr = safe_cast<NetworkMessage *>(msg_ptr.get());
- NetDest net_msg_dest = net_msg_ptr->getInternalDestination();
+ Message *net_msg_ptr = msg_ptr.get();
+ NetDest net_msg_dest = net_msg_ptr->getDestination();
// gets all the destinations associated with this message.
vector<NodeID> dest_nodes = net_msg_dest.getAllDest();
@@ -152,8 +152,7 @@ NetworkInterface_d::flitisizeMessage(MsgPtr msg_ptr, int vnet)
MsgPtr new_msg_ptr = msg_ptr->clone();
NodeID destID = dest_nodes[ctr];
- NetworkMessage *new_net_msg_ptr =
- safe_cast<NetworkMessage *>(new_msg_ptr.get());
+ Message *new_net_msg_ptr = new_msg_ptr.get();
if (dest_nodes.size() > 1) {
NetDest personal_dest;
for (int m = 0; m < (int) MachineType_NUM; m++) {
@@ -163,7 +162,7 @@ NetworkInterface_d::flitisizeMessage(MsgPtr msg_ptr, int vnet)
personal_dest.clear();
personal_dest.add((MachineID) {(MachineType) m, (destID -
MachineType_base_number((MachineType) m))});
- new_net_msg_ptr->getInternalDestination() = personal_dest;
+ new_net_msg_ptr->getDestination() = personal_dest;
break;
}
}
@@ -171,7 +170,7 @@ NetworkInterface_d::flitisizeMessage(MsgPtr msg_ptr, int vnet)
// removing the destination from the original message to reflect
// that a message with this particular destination has been
// flitisized and an output vc is acquired
- net_msg_ptr->getInternalDestination().removeNetDest(personal_dest);
+ net_msg_ptr->getDestination().removeNetDest(personal_dest);
}
for (int i = 0; i < num_flits; i++) {
diff --git a/src/mem/ruby/network/garnet/fixed-pipeline/NetworkInterface_d.hh b/src/mem/ruby/network/garnet/fixed-pipeline/NetworkInterface_d.hh
index 0cb928d82..812e8b7fb 100644
--- a/src/mem/ruby/network/garnet/fixed-pipeline/NetworkInterface_d.hh
+++ b/src/mem/ruby/network/garnet/fixed-pipeline/NetworkInterface_d.hh
@@ -43,7 +43,6 @@
#include "mem/ruby/slicc_interface/Message.hh"
#include "params/GarnetNetworkInterface_d.hh"
-class NetworkMessage;
class MessageBuffer;
class flitBuffer_d;
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 e68c08613..8d8378738 100644
--- a/src/mem/ruby/network/garnet/fixed-pipeline/RoutingUnit_d.cc
+++ b/src/mem/ruby/network/garnet/fixed-pipeline/RoutingUnit_d.cc
@@ -32,7 +32,7 @@
#include "mem/ruby/network/garnet/fixed-pipeline/InputUnit_d.hh"
#include "mem/ruby/network/garnet/fixed-pipeline/Router_d.hh"
#include "mem/ruby/network/garnet/fixed-pipeline/RoutingUnit_d.hh"
-#include "mem/ruby/slicc_interface/NetworkMessage.hh"
+#include "mem/ruby/slicc_interface/Message.hh"
RoutingUnit_d::RoutingUnit_d(Router_d *router)
{
@@ -66,8 +66,8 @@ int
RoutingUnit_d::routeCompute(flit_d *t_flit)
{
MsgPtr msg_ptr = t_flit->get_msg_ptr();
- NetworkMessage* net_msg_ptr = safe_cast<NetworkMessage *>(msg_ptr.get());
- NetDest msg_destination = net_msg_ptr->getInternalDestination();
+ Message *net_msg_ptr = msg_ptr.get();
+ NetDest msg_destination = net_msg_ptr->getDestination();
int output_link = -1;
int min_weight = INFINITE_;
diff --git a/src/mem/ruby/network/garnet/flexible-pipeline/NetworkInterface.cc b/src/mem/ruby/network/garnet/flexible-pipeline/NetworkInterface.cc
index 32066f0e1..d834ea1a3 100644
--- a/src/mem/ruby/network/garnet/flexible-pipeline/NetworkInterface.cc
+++ b/src/mem/ruby/network/garnet/flexible-pipeline/NetworkInterface.cc
@@ -37,7 +37,7 @@
#include "mem/ruby/network/MessageBuffer.hh"
#include "mem/ruby/network/garnet/flexible-pipeline/NetworkInterface.hh"
#include "mem/ruby/network/garnet/flexible-pipeline/flitBuffer.hh"
-#include "mem/ruby/slicc_interface/NetworkMessage.hh"
+#include "mem/ruby/slicc_interface/Message.hh"
using namespace std;
using m5::stl_helpers::deletePointers;
@@ -120,8 +120,8 @@ NetworkInterface::request_vc(int in_vc, int in_port, NetDest destination,
bool
NetworkInterface::flitisizeMessage(MsgPtr msg_ptr, int vnet)
{
- NetworkMessage *net_msg_ptr = safe_cast<NetworkMessage *>(msg_ptr.get());
- NetDest net_msg_dest = net_msg_ptr->getInternalDestination();
+ Message *net_msg_ptr = msg_ptr.get();
+ NetDest net_msg_dest = net_msg_ptr->getDestination();
// get all the destinations associated with this message.
vector<NodeID> dest_nodes = net_msg_dest.getAllDest();
@@ -143,8 +143,7 @@ NetworkInterface::flitisizeMessage(MsgPtr msg_ptr, int vnet)
MsgPtr new_msg_ptr = msg_ptr->clone();
NodeID destID = dest_nodes[ctr];
- NetworkMessage *new_net_msg_ptr =
- safe_cast<NetworkMessage *>(new_msg_ptr.get());
+ Message *new_net_msg_ptr = new_msg_ptr.get();
if (dest_nodes.size() > 1) {
NetDest personal_dest;
for (int m = 0; m < (int) MachineType_NUM; m++) {
@@ -154,7 +153,7 @@ NetworkInterface::flitisizeMessage(MsgPtr msg_ptr, int vnet)
personal_dest.clear();
personal_dest.add((MachineID) {(MachineType) m, (destID -
MachineType_base_number((MachineType) m))});
- new_net_msg_ptr->getInternalDestination() = personal_dest;
+ new_net_msg_ptr->getDestination() = personal_dest;
break;
}
}
@@ -163,7 +162,7 @@ NetworkInterface::flitisizeMessage(MsgPtr msg_ptr, int vnet)
// removing the destination from the original message to reflect
// that a message with this particular destination has been
// flitisized and an output vc is acquired
- net_msg_ptr->getInternalDestination().removeNetDest(personal_dest);
+ net_msg_ptr->getDestination().removeNetDest(personal_dest);
}
for (int i = 0; i < num_flits; i++) {
m_net_ptr->increment_injected_flits(vnet);
@@ -179,7 +178,7 @@ NetworkInterface::flitisizeMessage(MsgPtr msg_ptr, int vnet)
// This flit will be ready to traverse the link and into the next hop
// only when an output vc is acquired at the next hop
outNetLink->request_vc_link(
- vc, new_net_msg_ptr->getInternalDestination(), curCycle());
+ vc, new_net_msg_ptr->getDestination(), curCycle());
}
return true ;
diff --git a/src/mem/ruby/network/garnet/flexible-pipeline/NetworkInterface.hh b/src/mem/ruby/network/garnet/flexible-pipeline/NetworkInterface.hh
index 03cdf3dc6..9207c353a 100644
--- a/src/mem/ruby/network/garnet/flexible-pipeline/NetworkInterface.hh
+++ b/src/mem/ruby/network/garnet/flexible-pipeline/NetworkInterface.hh
@@ -42,7 +42,6 @@
#include "mem/ruby/slicc_interface/Message.hh"
#include "params/GarnetNetworkInterface.hh"
-class NetworkMessage;
class MessageBuffer;
class flitBuffer;
diff --git a/src/mem/ruby/network/garnet/flexible-pipeline/Router.cc b/src/mem/ruby/network/garnet/flexible-pipeline/Router.cc
index 0fc2c6be3..ef985058e 100644
--- a/src/mem/ruby/network/garnet/flexible-pipeline/Router.cc
+++ b/src/mem/ruby/network/garnet/flexible-pipeline/Router.cc
@@ -35,7 +35,7 @@
#include "mem/ruby/network/garnet/flexible-pipeline/OutVcState.hh"
#include "mem/ruby/network/garnet/flexible-pipeline/Router.hh"
#include "mem/ruby/network/garnet/flexible-pipeline/VCarbiter.hh"
-#include "mem/ruby/slicc_interface/NetworkMessage.hh"
+#include "mem/ruby/slicc_interface/Message.hh"
using namespace std;
using m5::stl_helpers::deletePointers;
@@ -277,9 +277,8 @@ Router::routeCompute(flit *m_flit, int inport)
scheduleEvent(Cycles(m_net_ptr->getNumPipeStages() - 1));
if ((m_flit->get_type() == HEAD_) || (m_flit->get_type() == HEAD_TAIL_)) {
- NetworkMessage *nm =
- safe_cast<NetworkMessage*>(m_flit->get_msg_ptr().get());
- NetDest destination = nm->getInternalDestination();
+ Message *nm = m_flit->get_msg_ptr().get();
+ NetDest destination = nm->getDestination();
if (m_net_ptr->getNumPipeStages() > 1) {
m_out_vc_state[outport][outvc]->setState(VC_AB_, curCycle() +
diff --git a/src/mem/ruby/network/simple/PerfectSwitch.cc b/src/mem/ruby/network/simple/PerfectSwitch.cc
index 86cafbe15..06072724e 100644
--- a/src/mem/ruby/network/simple/PerfectSwitch.cc
+++ b/src/mem/ruby/network/simple/PerfectSwitch.cc
@@ -35,7 +35,7 @@
#include "mem/ruby/network/simple/PerfectSwitch.hh"
#include "mem/ruby/network/simple/SimpleNetwork.hh"
#include "mem/ruby/network/simple/Switch.hh"
-#include "mem/ruby/slicc_interface/NetworkMessage.hh"
+#include "mem/ruby/slicc_interface/Message.hh"
using namespace std;
@@ -112,7 +112,7 @@ void
PerfectSwitch::operateVnet(int vnet)
{
MsgPtr msg_ptr;
- NetworkMessage* net_msg_ptr = NULL;
+ Message *net_msg_ptr = NULL;
// This is for round-robin scheduling
int incoming = m_round_robin_start;
@@ -149,12 +149,12 @@ PerfectSwitch::operateVnet(int vnet)
// Peek at message
msg_ptr = buffer->peekMsgPtr();
- net_msg_ptr = safe_cast<NetworkMessage*>(msg_ptr.get());
+ net_msg_ptr = msg_ptr.get();
DPRINTF(RubyNetwork, "Message: %s\n", (*net_msg_ptr));
output_links.clear();
output_link_destinations.clear();
- NetDest msg_dsts = net_msg_ptr->getInternalDestination();
+ NetDest msg_dsts = net_msg_ptr->getDestination();
// Unfortunately, the token-protocol sends some
// zero-destination messages, so this assert isn't valid
@@ -264,8 +264,8 @@ PerfectSwitch::operateVnet(int vnet)
// Change the internal destination set of the message so it
// knows which destinations this link is responsible for.
- net_msg_ptr = safe_cast<NetworkMessage*>(msg_ptr.get());
- net_msg_ptr->getInternalDestination() =
+ net_msg_ptr = msg_ptr.get();
+ net_msg_ptr->getDestination() =
output_link_destinations[i];
// Enqeue msg
diff --git a/src/mem/ruby/network/simple/Throttle.cc b/src/mem/ruby/network/simple/Throttle.cc
index 2da810edb..d722c91ea 100644
--- a/src/mem/ruby/network/simple/Throttle.cc
+++ b/src/mem/ruby/network/simple/Throttle.cc
@@ -34,7 +34,7 @@
#include "mem/ruby/network/simple/Throttle.hh"
#include "mem/ruby/network/MessageBuffer.hh"
#include "mem/ruby/network/Network.hh"
-#include "mem/ruby/slicc_interface/NetworkMessage.hh"
+#include "mem/ruby/slicc_interface/Message.hh"
#include "mem/ruby/system/System.hh"
using namespace std;
@@ -44,7 +44,7 @@ const int MESSAGE_SIZE_MULTIPLIER = 1000;
const int BROADCAST_SCALING = 1;
const int PRIORITY_SWITCH_LIMIT = 128;
-static int network_message_to_size(NetworkMessage* net_msg_ptr);
+static int network_message_to_size(Message* net_msg_ptr);
Throttle::Throttle(int sID, NodeID node, Cycles link_latency,
int link_bandwidth_multiplier, int endpoint_bandwidth,
@@ -121,8 +121,7 @@ Throttle::operateVnet(int vnet, int &bw_remaining, bool &schedule_wakeup,
if (m_units_remaining[vnet] == 0 && in->isReady()) {
// Find the size of the message we are moving
MsgPtr msg_ptr = in->peekMsgPtr();
- NetworkMessage* net_msg_ptr =
- safe_cast<NetworkMessage*>(msg_ptr.get());
+ Message *net_msg_ptr = msg_ptr.get();
m_units_remaining[vnet] +=
network_message_to_size(net_msg_ptr);
@@ -257,7 +256,7 @@ Throttle::print(ostream& out) const
}
int
-network_message_to_size(NetworkMessage* net_msg_ptr)
+network_message_to_size(Message *net_msg_ptr)
{
assert(net_msg_ptr != NULL);